about summary refs log tree commit diff
path: root/sysdeps/sparc/bsd-setjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/bsd-setjmp.S')
-rw-r--r--sysdeps/sparc/bsd-setjmp.S32
1 files changed, 15 insertions, 17 deletions
diff --git a/sysdeps/sparc/bsd-setjmp.S b/sysdeps/sparc/bsd-setjmp.S
index 09aee661da..16dc260765 100644
--- a/sysdeps/sparc/bsd-setjmp.S
+++ b/sysdeps/sparc/bsd-setjmp.S
@@ -20,23 +20,21 @@
 #include <sysdep.h>
 
 ENTRY (setjmp)
+
 #ifdef PIC
-1:
-	jmpl  2f,%o1
-	nop
-2:
-	sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
-	or    %l7,%lo(_GLOBAL_OFFSET_TABLE_-(1b-.)),%l7
-	add   %l7,%o1,%l7
-	sethi %hi(C_SYMBOL_NAME (__sigsetjmp)),%g1
-	or    %g1,%lo(C_SYMBOL_NAME (__sigsetjmp)),%g1
-	ld    [%l7+%g1],%g1
-	ld    [%g1],%g1
-	jmpl  %g1,%g0
-	mov   1,%o1
+	save	%sp, -64, %sp
+1:	call	2f
+	sethi	%hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %g1
+2:	or	%l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %g1
+	add	%g1, %o7, %g1
+	sethi	%hi(C_SYMBOL_NAME(__sigsetjmp)), %g2
+	restore
+	or	%g2, %lo(C_SYMBOL_NAME(__sigsetjmp)), %g2
+	ld	[%g1+%g2], %g1
 #else
-	sethi %hi(C_SYMBOL_NAME (__sigsetjmp)), %g1
-	or %lo(C_SYMBOL_NAME (__sigsetjmp)), %g1, %g1
-	jmp %g1
-	mov 1, %o1		/* Pass second argument of one.  */
+	sethi	%hi(C_SYMBOL_NAME(__sigsetjmp)), %g1
+	or	%g1, %lo(C_SYMBOL_NAME(__sigsetjmp)), %g1
 #endif
+
+	jmp %g1
+	 mov 1, %o1		/* Pass second argument of one.  */