On 8/1/21 1:59 PM, Philippe Mathieu-Daudé wrote:
Convert the following Integer Multiply-Accumulate opcodes:
* MACC Multiply, accumulate, and move LO
* MACCHI Multiply, accumulate, and move HI
* MACCHIU Unsigned multiply, accumulate, and move HI
* MACCU Unsigned multiply, accumulate, and move LO
Since all opcodes are generated using the same pattern, we
add the gen_helper_mult_acc_t typedef and MULT_ACC() macro
to remove boilerplate code.
Signed-off-by: Philippe Mathieu-Daudé<f4...@amsat.org>
---
target/mips/tcg/vr54xx.decode | 9 +++++++
target/mips/tcg/translate.c | 16 ------------
target/mips/tcg/vr54xx_translate.c | 40 ++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 16 deletions(-)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
+#define MULT_ACC(opcode, gen_helper) \
+static bool trans_##opcode(DisasContext *ctx, arg_r *a) \
+{ \
+ return trans_mult_acc(ctx, a, gen_helper); \
+}
Perhaps copy the TRANS macro from ppc/translate.c, so we don't have to have so many
single-use macros like this?
r~