[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 03/13] target/mips: Rewrite complex ifdef'ry
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v5 03/13] target/mips: Rewrite complex ifdef'ry |
Date: |
Fri, 26 Feb 2021 10:31:00 +0100 |
No need for this obfuscated ifdef'ry, KISS.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/translate.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 70891c37cdd..1f1c5f33c87 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -28276,13 +28276,16 @@ static bool decode_opc_legacy(CPUMIPSState *env,
DisasContext *ctx)
#if defined(TARGET_MIPS64)
if ((ctx->insn_flags & INSN_R5900) && (ctx->insn_flags & ASE_MMI)) {
decode_mmi(env, ctx);
-#else
+ break;
+ }
+#endif
+#if !defined(TARGET_MIPS64)
if (ctx->insn_flags & ASE_MXU) {
decode_opc_mxu(env, ctx);
-#endif
- } else {
- decode_opc_special2_legacy(env, ctx);
+ break;
}
+#endif
+ decode_opc_special2_legacy(env, ctx);
break;
case OPC_SPECIAL3:
#if defined(TARGET_MIPS64)
--
2.26.2
- [PATCH v5 00/13] target/mips: Extract MXU code to new mxu_translate.c file, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 01/13] target/mips/meson: Introduce mips_tcg source set, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 02/13] target/mips/meson: Restrict mips-semi.c to TCG, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 03/13] target/mips: Rewrite complex ifdef'ry,
Philippe Mathieu-Daudé <=
- [PATCH v5 04/13] target/mips: Remove XBurst Media eXtension Unit dead code, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 06/13] target/mips: Pass instruction opcode to decode_opc_mxu(), Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 05/13] target/mips: Remove unused CPUMIPSState* from MXU functions, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 07/13] target/mips: Use OPC_MUL instead of OPC__MXU_MUL, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 08/13] target/mips: Move MUL opcode check from decode_mxu() to decode_legacy(), Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 09/13] target/mips: Rename decode_opc_mxu() as decode_ase_mxu(), Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 10/13] target/mips: Convert decode_ase_mxu() to decodetree prototype, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 11/13] target/mips: Simplify decode_opc_mxu() ifdef'ry, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 12/13] target/mips: Introduce mxu_translate_init() helper, Philippe Mathieu-Daudé, 2021/02/26
- [PATCH v5 13/13] target/mips: Extract MXU code to new mxu_translate.c file, Philippe Mathieu-Daudé, 2021/02/26