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é<f4bug@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(-)
+#define MULT_ACC(opcode, gen_helper) \
+static bool trans_##opcode(DisasContext *ctx, arg_r *a) \
+{ \
+ return trans_mult_acc(ctx, a, gen_helper); \
+}