diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -48,8 +48,8 @@ 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 @@ 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 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -58,8 +58,8 @@ 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 @@ 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 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -66,8 +66,8 @@ 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 @@ testq %rax,%rax jnz 1f incq %rax -1: movq %rcx,0(%rsp) +1: movq %rcx,0(%rsp) /* return address */ ret END(__siglongjmp)