linux-user/sparc: Implement v8plus signals
RFC PATCH 1/1 linux-user/sparc: Implement v8plus signals
Sparc v8plus is a sparc64 running a 32-bit ABI.
The significant difference vs sparc32 is that all 64 bits of the %g and %o registers, plus %xcc, are saved across interrupts, context switches, and signals.
There's a special marker in the saved %psr value that's used to indicate that %xcc and the high bits are present in the frame.
---
I have been unable to find an extant v8plus distribution with which to test this beyond compilation. Thus the RFC. I know debian used to have one, but they have moved to pure sparc64 now.
Thoughts?
r~
--- target/sparc/cpu.h | 2 - linux-user/sparc/signal.c | 96 ++++++++++++++++++++++++++++++++------- 2 files changed, 80 insertions(+), 18 deletions(-)
target/sparc/cpu.h +0 -2
@@ -104,14 +104,12 @@ enum {#define PSR_CARRY_SHIFT 20#define PSR_CARRY (1 << PSR_CARRY_SHIFT)#define PSR_ICC (PSR_NEG|PSR_ZERO|PSR_OVF|PSR_CARRY) -#if !defined(TARGET_SPARC64 )#define PSR_EF (1<<12)#define PSR_PIL 0xf00#define PSR_S (1<<7)#define PSR_PS (1<<6)#define PSR_ET (1<<5)#define PSR_CWP 0x1f -#endif #define CC_SRC (env->cc_src)#define CC_SRC2 (env->cc_src2)
linux-user/sparc/signal.c +80 -16
185 lines not on this page · raw message
Signature · 1 line
2.25.1
Le 26/05/2021 à 03:13, Richard Henderson a écrit :
Quoted 8 lines
Sparc v8plus is a sparc64 running a 32-bit ABI.
The significant difference vs sparc32 is that all 64 bits of the %g and %o registers, plus %xcc, are saved across interrupts, context switches, and signals.There's a special marker in the saved %psr value that's used to indicate that %xcc and the high bits are present in the frame.
Quoted 8 lines
Signed-off-by Richard Henderson <[email protected]>---
I have been unable to find an extant v8plus distribution with which to test this beyond compilation. Thus the RFC. I know debian used to have one, but they have moved to pure sparc64 now.
Thoughts?
In my test, I use debian wheezy, and it seems to be sparc32plus v8+:
$ file chroot/sparc/wheezy/bin/ls chroot/sparc/wheezy/bin/ls: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, total store ordering, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=3fdfb5b9f829824f6110b7a2d91efd9947614263, stripped
I get wheezy from http://archive.debian.org/debian
If you want I can make a try with your patch.
Thanks,
Laurent
Quoted 20 lines · Laurent Vivier
Le 26/05/2021 à 03:13, Richard Henderson a écrit :
Quoted 8 lines
Sparc v8plus is a sparc64 running a 32-bit ABI.
The significant difference vs sparc32 is that all 64 bits of the %g and %o registers, plus %xcc, are saved across interrupts, context switches, and signals.There's a special marker in the saved %psr value that's used to indicate that %xcc and the high bits are present in the frame.
Quoted 8 lines
Signed-off-by Richard Henderson <[email protected]>---
I have been unable to find an extant v8plus distribution with which to test this beyond compilation. Thus the RFC. I know debian used to have one, but they have moved to pure sparc64 now.
Thoughts?
In my test, I use debian wheezy, and it seems to be sparc32plus v8+:
Quoted 8 lines
$ file chroot/sparc/wheezy/bin/ls chroot/sparc/wheezy/bin/ls: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, total store ordering, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=3fdfb5b9f829824f6110b7a2d91efd9947614263, strippedI get wheezy from http://archive.debian.org/debian
If you want I can make a try with your patch.
Yes, please.
r~
Quoted 28 lines · Richard Henderson
Quoted 27 lines · Laurent Vivier
Le 26/05/2021 à 03:13, Richard Henderson a écrit :
Quoted 8 lines
Sparc v8plus is a sparc64 running a 32-bit ABI.
The significant difference vs sparc32 is that all 64 bits of the %g and %o registers, plus %xcc, are saved across interrupts, context switches, and signals.There's a special marker in the saved %psr value that's used to indicate that %xcc and the high bits are present in the frame.
Quoted 8 lines
Signed-off-by Richard Henderson <[email protected]>---
I have been unable to find an extant v8plus distribution with which to test this beyond compilation. Thus the RFC. I know debian used to have one, but they have moved to pure sparc64 now.
Thoughts?
In my test, I use debian wheezy, and it seems to be sparc32plus v8+:
$ file chroot/sparc/wheezy/bin/ls chroot/sparc/wheezy/bin/ls: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, total store ordering, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=3fdfb5b9f829824f6110b7a2d91efd9947614263, stripped
Quoted 6 lines
Quoted 3 lines
I get wheezy from http://archive.debian.org/debian
If you want I can make a try with your patch.
Yes, please.
This breaks two tests in LTP: sigaction01 and rt_sigaction01 (they hang).
Tested with debian wheezy and LTP 20200930.
Note: even with master, debootstrap is broken and needs manual hacks to have a working chroot.
Thanks,
Laurent