Skip to content

Commit

Permalink
target/mips/mips-defs: Rename ISA_MIPS32R2 as ISA_MIPS_R2
Browse files Browse the repository at this point in the history
The MIPS ISA release 2 is common to 32/64-bit CPUs.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210104221154.3127610-13-f4bug@amsat.org>
  • Loading branch information
philmd committed Jan 14, 2021
1 parent bbd5e4a commit 7a47bae
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion linux-user/mips/cpu_loop.c
Expand Up @@ -384,7 +384,7 @@ void target_cpu_copy_regs(CPUArchState *env, struct target_pt_regs *regs)
prog_req.frdefault &= interp_req.frdefault;
prog_req.fre &= interp_req.fre;

bool cpu_has_mips_r2_r6 = env->insn_flags & ISA_MIPS32R2 ||
bool cpu_has_mips_r2_r6 = env->insn_flags & ISA_MIPS_R2 ||
env->insn_flags & ISA_MIPS32R6;

if (prog_req.fre && !prog_req.frdefault && !prog_req.fr1) {
Expand Down
4 changes: 2 additions & 2 deletions target/mips/cp0_timer.c
Expand Up @@ -44,7 +44,7 @@ static void cpu_mips_timer_update(CPUMIPSState *env)
static void cpu_mips_timer_expire(CPUMIPSState *env)
{
cpu_mips_timer_update(env);
if (env->insn_flags & ISA_MIPS32R2) {
if (env->insn_flags & ISA_MIPS_R2) {
env->CP0_Cause |= 1 << CP0Ca_TI;
}
qemu_irq_raise(env->irq[(env->CP0_IntCtl >> CP0IntCtl_IPTI) & 0x7]);
Expand Down Expand Up @@ -93,7 +93,7 @@ void cpu_mips_store_compare(CPUMIPSState *env, uint32_t value)
if (!(env->CP0_Cause & (1 << CP0Ca_DC))) {
cpu_mips_timer_update(env);
}
if (env->insn_flags & ISA_MIPS32R2) {
if (env->insn_flags & ISA_MIPS_R2) {
env->CP0_Cause &= ~(1 << CP0Ca_TI);
}
qemu_irq_lower(env->irq[(env->CP0_IntCtl >> CP0IntCtl_IPTI) & 0x7]);
Expand Down
2 changes: 1 addition & 1 deletion target/mips/helper.c
Expand Up @@ -431,7 +431,7 @@ void cpu_mips_store_cause(CPUMIPSState *env, target_ulong val)
uint32_t old = env->CP0_Cause;
int i;

if (env->insn_flags & ISA_MIPS32R2) {
if (env->insn_flags & ISA_MIPS_R2) {
mask |= 1 << CP0Ca_DC;
}
if (env->insn_flags & ISA_MIPS32R6) {
Expand Down
2 changes: 1 addition & 1 deletion target/mips/internal.h
Expand Up @@ -407,7 +407,7 @@ static inline void compute_hflags(CPUMIPSState *env)
}

}
if (env->insn_flags & ISA_MIPS32R2) {
if (env->insn_flags & ISA_MIPS_R2) {
if (env->active_fpu.fcr0 & (1 << FCR0_F64)) {
env->hflags |= MIPS_HFLAG_COP1X;
}
Expand Down
4 changes: 2 additions & 2 deletions target/mips/mips-defs.h
Expand Up @@ -17,7 +17,7 @@
#define ISA_MIPS4 0x0000000000000008ULL
#define ISA_MIPS5 0x0000000000000010ULL
#define ISA_MIPS_R1 0x0000000000000020ULL
#define ISA_MIPS32R2 0x0000000000000040ULL
#define ISA_MIPS_R2 0x0000000000000040ULL
#define ISA_MIPS32R3 0x0000000000000200ULL
#define ISA_MIPS32R5 0x0000000000000800ULL
#define ISA_MIPS32R6 0x0000000000002000ULL
Expand Down Expand Up @@ -73,7 +73,7 @@
#define CPU_MIPS64R1 (CPU_MIPS5 | CPU_MIPS32R1)

/* MIPS Technologies "Release 2" */
#define CPU_MIPS32R2 (CPU_MIPS32R1 | ISA_MIPS32R2)
#define CPU_MIPS32R2 (CPU_MIPS32R1 | ISA_MIPS_R2)
#define CPU_MIPS64R2 (CPU_MIPS64R1 | CPU_MIPS32R2)

/* MIPS Technologies "Release 3" */
Expand Down

0 comments on commit 7a47bae

Please sign in to comment.