diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S index 0e1e5f8f265..034900305e9 100644 --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$"); ENTRY(_setjmp) movq %rdi,%rax - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rax) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rax) /* 0; return address */ movq %rbx, 8(%rax) /* 1; rbx */ movq %rsp,16(%rax) /* 2; rsp */ movq %rbp,24(%rax) /* 3; rbp */ @@ -88,7 +88,7 @@ ENTRY(___longjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(___longjmp) diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 90eff9e9ed6..173a2d29953 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -58,8 +58,8 @@ ENTRY(setjmp) call __libc_sigprocmask popq %rdi movq %rdi,%rcx - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rcx) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rcx) /* 0; return address */ movq %rbx, 8(%rcx) /* 1; rbx */ movq %rsp,16(%rcx) /* 2; rsp */ movq %rbp,24(%rcx) /* 3; rbp */ @@ -109,7 +109,7 @@ ENTRY(__longjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(__longjmp) diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 44713412201..743b8a631d3 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -66,8 +66,8 @@ ENTRY(sigsetjmp) call __libc_sigprocmask popq %rdi 2: movq %rdi,%rcx - movq 0(%rsp),%rdx /* retval */ - movq %rdx, 0(%rcx) /* 0; retval */ + movq 0(%rsp),%rdx /* return address */ + movq %rdx, 0(%rcx) /* 0; return address */ movq %rbx, 8(%rcx) /* 1; rbx */ movq %rsp,16(%rcx) /* 2; rsp */ movq %rbp,24(%rcx) /* 3; rbp */ @@ -109,7 +109,7 @@ ENTRY(__siglongjmp) testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(__siglongjmp)