summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/gen/setjmp.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/i386/gen/setjmp.S')
-rw-r--r--lib/libc/i386/gen/setjmp.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S
index 5d0ddc4..a409e35 100644
--- a/lib/libc/i386/gen/setjmp.S
+++ b/lib/libc/i386/gen/setjmp.S
@@ -51,12 +51,19 @@ __FBSDID("$FreeBSD$");
ENTRY(setjmp)
movl 4(%esp),%ecx
PIC_PROLOGUE
+#ifdef PIC
+ subl $12,%esp /* make the stack 16-byte aligned */
+#endif
leal 28(%ecx), %eax
pushl %eax /* (sigset_t*)oset */
pushl $0 /* (sigset_t*)set */
pushl $1 /* SIG_BLOCK */
call PIC_PLT(CNAME(_sigprocmask))
+#ifdef PIC
+ addl $24,%esp
+#else
addl $12,%esp
+#endif
PIC_EPILOGUE
movl 4(%esp),%ecx
movl 0(%esp),%edx
@@ -76,12 +83,19 @@ END(setjmp)
ENTRY(__longjmp)
movl 4(%esp),%edx
PIC_PROLOGUE
+#ifdef PIC
+ subl $12,%esp /* make the stack 16-byte aligned */
+#endif
pushl $0 /* (sigset_t*)oset */
leal 28(%edx), %eax
pushl %eax /* (sigset_t*)set */
pushl $3 /* SIG_SETMASK */
call PIC_PLT(CNAME(_sigprocmask))
+#ifdef PIC
+ addl $24,%esp
+#else
addl $12,%esp
+#endif
PIC_EPILOGUE
movl 4(%esp),%edx
movl 8(%esp),%eax
OpenPOWER on IntegriCloud