aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-02-20 20:50:14 -0800
committerDavid S. Miller <davem@davemloft.net>2012-02-20 20:50:14 -0800
commitc0e70b2543f2db96784e2d46595f05869dad24ea (patch)
treee2489ccfc17a9558b5a89245708e3a2597d57f9e /sysdeps/unix
parentfb06851d67ff93d7b79cb28d0c582b08fc553ad9 (diff)
downloadglibc-c0e70b2543f2db96784e2d46595f05869dad24ea.tar
glibc-c0e70b2543f2db96784e2d46595f05869dad24ea.tar.gz
glibc-c0e70b2543f2db96784e2d46595f05869dad24ea.tar.bz2
glibc-c0e70b2543f2db96784e2d46595f05869dad24ea.zip
Tweak sparc32 longjmp to not store a dummy frame pointer onto the stack.
* sysdeps/sparc/sparc32/__longjmp.S: Unwind in the 'thread' path using a normal save/restore sequence, rather than allocating a dummy stack frame just to store a frame pointer and restore. * sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S: Likewise.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
index dfbf76165a..7246e893a7 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S
@@ -20,7 +20,6 @@
#define ENV(base,reg) [%base + (reg * 4)]
#define ST_FLUSH_WINDOWS 3
-#define RW_FP [%fp + 0x48]
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
@@ -97,6 +96,7 @@ ENTRY (____longjmp_chk)
mov 1, %g2 /* Delay slot only hit if zero: VAL = 1. */
0:
+ save %sp, -96, %sp
/*
* Do a "flush register windows trap". The trap handler in the
* kernel writes all the register windows to their stack slots, and
@@ -108,14 +108,12 @@ ENTRY (____longjmp_chk)
ta ST_FLUSH_WINDOWS
#ifdef PTR_DEMANGLE
ld ENV(g1,JB_PC), %g1 /* Set return PC. */
- PTR_DEMANGLE2 (%o7, %g1, %g4)
+ PTR_DEMANGLE2 (%i7, %g1, %g4)
#else
- ld ENV(g1,JB_PC), %o7 /* Set return PC. */
+ ld ENV(g1,JB_PC), %i7 /* Set return PC. */
#endif
mov %g5, %fp
- sub %fp, 64, %sp /* Allocate a register frame. */
- st %g3, RW_FP /* Set saved FP on restore below. */
- retl
+ jmp %i7 + 8
restore %g2, 0, %o0 /* Restore values from above register frame. */
END(____longjmp_chk)