target/mips: Remove vendor specific CPU definitions
cover target/mips: Remove vendor specific CPU definitions
Trivial patches to sanitize MIPS CPU definitions.
Based-on: mips-next
Philippe Mathieu-Daudé (3):
target/mips: Remove CPU_R5900 definition target/mips: Remove CPU_NANOMIPS32 definition target/mips: Remove vendor specific CPU definitions
target/mips/mips-defs.h | 9 --------- target/mips/cpu-defs.c.inc | 16 +++++++++------- 2 files changed, 9 insertions(+), 16 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/3 target/mips: Remove CPU_R5900 definition
Commit 823f2897bdd ("target/mips: Disable R5900 support") removed the single CPU using the CPU_R5900 definition. As it is unused, remove it.
--- target/mips/mips-defs.h | 1 - 1 file changed, 1 deletion(-)
target/mips/mips-defs.h +0 -1
@@ -61,7 +61,6 @@#define CPU_MIPS4 (CPU_MIPS3 | ISA_MIPS4)#define CPU_MIPS5 (CPU_MIPS4 | ISA_MIPS5)#define CPU_VR54XX (CPU_MIPS4 | INSN_VR54XX) -#define CPU_R5900 (CPU_MIPS3 | INSN_R5900)#define CPU_LOONGSON2E (CPU_MIPS3 | INSN_LOONGSON2E)#define CPU_LOONGSON2F (CPU_MIPS3 | INSN_LOONGSON2F | ASE_LMMI)
Signature · 1 line
2.26.2
PATCH 2/3 target/mips: Remove CPU_NANOMIPS32 definition
In reply to Philippe Mathieu-DaudénanoMIPS not a CPU, but an ISA. The nanoMIPS ISA is already defined as ISA_NANOMIPS32.
Remove this incorrect definition and update the single CPU implementing it, the I7200.
--- target/mips/mips-defs.h | 3 --- target/mips/cpu-defs.c.inc | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-)
target/mips/mips-defs.h +0 -3
@@ -86,9 +86,6 @@#define CPU_MIPS32R6 (CPU_MIPS32R5 | ISA_MIPS_R6)#define CPU_MIPS64R6 (CPU_MIPS64R5 | CPU_MIPS32R6) -/* Wave Computing: "nanoMIPS" */ -#define CPU_NANOMIPS32 (CPU_MIPS32R6 | ISA_NANOMIPS32) -#define CPU_LOONGSON3A (CPU_MIPS64R2 | INSN_LOONGSON3A | ASE_LMMI | ASE_LEXT)/*
target/mips/cpu-defs.c.inc +2 -2
@@ -486,8 +486,8 @@ const mips_def_t mips_defs[] = .CP1_fcr31 = (1 << FCR31_ABS2008) | (1 << FCR31_NAN2008), .SEGBITS = 32, .PABITS = 32, - .insn_flags = CPU_NANOMIPS32 | ASE_DSP | ASE_DSP_R2 | ASE_DSP_R3 | - ASE_MT, + .insn_flags = CPU_MIPS32R6 | ISA_NANOMIPS32 | + ASE_DSP | ASE_DSP_R2 | ASE_DSP_R3 | ASE_MT, .mmu_type = MMU_TYPE_R4000, }, #if defined(TARGET_MIPS64)
Signature · 1 line
2.26.2
PATCH 3/3 target/mips: Remove vendor specific CPU definitions
In reply to Philippe Mathieu-DaudéVendor specific CPU definitions are not very useful. Use the ISA definitions instead, which are more helpful when looking at the various CPU definitions.
--- target/mips/mips-defs.h | 5 ----- target/mips/cpu-defs.c.inc | 12 +++++++----- 2 files changed, 7 insertions(+), 10 deletions(-)
target/mips/mips-defs.h +0 -5
@@ -60,9 +60,6 @@#define CPU_MIPS3 (CPU_MIPS2 | ISA_MIPS3)#define CPU_MIPS4 (CPU_MIPS3 | ISA_MIPS4)#define CPU_MIPS5 (CPU_MIPS4 | ISA_MIPS5) -#define CPU_VR54XX (CPU_MIPS4 | INSN_VR54XX) -#define CPU_LOONGSON2E (CPU_MIPS3 | INSN_LOONGSON2E) -#define CPU_LOONGSON2F (CPU_MIPS3 | INSN_LOONGSON2F | ASE_LMMI)#define CPU_MIPS64 (ISA_MIPS3)
@@ -86,8 +83,6 @@#define CPU_MIPS32R6 (CPU_MIPS32R5 | ISA_MIPS_R6)#define CPU_MIPS64R6 (CPU_MIPS64R5 | CPU_MIPS32R6) -#define CPU_LOONGSON3A (CPU_MIPS64R2 | INSN_LOONGSON3A | ASE_LMMI | ASE_LEXT) -/* * Strictly follow the architecture standard: * - Disallow "special" instruction handling for PMON/SPIM.
target/mips/cpu-defs.c.inc +7 -5
@@ -531,7 +531,7 @@ const mips_def_t mips_defs[] = .CP1_fcr31_rw_bitmask = 0xFF83FFFF, .SEGBITS = 40, .PABITS = 32, - .insn_flags = CPU_VR54XX, + .insn_flags = CPU_MIPS4 | INSN_VR54XX, .mmu_type = MMU_TYPE_R4000, }, {
@@ -781,7 +781,7 @@ const mips_def_t mips_defs[] = .CP1_fcr31_rw_bitmask = 0xFF83FFFF, .SEGBITS = 40, .PABITS = 40, - .insn_flags = CPU_LOONGSON2E, + .insn_flags = CPU_MIPS3 | INSN_LOONGSON2E, .mmu_type = MMU_TYPE_R4000, }, {
@@ -801,7 +801,7 @@ const mips_def_t mips_defs[] = .CP1_fcr31_rw_bitmask = 0xFF83FFFF, .SEGBITS = 40, .PABITS = 40, - .insn_flags = CPU_LOONGSON2F, + .insn_flags = CPU_MIPS3 | INSN_LOONGSON2F | ASE_LMMI, .mmu_type = MMU_TYPE_R4000, }, {
@@ -830,7 +830,8 @@ const mips_def_t mips_defs[] = .CP1_fcr31_rw_bitmask = 0xFF83FFFF, .SEGBITS = 42, .PABITS = 48, - .insn_flags = CPU_LOONGSON3A, + .insn_flags = CPU_MIPS64R2 | INSN_LOONGSON3A | + ASE_LMMI | ASE_LEXT, .mmu_type = MMU_TYPE_R4000, }, {
@@ -887,7 +888,8 @@ const mips_def_t mips_defs[] = .CP1_fcr31_rw_bitmask = 0xFF83FFFF, .SEGBITS = 48, .PABITS = 48, - .insn_flags = CPU_LOONGSON3A, + .insn_flags = CPU_MIPS64R2 | INSN_LOONGSON3A | + ASE_LMMI | ASE_LEXT, .mmu_type = MMU_TYPE_R4000, }, {
Signature · 1 line
2.26.2
Quoted 4 lines · Philippe Mathieu-Daudé
Trivial patches to sanitize MIPS CPU definitions.
Based-on: mips-next
Quoted 9 lines
Philippe Mathieu-Daudé (3):
target/mips: RemoveCPU_R5900definition target/mips: RemoveCPU_NANOMIPS32definition target/mips: Remove vendor specific CPU definitionstarget/mips/mips-defs.h | 9 --------- target/mips/cpu-defs.c.inc | 16 +++++++++------- 2 files changed, 9 insertions(+), 16 deletions(-)
r~
Philippe Mathieu-Daudé
AppliedQuoted 4 lines · Philippe Mathieu-Daudé
Trivial patches to sanitize MIPS CPU definitions.
Based-on: mips-next
Quoted 8 lines
Philippe Mathieu-Daudé (3):
target/mips: RemoveCPU_R5900definition target/mips: RemoveCPU_NANOMIPS32definition target/mips: Remove vendor specific CPU definitionstarget/mips/mips-defs.h | 9 --------- target/mips/cpu-defs.c.inc | 16 +++++++++------- 2 files changed, 9 insertions(+), 16 deletions(-)
Thanks, applied to mips-next.