]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hppa: Simplify handling of sanity check errors in clone.S.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 22 Dec 2024 14:58:02 +0000 (09:58 -0500)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 22 Dec 2024 14:58:02 +0000 (09:58 -0500)
This simplifies the handling of sanity check errors in clone.S.
Adjusted a couple of comments to reflect current code.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
sysdeps/unix/sysv/linux/hppa/clone.S

index c18163d0f756fab890f01a0c6f02f8c13c05b74f..e85e7f517f76ef8635ac91b27dc663c51488d820 100644 (file)
@@ -90,6 +90,10 @@ ENTRY(__clone)
        comib,=,n 0, %ret0, .LthreadStart
        bv,n    %r0(%rp)
 
+.LerrorSanity:
+       /* Sanity checks failed, set errno to EINVAL.  */
+       ldi     -EINVAL, %ret0
+
 .LerrorRest:
        /* Something bad happened -- no child created -- need a frame */
        ldo     64(%sp),%sp
@@ -101,11 +105,6 @@ ENTRY(__clone)
        bv      %r0(%rp)
        ldo     -64(%sp), %sp
 
-.LerrorSanity:
-       /* Sanity checks failed, return -1, and set errno to EINVAL. */
-       b       .LerrorRest
-       ldi     -EINVAL, %ret0
-
 .LthreadStart:
        /* Load up the arguments.  */
        ldw     -60(%sp), %arg0
@@ -121,7 +120,7 @@ ENTRY(__clone)
        ldi     __NR_exit, %r20
 
        /* We should not return from exit.
-           We do not restore r4, or the stack state.  */
+           We do not restore the stack state.  */
        iitlbp  %r0, (%sr0, %r0)
 
 PSEUDO_END(__clone)