diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-07-26 02:36:50 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-07-26 02:36:50 +0000 |
commit | 2891e1e63b388046f73b9933159d02e9c7f38dcc (patch) | |
tree | 357b1b378401de3dcb33b7302dd257cfc1cfa32c /lib | |
parent | 928665675a7c19e3c7ffc2dc83d5b4085866784b (diff) | |
download | FreeBSD-src-2891e1e63b388046f73b9933159d02e9c7f38dcc.zip FreeBSD-src-2891e1e63b388046f73b9933159d02e9c7f38dcc.tar.gz |
Fix typo.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/arch/amd64/amd64/context.S | 10 | ||||
-rw-r--r-- | lib/libpthread/arch/amd64/amd64/context.S | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/libkse/arch/amd64/amd64/context.S b/lib/libkse/arch/amd64/amd64/context.S index 50616e0..5b8fc74 100644 --- a/lib/libkse/arch/amd64/amd64/context.S +++ b/lib/libkse/arch/amd64/amd64/context.S @@ -123,7 +123,7 @@ __FBSDID("$FreeBSD$"); * No values are saved to mc_trapno, mc_addr, mc_err, mc_cs, or mc_ss. * For the FPU state, only the floating point control word is stored. */ -ENTRY(_amd64_ctx_save) +ENTRY(_amd64_save_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax @@ -149,7 +149,7 @@ ENTRY(_amd64_ctx_save) popq %rax movq %rax, MC_RFLAGS(%rdi) /* save flags */ movq %rsp, %rax /* setcontext pushes the return */ - addq $4, %rax /* address onto the stack; */ + addq $8, %rax /* address onto the stack; */ movq %rax, MC_RSP(%rdi) /* account for this -- ???. */ fnstcw MC_FP_CW_OFFSET(%rdi) /* save FPU control word */ movq $MC_OWNEDFP_NONE, MC_OWNEDFP_OFFSET(%rdi) /* no FP */ @@ -161,7 +161,7 @@ ENTRY(_amd64_ctx_save) /* * _amd64_ctx_restore(mcontext_t *mcp, intptr_t val, intptr_t *loc); */ -ENTRY(_amd64_ctx_restore) +ENTRY(_amd64_restore_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax @@ -198,7 +198,7 @@ ENTRY(_amd64_ctx_restore) 5: movq MC_RSP(%rdi), %rsp /* switch to context stack */ movq MC_RIP(%rdi), %rax /* return address on stack */ pushq %rax - movq MC_RSI(%rdi), %rax /* rdi on stack */ + movq MC_RDI(%rdi), %rax /* rdi on stack */ pushq %rax movq MC_RDX(%rdi), %rax /* rdx on stack */ pushq %rax @@ -209,7 +209,7 @@ ENTRY(_amd64_ctx_restore) movq MC_RAX(%rdi), %rax /* restore rax */ /* At this point we're done with the context. */ cmpq $0, %rdx /* set *loc to val */ - je 7f + je 6f movq %rsi, (%rdx) 6: popfq /* restore flags */ popq %rsi /* restore rsi, rdx, and rdi */ diff --git a/lib/libpthread/arch/amd64/amd64/context.S b/lib/libpthread/arch/amd64/amd64/context.S index 50616e0..5b8fc74 100644 --- a/lib/libpthread/arch/amd64/amd64/context.S +++ b/lib/libpthread/arch/amd64/amd64/context.S @@ -123,7 +123,7 @@ __FBSDID("$FreeBSD$"); * No values are saved to mc_trapno, mc_addr, mc_err, mc_cs, or mc_ss. * For the FPU state, only the floating point control word is stored. */ -ENTRY(_amd64_ctx_save) +ENTRY(_amd64_save_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax @@ -149,7 +149,7 @@ ENTRY(_amd64_ctx_save) popq %rax movq %rax, MC_RFLAGS(%rdi) /* save flags */ movq %rsp, %rax /* setcontext pushes the return */ - addq $4, %rax /* address onto the stack; */ + addq $8, %rax /* address onto the stack; */ movq %rax, MC_RSP(%rdi) /* account for this -- ???. */ fnstcw MC_FP_CW_OFFSET(%rdi) /* save FPU control word */ movq $MC_OWNEDFP_NONE, MC_OWNEDFP_OFFSET(%rdi) /* no FP */ @@ -161,7 +161,7 @@ ENTRY(_amd64_ctx_save) /* * _amd64_ctx_restore(mcontext_t *mcp, intptr_t val, intptr_t *loc); */ -ENTRY(_amd64_ctx_restore) +ENTRY(_amd64_restore_context) cmpq $0, %rdi /* check for null pointer */ jne 1f movq $-1, %rax @@ -198,7 +198,7 @@ ENTRY(_amd64_ctx_restore) 5: movq MC_RSP(%rdi), %rsp /* switch to context stack */ movq MC_RIP(%rdi), %rax /* return address on stack */ pushq %rax - movq MC_RSI(%rdi), %rax /* rdi on stack */ + movq MC_RDI(%rdi), %rax /* rdi on stack */ pushq %rax movq MC_RDX(%rdi), %rax /* rdx on stack */ pushq %rax @@ -209,7 +209,7 @@ ENTRY(_amd64_ctx_restore) movq MC_RAX(%rdi), %rax /* restore rax */ /* At this point we're done with the context. */ cmpq $0, %rdx /* set *loc to val */ - je 7f + je 6f movq %rsi, (%rdx) 6: popfq /* restore flags */ popq %rsi /* restore rsi, rdx, and rdi */ |