summaryrefslogtreecommitdiffstats
path: root/target/mips
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-07-29 16:02:57 +0200
committerPhilippe Mathieu-Daudé2021-08-25 13:00:37 +0200
commit2e176eaf9c54a23ea2f37ccbeef2045f422b0e30 (patch)
tree7d9f987bdfc44ae85fc9393369a52878fb39b097 /target/mips
parenttarget/mips: Remove JR opcode unused arguments (diff)
downloadqemu-2e176eaf9c54a23ea2f37ccbeef2045f422b0e30.tar.gz
qemu-2e176eaf9c54a23ea2f37ccbeef2045f422b0e30.tar.xz
qemu-2e176eaf9c54a23ea2f37ccbeef2045f422b0e30.zip
target/mips: Simplify PREF opcode
check_insn() checks for any bit in the set, and INSN_R5900 is just another bit added to the set. No need to special-case it. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210801234202.3167676-2-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/mips')
-rw-r--r--target/mips/tcg/translate.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index bf71724f3f..6b95cca052 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -15739,12 +15739,8 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx)
/* Treat as NOP. */
break;
case OPC_PREF:
- if (ctx->insn_flags & INSN_R5900) {
- /* Treat as NOP. */
- } else {
- check_insn(ctx, ISA_MIPS4 | ISA_MIPS_R1);
- /* Treat as NOP. */
- }
+ check_insn(ctx, ISA_MIPS4 | ISA_MIPS_R1 | INSN_R5900);
+ /* Treat as NOP. */
break;
/* Floating point (COP1). */