diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-01-02 19:12:44 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-01-02 19:12:44 +0000 |
commit | f9a0c10ad1f5c5718abf3b96700c701c39600d1d (patch) | |
tree | 52d335e1e6b4ca0c0baf86eb4271730b0bc30bf4 /lib | |
parent | 2fcdfc32c51b87d6f80e16935c34919b1a47e84a (diff) |
fp and pc are 64 bit.
And just to make things more fun -1, is not a misaligned stack on sparc64.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc_r/arch/sparc64/uthread_machdep.c | 10 | ||||
-rw-r--r-- | lib/libpthread/arch/sparc64/uthread_machdep.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc_r/arch/sparc64/uthread_machdep.c b/lib/libc_r/arch/sparc64/uthread_machdep.c index eaea79af8d3..fc754003744 100644 --- a/lib/libc_r/arch/sparc64/uthread_machdep.c +++ b/lib/libc_r/arch/sparc64/uthread_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_machdep.c,v 1.1 2001/09/10 20:00:14 jason Exp $ */ +/* $OpenBSD: uthread_machdep.c,v 1.2 2002/01/02 19:12:43 art Exp $ */ /* * Machine-dependent thread state functions for OpenBSD/sparc. @@ -24,12 +24,12 @@ _thread_machdep_init(statep, base, len, entry) struct frame64 *f; /* Locate the initial frame, aligned at the top of the stack */ - f = (struct frame64 *)(((int)base + len - sizeof *f) & ~ALIGNBYTES); + f = (struct frame64 *)(((long)base + len - sizeof *f) & ~ALIGNBYTES); - f->fr_fp = (struct frame64 *)-1; /* purposefully misaligned */ + f->fr_fp = 0; /* purposefully misaligned */ f->fr_pc = -1; /* for gdb */ - statep->fp = (int)f; - statep->pc = -8 + (int)entry; + statep->fp = (u_long)f - BIAS; + statep->pc = -8 + (u_long)entry; } void diff --git a/lib/libpthread/arch/sparc64/uthread_machdep.c b/lib/libpthread/arch/sparc64/uthread_machdep.c index eaea79af8d3..fc754003744 100644 --- a/lib/libpthread/arch/sparc64/uthread_machdep.c +++ b/lib/libpthread/arch/sparc64/uthread_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_machdep.c,v 1.1 2001/09/10 20:00:14 jason Exp $ */ +/* $OpenBSD: uthread_machdep.c,v 1.2 2002/01/02 19:12:43 art Exp $ */ /* * Machine-dependent thread state functions for OpenBSD/sparc. @@ -24,12 +24,12 @@ _thread_machdep_init(statep, base, len, entry) struct frame64 *f; /* Locate the initial frame, aligned at the top of the stack */ - f = (struct frame64 *)(((int)base + len - sizeof *f) & ~ALIGNBYTES); + f = (struct frame64 *)(((long)base + len - sizeof *f) & ~ALIGNBYTES); - f->fr_fp = (struct frame64 *)-1; /* purposefully misaligned */ + f->fr_fp = 0; /* purposefully misaligned */ f->fr_pc = -1; /* for gdb */ - statep->fp = (int)f; - statep->pc = -8 + (int)entry; + statep->fp = (u_long)f - BIAS; + statep->pc = -8 + (u_long)entry; } void |