[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-6.2 v3 1/7] target/mips: Introduce generic TRANS() macro for
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-6.2 v3 1/7] target/mips: Introduce generic TRANS() macro for decodetree helpers |
Date: |
Sun, 8 Aug 2021 19:30:12 +0200 |
Plain copy/paste of the TRANS() macro introduced in the PPC
commit f2aabda8ac9 ("target/ppc: Move D/DS/X-form integer
loads to decodetree") to the MIPS target.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/tcg/translate.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index c25fad597d5..791e3e2c7e8 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -202,4 +202,12 @@ bool decode_ext_txx9(DisasContext *ctx, uint32_t insn);
bool decode_ext_tx79(DisasContext *ctx, uint32_t insn);
#endif
+/*
+ * Helpers for implementing sets of trans_* functions.
+ * Defer the implementation of NAME to FUNC, with optional extra arguments.
+ */
+#define TRANS(NAME, FUNC, ...) \
+ static bool trans_##NAME(DisasContext *ctx, arg_##NAME *a) \
+ { return FUNC(ctx, a, __VA_ARGS__); }
+
#endif
--
2.31.1
- [PATCH-for-6.2 v3 0/7] target/mips: Convert NEC Vr54xx to decodetree, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 1/7] target/mips: Introduce generic TRANS() macro for decodetree helpers,
Philippe Mathieu-Daudé <=
- [PATCH-for-6.2 v3 2/7] target/mips: Extract NEC Vr54xx helper definitions, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 3/7] target/mips: Extract NEC Vr54xx helpers to vr54xx_helper.c, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 4/7] target/mips: Introduce decodetree structure for NEC Vr54xx extension, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 5/7] target/mips: Convert Vr54xx MACC* opcodes to decodetree, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 6/7] target/mips: Convert Vr54xx MUL* opcodes to decodetree, Philippe Mathieu-Daudé, 2021/08/08
- [PATCH-for-6.2 v3 7/7] target/mips: Convert Vr54xx MSA* opcodes to decodetree, Philippe Mathieu-Daudé, 2021/08/08
- Re: [PATCH-for-6.2 v3 0/7] target/mips: Convert NEC Vr54xx to decodetree, Philippe Mathieu-Daudé, 2021/08/15