diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-12-08 18:59:36 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-14 17:13:53 +0100 |
commit | 5f21f30d8554b415142473fc4b58be42be193c46 (patch) | |
tree | f765820e0ae196f45ae97d391c02e5be3058c541 /target/mips/msa_translate.c | |
parent | a685f7d075a7ec09575cbb836cf07b64ae313e30 (diff) |
target/mips: Introduce decodetree helpers for MSA LSA/DLSA opcodes
Add the LSA opcode to the MSA32 decodetree config, add DLSA
to a new config for the MSA64 ASE, and call decode_msa64()
in the main decode_opc() loop.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201215225757.764263-23-f4bug@amsat.org>
Diffstat (limited to 'target/mips/msa_translate.c')
-rw-r--r-- | target/mips/msa_translate.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/mips/msa_translate.c b/target/mips/msa_translate.c index 8a48f889aa..ae6587edf6 100644 --- a/target/mips/msa_translate.c +++ b/target/mips/msa_translate.c @@ -19,6 +19,7 @@ /* Include the auto-generated decoder. */ #include "decode-msa32.c.inc" +#include "decode-msa64.c.inc" #define OPC_MSA (0x1E << 26) @@ -2266,7 +2267,20 @@ static bool trans_MSA(DisasContext *ctx, arg_MSA *a) return true; } +static bool trans_LSA(DisasContext *ctx, arg_rtype *a) +{ + return gen_lsa(ctx, a->rd, a->rt, a->rs, a->sa); +} + +static bool trans_DLSA(DisasContext *ctx, arg_rtype *a) +{ + return gen_dlsa(ctx, a->rd, a->rt, a->rs, a->sa); +} + bool decode_ase_msa(DisasContext *ctx, uint32_t insn) { + if (TARGET_LONG_BITS == 64 && decode_msa64(ctx, insn)) { + return true; + } return decode_msa32(ctx, insn); } |