diff options
author | Philippe Mathieu-Daudé | 2021-02-24 18:58:26 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2021-03-13 23:42:58 +0100 |
commit | c7abe00ae9336892ae615fbc39157ba110d1716b (patch) | |
tree | f9b175373d896bf99742e966e77cd82821a2dc07 /target | |
parent | target/mips: Convert decode_ase_mxu() to decodetree prototype (diff) | |
download | qemu-c7abe00ae9336892ae615fbc39157ba110d1716b.tar.gz qemu-c7abe00ae9336892ae615fbc39157ba110d1716b.tar.xz qemu-c7abe00ae9336892ae615fbc39157ba110d1716b.zip |
target/mips: Simplify decode_opc_mxu() ifdef'ry
By making the prototype public and checking
'TARGET_LONG_BITS == 32' we let the compiler
elide the decode_opc_mxu() call.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210226093111.3865906-12-f4bug@amsat.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/mips/translate.c | 6 | ||||
-rw-r--r-- | target/mips/translate.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c index 99269cd669..2139109744 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -25779,7 +25779,7 @@ static void decode_opc_mxu__pool19(DisasContext *ctx) /* * Main MXU decoding function */ -static bool decode_ase_mxu(DisasContext *ctx, uint32_t insn) +bool decode_ase_mxu(DisasContext *ctx, uint32_t insn) { uint32_t opcode = extract32(insn, 0, 6); @@ -26981,8 +26981,7 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx) break; } #endif -#if !defined(TARGET_MIPS64) - if (ctx->insn_flags & ASE_MXU) { + if (TARGET_LONG_BITS == 32 && (ctx->insn_flags & ASE_MXU)) { if (MASK_SPECIAL2(ctx->opcode) == OPC_MUL) { gen_arith(ctx, OPC_MUL, rd, rs, rt); } else { @@ -26990,7 +26989,6 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx) } break; } -#endif decode_opc_special2_legacy(env, ctx); break; case OPC_SPECIAL3: diff --git a/target/mips/translate.h b/target/mips/translate.h index 468e29d757..a5c49f1ee2 100644 --- a/target/mips/translate.h +++ b/target/mips/translate.h @@ -178,6 +178,9 @@ extern TCGv bcond; /* MSA */ void msa_translate_init(void); +/* MXU */ +bool decode_ase_mxu(DisasContext *ctx, uint32_t insn); + /* decodetree generated */ bool decode_isa_rel6(DisasContext *ctx, uint32_t insn); bool decode_ase_msa(DisasContext *ctx, uint32_t insn); |