tcg/sparc: Remove support for sparc32plus
cover tcg/sparc: Remove support for sparc32plus
While working on other cleanup/new features wrt calling conventions, I noticed, again, that I am unable to test sparc32plus. The current debian installation in the gcc compile farm is for sparc64, and that is also what gentoo is currently building.
It has been 10 years since qemu dropped support for pure sparc32. I recon it's about time to finish the job.
r~
Richard Henderson (3):
tcg/sparc: Remove support for sparc32plus
tcg/sparc64: Rename from tcg/sparc
tcg/sparc64: Remove sparc32plus constraints
meson.build | 4 +-
tcg/{sparc => sparc64}/tcg-target-con-set.h | 16 +-
tcg/{sparc => sparc64}/tcg-target-con-str.h | 3 -
tcg/{sparc => sparc64}/tcg-target.h | 11 -
tcg/tcg.c | 75 +-----
tcg/{sparc => sparc64}/tcg-target.c.inc | 275 +++++---------------
6 files changed, 78 insertions(+), 306 deletions(-)
rename tcg/{sparc => sparc64}/tcg-target-con-set.h (69%)
rename tcg/{sparc => sparc64}/tcg-target-con-str.h (77%)
rename tcg/{sparc => sparc64}/tcg-target.h (95%)
rename tcg/{sparc => sparc64}/tcg-target.c.inc (91%)Signature · 1 line
2.34.1
PATCH 1/3 tcg/sparc: Remove support for sparc32plus
Since 9b9c37c36439, we have only supported sparc64 cpus. Debian and Gentoo now only support 64-bit sparc64 userland, so it is time to drop the 32-bit sparc64 userland: sparc32plus.
--- tcg/sparc/tcg-target.h | 11 --- tcg/tcg.c | 75 +---------------- tcg/sparc/tcg-target.c.inc | 166 +++++++------------------------------ 3 files changed, 33 insertions(+), 219 deletions(-)
tcg/sparc/tcg-target.h +0 -11
@@ -25,8 +25,6 @@#ifndef SPARC_TCG_TARGET_H #define SPARC_TCG_TARGET_H -#define TCG_TARGET_REG_BITS 64 -#define TCG_TARGET_INSN_UNIT_SIZE 4#define TCG_TARGET_TLB_DISPLACEMENT_BITS 32#define TCG_TARGET_NB_REGS 32
@@ -70,19 +68,10 @@ typedef enum {/* used for function call generation */ #define TCG_REG_CALL_STACK TCG_REG_O6 -#ifdef __arch64__#define TCG_TARGET_STACK_BIAS 2047#define TCG_TARGET_STACK_ALIGN 16#define TCG_TARGET_CALL_STACK_OFFSET (128 + 6*8 + TCG_TARGET_STACK_BIAS) -#else -#define TCG_TARGET_STACK_BIAS 0 -#define TCG_TARGET_STACK_ALIGN 8 -#define TCG_TARGET_CALL_STACK_OFFSET (64 + 4 + 6*4) -#endif - -#ifdef __arch64__#define TCG_TARGET_EXTEND_ARGS 1 -#endif #if defined(__VIS__) && __VIS__ >=0x300 #define use_vis3_instructions 1
tcg/tcg.c +2 -73
99 lines not on this page · raw message
tcg/sparc/tcg-target.c.inc +31 -135
324 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 10 lines · Richard Henderson
Since
9b9c37c36439, we have only supported sparc64 cpus. Debian and Gentoo now only support 64-bit sparc64 userland, so it is time to drop the 32-bit sparc64 userland: sparc32plus.Signed-off-by Richard Henderson <[email protected]>--- tcg/sparc/tcg-target.h | 11 --- tcg/tcg.c | 75 +---------------- tcg/sparc/tcg-target.c.inc | 166 +++++++------------------------------ 3 files changed, 33 insertions(+), 219 deletions(-)
Quoted 17 lines · Richard Henderson
Since
9b9c37c36439, we have only supported sparc64 cpus. Debian and Gentoo now only support 64-bit sparc64 userland, so it is time to drop the 32-bit sparc64 userland: sparc32plus.Signed-off-by Richard Henderson <[email protected]>--- tcg/sparc/tcg-target.h | 11 --- tcg/tcg.c | 75 +---------------- tcg/sparc/tcg-target.c.inc | 166 +++++++------------------------------ 3 files changed, 33 insertions(+), 219 deletions(-)tcg/sparc/tcg-target.h +0
-0
tcg/sparc/tcg-target.h line 28
Quoted 4 lines
tcg/sparc/tcg-target.h +0
-1@@ -25,8 +25,6 @@#ifndef SPARC_TCG_TARGET_H #define SPARC_TCG_TARGET_H -#define TCG_TARGET_REG_BITS 64
Why do we delete this?
tcg/sparc/tcg-target.c.inc line 27
Quoted 11 lines
tcg/sparc/tcg-target.c.inc +3
-0@@ -22,6 +22,11 @@ * THE SOFTWARE. */ +/* We only support generating code for 64-bit mode. */ +#ifndef __arch64__ +#error "unsupported code generation mode"
We might as well be more specific:
"no support for generating code for 32-bit SPARC"
(though I guess that configure ought in theory to prevent us getting here in that situation ?)
Otherwise
thanks
-- PMM
Quoted 22 lines · Peter Maydell
Quoted 20 lines · Richard Henderson
Since
9b9c37c36439, we have only supported sparc64 cpus. Debian and Gentoo now only support 64-bit sparc64 userland, so it is time to drop the 32-bit sparc64 userland: sparc32plus.Signed-off-by Richard Henderson <[email protected]>--- tcg/sparc/tcg-target.h | 11 --- tcg/tcg.c | 75 +---------------- tcg/sparc/tcg-target.c.inc | 166 +++++++------------------------------ 3 files changed, 33 insertions(+), 219 deletions(-)tcg/sparc/tcg-target.h +0
-0@@ -25,8 +25,6 @@#ifndef SPARC_TCG_TARGET_H #define SPARC_TCG_TARGET_H
Quoted 3 lines
tcg/sparc/tcg-target.h line 28
Quoted 1 line
tcg/sparc/tcg-target.h +0
-1-#define TCG_TARGET_REG_BITS 64Why do we delete this?
We get the default definition from include/tcg/tcg.h:
58 /* Default target word size to pointer size. */ 59 #ifndef TCG_TARGET_REG_BITS
60 # if UINTPTR_MAX == UINT32_MAX
61 # define TCG_TARGET_REG_BITS 32
62 # elif UINTPTR_MAX == UINT64_MAX
63 # define TCG_TARGET_REG_BITS 64
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Peter Maydell
Quoted 1 line
-#define
TCG_TARGET_REG_BITS64Why do we delete this?
Quoted 8 lines
We get the default definition from
include/tcg/tcg.h:58 /* Default target word size to pointer size. */ 59 #ifndef
TCG_TARGET_REG_BITS
60 # ifUINTPTR_MAX==UINT32_MAX
61 # defineTCG_TARGET_REG_BITS32
62 # elifUINTPTR_MAX==UINT64_MAX
63 # defineTCG_TARGET_REG_BITS64
Exactly.
r~
Quoted 9 lines · Richard Henderson
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Peter Maydell
Quoted 1 line
-#define
TCG_TARGET_REG_BITS64Why do we delete this?
We get the default definition from
include/tcg/tcg.h:
Quoted 8 lines
Quoted 6 lines
58 /* Default target word size to pointer size. */ 59 #ifndef
TCG_TARGET_REG_BITS
60 # ifUINTPTR_MAX==UINT32_MAX
61 # defineTCG_TARGET_REG_BITS32
62 # elifUINTPTR_MAX==UINT64_MAX
63 # defineTCG_TARGET_REG_BITS64Exactly.
Ah, I see. I was confused because a lot of the other tcg targets seem to by-hand define it, even when they don't AFAIK have 32-bit-API-on-64-bit-CPU support to consider.
-- PMM
Quoted 8 lines · Peter Maydell
tcg/sparc/tcg-target.c.inc line 27
Quoted 3 lines
tcg/sparc/tcg-target.c.inc +3
-0+/* We only support generating code for 64-bit mode. */ +#ifndef __arch64__ +#error "unsupported code generation mode"We might as well be more specific:
"no support for generating code for 32-bit SPARC"
(though I guess that configure ought in theory to prevent us getting here in that situation ?)
Yes, after patch 2 configure should prevent it.
r~
PATCH 2/3 tcg/sparc64: Rename from tcg/sparc
In reply to Richard HendersonEmphasize that we only support full 64-bit code generation.
---
meson.build | 4 +---
tcg/{sparc => sparc64}/tcg-target-con-set.h | 0
tcg/{sparc => sparc64}/tcg-target-con-str.h | 0
tcg/{sparc => sparc64}/tcg-target.h | 0
tcg/{sparc => sparc64}/tcg-target.c.inc | 0
5 files changed, 1 insertion(+), 3 deletions(-)
rename tcg/{sparc => sparc64}/tcg-target-con-set.h (100%)
rename tcg/{sparc => sparc64}/tcg-target-con-str.h (100%)
rename tcg/{sparc => sparc64}/tcg-target.h (100%)
rename tcg/{sparc => sparc64}/tcg-target.c.inc (100%)meson.build +1 -3
@@ -49,7 +49,7 @@ qapi_trace_events = [] bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin'] supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64', - 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64'] + 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64'] cpu = host_machine.cpu_family()
@@ -469,8 +469,6 @@ if get_option('tcg').allowed() endif if get_option('tcg_interpreter') tcg_arch = 'tci' - elif host_arch == 'sparc64' - tcg_arch = 'sparc' elif host_arch == 'x86_64' tcg_arch = 'i386' elif host_arch == 'ppc64'
tcg/sparc64/tcg-target-con-set.h renamed from tcg/sparc/tcg-target-con-set.h +0 -0
tcg/sparc64/tcg-target-con-str.h renamed from tcg/sparc/tcg-target-con-str.h +0 -0
tcg/sparc64/tcg-target.h renamed from tcg/sparc/tcg-target.h +0 -0
tcg/sparc64/tcg-target.c.inc renamed from tcg/sparc/tcg-target.c.inc +0 -0
Signature · 1 line
2.34.1
Re: [PATCH 2/3] tcg/sparc64: Rename from tcg/sparc
Quoted 10 lines · Richard Henderson
Emphasize that we only support full 64-bit code generation.
Signed-off-by Richard Henderson <[email protected]>--- meson.build | 4 +--- tcg/{sparc => sparc64}/tcg-target-con-set.h | 0 tcg/{sparc => sparc64}/tcg-target-con-str.h | 0 tcg/{sparc => sparc64}/tcg-target.h | 0 tcg/{sparc => sparc64}/tcg-target.c.inc | 0 5 files changed, 1 insertion(+), 3 deletions(-)
Quoted 4 lines
rename tcg/{sparc =>
sparc64}/tcg-target-con-set.h(100%) rename tcg/{sparc =>sparc64}/tcg-target-con-str.h(100%) rename tcg/{sparc =>sparc64}/tcg-target.h(100%) rename tcg/{sparc => sparc64}/tcg-target.c.inc (100%)
Re: [PATCH 2/3] tcg/sparc64: Rename from tcg/sparc
In reply to Richard HendersonQuoted 4 lines · Richard Henderson
Emphasize that we only support full 64-bit code generation.
Signed-off-by Richard Henderson <[email protected]>
Quoted 11 lines
---
meson.build | 4 +---
tcg/{sparc => sparc64}/tcg-target-con-set.h | 0
tcg/{sparc => sparc64}/tcg-target-con-str.h | 0
tcg/{sparc => sparc64}/tcg-target.h | 0
tcg/{sparc => sparc64}/tcg-target.c.inc | 0
5 files changed, 1 insertion(+), 3 deletions(-)
rename tcg/{sparc => sparc64}/tcg-target-con-set.h (100%)
rename tcg/{sparc => sparc64}/tcg-target-con-str.h (100%)
rename tcg/{sparc => sparc64}/tcg-target.h (100%)
rename tcg/{sparc => sparc64}/tcg-target.c.inc (100%)You also need to update the MAINTAINERS file, which has an entry for "F:tcg/sparc/".
Otherwise
thanks
-- PMM
PATCH 3/3 tcg/sparc64: Remove sparc32plus constraints
In reply to Richard HendersonWith sparc64 we need not distinguish between registers that can hold 32-bit values and those that can hold 64-bit values.
--- tcg/sparc64/tcg-target-con-set.h | 16 +---- tcg/sparc64/tcg-target-con-str.h | 3 - tcg/sparc64/tcg-target.c.inc | 109 ++++++++++++------------------- 3 files changed, 44 insertions(+), 84 deletions(-)
tcg/sparc64/tcg-target-con-set.h +3 -13
@@ -11,22 +11,12 @@*/ C_O0_I1(r) C_O0_I2(rZ, r) -C_O0_I2(RZ, r) C_O0_I2(rZ, rJ) -C_O0_I2(RZ, RJ) -C_O0_I2(sZ, A) -C_O0_I2(SZ, A) -C_O1_I1(r, A) -C_O1_I1(R, A) +C_O0_I2(sZ, s) +C_O1_I1(r, s) C_O1_I1(r, r) -C_O1_I1(r, R) -C_O1_I1(R, r) -C_O1_I1(R, R) -C_O1_I2(R, R, R) +C_O1_I2(r, r, r) C_O1_I2(r, rZ, rJ) -C_O1_I2(R, RZ, RJ) C_O1_I4(r, rZ, rJ, rI, 0) -C_O1_I4(R, RZ, RJ, RI, 0) C_O2_I2(r, r, rZ, rJ) -C_O2_I4(R, R, RZ, RZ, RJ, RI) C_O2_I4(r, r, rZ, rZ, rJ, rJ)
tcg/sparc64/tcg-target-con-str.h +0 -3
@@ -9,10 +9,7 @@* REGS(letter, register_mask) */ REGS('r', ALL_GENERAL_REGS) -REGS('R', ALL_GENERAL_REGS64)REGS ('s' ,ALL_QLDST_REGS ) -REGS('S', ALL_QLDST_REGS64) -REGS ('A' ,TARGET_LONG_BITS ==64 ?ALL_QLDST_REGS64 :ALL_QLDST_REGS )/* * Define constraint letters for constants:
tcg/sparc64/tcg-target.c.inc +41 -68
174 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH 3/3] tcg/sparc64: Remove sparc32plus constraints
Quoted 11 lines · Richard Henderson
With sparc64 we need not distinguish between registers that can hold 32-bit values and those that can hold 64-bit values.
Signed-off-by Richard Henderson <[email protected]>--- tcg/sparc64/tcg-target-con-set.h | 16 +---- tcg/sparc64/tcg-target-con-str.h | 3 - tcg/sparc64/tcg-target.c.inc | 109 ++++++++++++------------------- 3 files changed, 44 insertions(+), 84 deletions(-)
thanks
-- PMM
Ping.
Quoted 29 lines · Richard Henderson
While working on other cleanup/new features wrt calling conventions, I noticed, again, that I am unable to test sparc32plus. The current debian installation in the gcc compile farm is for sparc64, and that is also what gentoo is currently building.
It has been 10 years since qemu dropped support for pure sparc32. I recon it's about time to finish the job.
r~
Richard Henderson (3):
tcg/sparc: Remove support for sparc32plus
tcg/sparc64: Rename from tcg/sparc
tcg/sparc64: Remove sparc32plus constraintsmeson.build | 4 +- tcg/{sparc => sparc64}/tcg-target-con-set.h | 16 +- tcg/{sparc => sparc64}/tcg-target-con-str.h | 3 - tcg/{sparc => sparc64}/tcg-target.h | 11 - tcg/tcg.c | 75 +----- tcg/{sparc => sparc64}/tcg-target.c.inc | 275 +++++--------------- 6 files changed, 78 insertions(+), 306 deletions(-)rename tcg/{sparc =>
sparc64}/tcg-target-con-set.h(69%) rename tcg/{sparc =>sparc64}/tcg-target-con-str.h(77%) rename tcg/{sparc =>sparc64}/tcg-target.h(95%) rename tcg/{sparc => sparc64}/tcg-target.c.inc (91%)