diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-09-02 16:58:24 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-10-01 10:37:21 -0300 |
| commit | 49c3682ce18fc283433b759ea606bdc26df6b829 (patch) | |
| tree | 966596c29e8333b0b2264905aa09b506ab7703d9 | |
| parent | 44fa9c1080fe6a9539f0d2345b9d2ae37b8ee57a (diff) | |
| download | glibc-49c3682ce18fc283433b759ea606bdc26df6b829.tar.xz glibc-49c3682ce18fc283433b759ea606bdc26df6b829.zip | |
linux: sparc: Fix syscall_cancel for LEON
LEON2/LEON3 are both sparcv8, which does not support branch hints
(bne,pn) nor the return instruction.
Checked with a build for sparcv8-linux-gnu targetting leon. I also
checked some cancellation tests with qemu-system (targeting LEON3).
Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
| -rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/syscall_cancel.S | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/syscall_cancel.S b/sysdeps/unix/sysv/linux/sparc/sparc32/syscall_cancel.S index aa5c658ce1..0db93c77bf 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/syscall_cancel.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscall_cancel.S @@ -42,7 +42,11 @@ __syscall_cancel_arch_start: __syscall_do_cancel() */ ld [%i0], %g2 andcc %g2, TCB_CANCELED_BITMASK, %g0 +#ifdef __sparcv9 bne,pn %icc, 2f +#else + bne 2f +#endif /* Issue a 6 argument syscall. */ mov %i1, %g1 mov %i2, %o0 @@ -60,8 +64,13 @@ __syscall_cancel_arch_end: sub %g0, %o0, %o0 1: mov %o0, %i0 +#ifdef __sparcv9 return %i7+8 nop +#else + jmp %i7+8 + restore +#endif 2: call __syscall_do_cancel, 0 |
