summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/amd64/gen/setjmp.S3
-rw-r--r--lib/libc/amd64/gen/sigsetjmp.S3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S
index 1409f4c..47772be 100644
--- a/lib/libc/amd64/gen/setjmp.S
+++ b/lib/libc/amd64/gen/setjmp.S
@@ -54,6 +54,7 @@ ENTRY(setjmp)
movq $1,%rdi /* SIG_BLOCK */
movq $0,%rsi /* (sigset_t*)set */
leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */
+ /* stack is 16-byte aligned */
call PIC_PLT(CNAME(_sigprocmask))
popq %rdi
movq %rdi,%rcx
@@ -81,7 +82,9 @@ ENTRY(__longjmp)
movq $3,%rdi /* SIG_SETMASK */
leaq 72(%rdx),%rsi /* (sigset_t*)set */
movq $0,%rdx /* (sigset_t*)oset */
+ subq $0x8,%rsp /* make the stack 16-byte aligned */
call PIC_PLT(CNAME(_sigprocmask))
+ addq $0x8,%rsp
popq %rsi
popq %rdi /* jmpbuf */
movq %rdi,%rdx
diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S
index 438d440..ef90bc6 100644
--- a/lib/libc/amd64/gen/sigsetjmp.S
+++ b/lib/libc/amd64/gen/sigsetjmp.S
@@ -62,6 +62,7 @@ ENTRY(sigsetjmp)
movq $1,%rdi /* SIG_BLOCK */
movq $0,%rsi /* (sigset_t*)set */
leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */
+ /* stack is 16-byte aligned */
call PIC_PLT(CNAME(_sigprocmask))
popq %rdi
2: movq %rdi,%rcx
@@ -90,7 +91,9 @@ ENTRY(__siglongjmp)
movq $3,%rdi /* SIG_SETMASK */
leaq 72(%rdx),%rsi /* (sigset_t*)set */
movq $0,%rdx /* (sigset_t*)oset */
+ subq $0x8,%rsp /* make the stack 16-byte aligned */
call PIC_PLT(CNAME(_sigprocmask))
+ addq $0x8,%rsp
popq %rsi
popq %rdi /* jmpbuf */
2: movq %rdi,%rdx
OpenPOWER on IntegriCloud