diff options
author | Daniel Eischen <deischen@FreeBSD.org> | 2006-02-24 22:03:10 +0000 |
---|---|---|
committer | Daniel Eischen <deischen@FreeBSD.org> | 2006-02-24 22:03:10 +0000 |
commit | c0addafac3846f11fb34165971c5e172854ec9a7 (patch) | |
tree | 3439df061340ff5af46f8ff57b9e96d3657ad768 | |
parent | 33499e2ae56b306afb9897f6c16e1496a01f51a6 (diff) |
Notes
-rw-r--r-- | lib/libkse/arch/amd64/amd64/context.S | 9 | ||||
-rw-r--r-- | lib/libpthread/arch/amd64/amd64/context.S | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/libkse/arch/amd64/amd64/context.S b/lib/libkse/arch/amd64/amd64/context.S index 9e6ed74df710..6a6b55810950 100644 --- a/lib/libkse/arch/amd64/amd64/context.S +++ b/lib/libkse/arch/amd64/amd64/context.S @@ -162,11 +162,11 @@ ENTRY(_amd64_restore_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax - jmp 7f + jmp 2f 1: cmpq $MC_SIZE, MC_LEN_OFFSET(%rdi) /* is context valid? */ je 2f movq $-1, %rax /* bzzzt, invalid context */ - jmp 7f + ret 2: movq MC_RCX(%rdi), %rcx movq MC_R8(%rdi), %r8 movq MC_R9(%rdi), %r9 @@ -213,6 +213,5 @@ ENTRY(_amd64_restore_context) popq %rsi /* restore rsi, rdx, and rdi */ popq %rdx popq %rdi - leaq (8 + REDZONE)(%rsp), %rsp - jmp *-(8 + REDZONE)(%rsp) /* jump to return address */ -7: ret + ret $REDZONE + diff --git a/lib/libpthread/arch/amd64/amd64/context.S b/lib/libpthread/arch/amd64/amd64/context.S index 9e6ed74df710..6a6b55810950 100644 --- a/lib/libpthread/arch/amd64/amd64/context.S +++ b/lib/libpthread/arch/amd64/amd64/context.S @@ -162,11 +162,11 @@ ENTRY(_amd64_restore_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax - jmp 7f + jmp 2f 1: cmpq $MC_SIZE, MC_LEN_OFFSET(%rdi) /* is context valid? */ je 2f movq $-1, %rax /* bzzzt, invalid context */ - jmp 7f + ret 2: movq MC_RCX(%rdi), %rcx movq MC_R8(%rdi), %r8 movq MC_R9(%rdi), %r9 @@ -213,6 +213,5 @@ ENTRY(_amd64_restore_context) popq %rsi /* restore rsi, rdx, and rdi */ popq %rdx popq %rdi - leaq (8 + REDZONE)(%rsp), %rsp - jmp *-(8 + REDZONE)(%rsp) /* jump to return address */ -7: ret + ret $REDZONE + |