summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh
diff options
context:
space:
mode:
authorDavid McCullough <davidm@snapgear.com>2003-02-17 12:20:42 +0000
committerDavid McCullough <davidm@snapgear.com>2003-02-17 12:20:42 +0000
commiteacb6bcea7196699d2b9dfe29a07d237059360ac (patch)
tree2337c3af591223e1bee09934c643e6dbbe0b3d13 /libc/sysdeps/linux/sh
parent817cfa7ee7df27b77f594dbc34d1cc82e6850d31 (diff)
If floating point was enabled, setjmp would write to memory well past the
end of the buffer.
Diffstat (limited to 'libc/sysdeps/linux/sh')
-rw-r--r--libc/sysdeps/linux/sh/setjmp.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/sh/setjmp.S b/libc/sysdeps/linux/sh/setjmp.S
index c9fa3b1fb..7d70fba76 100644
--- a/libc/sysdeps/linux/sh/setjmp.S
+++ b/libc/sysdeps/linux/sh/setjmp.S
@@ -53,17 +53,18 @@ setjmp:
.globl __sigsetjmp;
__sigsetjmp:
mov r0, r1
+ nop /* align this guy */
__sigsetjmp_intern:
/* Save registers */
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
- add #(JB_SIZE*4), r4
+ add #(JB_SIZE), r4
fmov.s fr15, @-r4
fmov.s fr14, @-r4
fmov.s fr13, @-r4
fmov.s fr12, @-r4
sts.l fpscr, @-r4
#else
- add #(JB_SIZE-5*4), r4 /* this code doesn't do FP yet */
+ add #(JB_SIZE-(5*4)), r4 /* this code doesn't do FP yet */
#endif
stc.l gbr, @-r4
sts.l pr, @-r4