Merge "riscv64: use L() in the handful of places we didn't already." into main am: 252ed5704a

Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031963

Change-Id: Ibfc448cdf4609ecbb8e130db166efb13d9d3ee9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliott Hughes 2024-04-08 21:51:12 +00:00 committed by Automerger Merge Worker
commit 0c95ef70fa
4 changed files with 13 additions and 13 deletions

View file

@ -41,19 +41,19 @@ ENTRY_PRIVATE(__bionic_clone)
ecall ecall
# Are we the child? # Are we the child?
beqz a0, .L_bc_child beqz a0, L(child)
# Did the clone(2) fail? # Did the clone(2) fail?
bltz a0, .L_bc_failure bltz a0, L(failure)
# Nope, we're the parent, and our work here is done. # Nope, we're the parent, and our work here is done.
ret ret
.L_bc_failure: L(failure):
# Set errno if something went wrong. # Set errno if something went wrong.
neg a0, a0 neg a0, a0
tail __set_errno_internal tail __set_errno_internal
.L_bc_child: L(child):
# We're in the child now. Set the end of the frame record chain. # We're in the child now. Set the end of the frame record chain.
li fp, 0 li fp, 0
# Setting ra to 0 will make the unwinder stop at __start_thread. # Setting ra to 0 will make the unwinder stop at __start_thread.

View file

@ -205,7 +205,7 @@ ENTRY_WEAK_FOR_NATIVE_BRIDGE(siglongjmp)
// Check the checksum before doing anything. // Check the checksum before doing anything.
m_calculate_checksum t0, a0, t1 m_calculate_checksum t0, a0, t1
ld t1, _JB_CHECKSUM(a0) ld t1, _JB_CHECKSUM(a0)
bne t0, t1, 3f bne t0, t1, L(checksum_failure)
// Do we need to restore the signal mask? // Do we need to restore the signal mask?
ld a2, _JB_SIGFLAG(a0) ld a2, _JB_SIGFLAG(a0)
@ -290,7 +290,7 @@ ENTRY_WEAK_FOR_NATIVE_BRIDGE(siglongjmp)
mv a0, a1 mv a0, a1
ret ret
3: L(checksum_failure):
call __bionic_setjmp_checksum_mismatch call __bionic_setjmp_checksum_mismatch
END(siglongjmp) END(siglongjmp)

View file

@ -44,10 +44,10 @@ ENTRY(syscall)
// Did it fail? // Did it fail?
li a7, -MAX_ERRNO li a7, -MAX_ERRNO
bgtu a0, a7, 1f bgtu a0, a7, L(failure)
ret ret
1:
L(failure):
neg a0, a0 neg a0, a0
tail __set_errno_internal tail __set_errno_internal
END(syscall) END(syscall)

View file

@ -51,16 +51,16 @@ ENTRY(vfork)
ecall ecall
// if (rc == 0) we're the child, and finished... // if (rc == 0) we're the child, and finished...
beqz a0, .L_success beqz a0, L(success)
// else if (rc != 0): reset cached_pid_ and vforked_... // else if (rc != 0): reset cached_pid_ and vforked_...
sw t2, 20(t0) sw t2, 20(t0)
// ...and work out whether we succeeded or failed. // ...and work out whether we succeeded or failed.
bltz a0, .L_failure bltz a0, L(failure)
.L_success: L(success):
ret ret
.L_failure: L(failure):
neg a0, a0 neg a0, a0
tail __set_errno_internal tail __set_errno_internal
END(vfork) END(vfork)