summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-12-14 23:20:50 +0000
committerRoland McGrath <roland@gnu.org>1994-12-14 23:20:50 +0000
commitf541965ecded0ed9b51acb004929da2f129ea3e0 (patch)
treeff51966b07136ad3c6b3e51ffa442b0c1756a553
parent92fa42d19a726d9810db3853cbbf3d7356843217 (diff)
Use sethi and or to put address of __sigjmp_save in %g1 and jmp there.
jmp cannot contain a complete absolute pointer. Put second store in jmp delay slot.
-rw-r--r--sysdeps/sparc/setjmp.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/sparc/setjmp.S b/sysdeps/sparc/setjmp.S
index f4a7e4cc10..3c9c18d00d 100644
--- a/sysdeps/sparc/setjmp.S
+++ b/sysdeps/sparc/setjmp.S
@@ -21,10 +21,11 @@ Cambridge, MA 02139, USA. */
/* NOTE: This code depends on the definition of `__jmp_buf' in <jmp_buf.h>. */
ENTRY (__sigsetjmp)
- /* Save our return PC and SP. */
+ /* Save our return PC and SP (second store in the jmp delay slot). */
st %o7, [%o0]
- st %sp, [%o0 + 4]
/* Save the signal mask if requested. We do this as a tail-call
for simplicity; it always returns zero. */
- jmp C_SYMBOL_NAME (__sigjmp_save)
- nop
+ sethi %hi(C_SYMBOL_NAME (__sigjmp_save)), %g1
+ or %lo(C_SYMBOL_NAME (__sigjmp_save)), %g1, %g1
+ jmp %g1
+ st %sp, [%o0 + 4]