git: acfd26152424 - main - libc: Improve setjmp comments

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Thu, 06 Jul 2023 17:22:14 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=acfd26152424b39f99cc0224c970eb5cf8ce93f0

commit acfd26152424b39f99cc0224c970eb5cf8ce93f0
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-07-06 17:21:54 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-07-06 17:21:54 +0000

    libc: Improve setjmp comments
    
    Reviewed by:            imp, kib
    Differential Revision:  https://reviews.freebsd.org/D40879
---
 lib/libc/amd64/gen/_setjmp.S   | 6 +++---
 lib/libc/amd64/gen/setjmp.S    | 6 +++---
 lib/libc/amd64/gen/sigsetjmp.S | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S
index 0e1e5f8f265d..034900305e9a 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 90eff9e9ed6b..173a2d29953a 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 447134122019..743b8a631d3b 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)