summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64/gen/sigsetjmp.S
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-05-08 06:25:03 +0000
committerpeter <peter@FreeBSD.org>2003-05-08 06:25:03 +0000
commitbe706ebe0cbcd01094c949595f84333d312c514a (patch)
tree948c8e92aac7908d45d34d62ebf77255706a366e /lib/libc/amd64/gen/sigsetjmp.S
parent7b91481e3a1d45ac3d905a15d3c2b41f718e3b9c (diff)
downloadFreeBSD-src-be706ebe0cbcd01094c949595f84333d312c514a.zip
FreeBSD-src-be706ebe0cbcd01094c949595f84333d312c514a.tar.gz
Fix an embarresing transcription error from i386 to amd64. Put the arguments
to sigprocmask(2) int the correct order. *blush*. For sigsetjmp(), match up the pushq/popq in the non-savemask case.
Diffstat (limited to 'lib/libc/amd64/gen/sigsetjmp.S')
-rw-r--r--lib/libc/amd64/gen/sigsetjmp.S17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S
index 7dd32a5..6795307 100644
--- a/lib/libc/amd64/gen/sigsetjmp.S
+++ b/lib/libc/amd64/gen/sigsetjmp.S
@@ -58,18 +58,17 @@ __FBSDID("$FreeBSD$");
*/
ENTRY(sigsetjmp)
- pushq %rdi
- movq %rdi,%rcx
- movl %esi,88(%rcx)
+ movl %esi,88(%rdi)
testl %esi,%esi
jz 2f
- leaq 72(%rcx),%rdi /* (sigset_t*)oset */
+ pushq %rdi
+ movq $1,%rdi /* SIG_BLOCK */
movq $0,%rsi /* (sigset_t*)set */
- movq $1,%rdx /* SIG_BLOCK */
+ leaq 72(%rcx),%rdx /* (sigset_t*)oset */
call PIC_PLT(CNAME(_sigprocmask))
popq %rdi
- movq %rdi,%rcx
-2: movq 0(%rsp),%rdx /* retval */
+2: movq %rdi,%rcx
+ movq 0(%rsp),%rdx /* retval */
movq %rdx, 0(%rcx) /* retval */
movq %rbx, 8(%rcx)
movq %rsp,16(%rcx)
@@ -90,9 +89,9 @@ ENTRY(__siglongjmp)
movq %rdi,%rdx
pushq %rdi
pushq %rsi
- movq $0,%rdi /* (sigset_t*)oset */
+ movq $3,%rdi /* SIG_SETMASK */
leaq 72(%rdx),%rsi /* (sigset_t*)set */
- movq $3,%rdx /* SIG_SETMASK */
+ movq $0,%rdx /* (sigset_t*)oset */
call PIC_PLT(CNAME(_sigprocmask))
popq %rsi
popq %rdi /* jmpbuf */
OpenPOWER on IntegriCloud