Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/arm: Pull calls to disas_sve() and disas_sme() out of legacy d…
…ecoder

The SVE and SME decode is already done by decodetree.  Pull the calls
to these decoders out of the legacy decoder.  This doesn't change
behaviour because all the patterns in sve.decode and sme.decode
already require the bits that the legacy decoder is decoding to have
the correct values.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230512144106.3608981-4-peter.maydell@linaro.org
  • Loading branch information
pm215 committed May 18, 2023
1 parent 8058c83 commit 270076d
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions target/arm/tcg/translate-a64.c
Expand Up @@ -14205,19 +14205,6 @@ static bool btype_destination_ok(uint32_t insn, bool bt, int btype)
static void disas_a64_legacy(DisasContext *s, uint32_t insn)
{
switch (extract32(insn, 25, 4)) {
case 0x0:
if (!extract32(insn, 31, 1) || !disas_sme(s, insn)) {
unallocated_encoding(s);
}
break;
case 0x1: case 0x3: /* UNALLOCATED */
unallocated_encoding(s);
break;
case 0x2:
if (!disas_sve(s, insn)) {
unallocated_encoding(s);
}
break;
case 0x8: case 0x9: /* Data processing - immediate */
disas_data_proc_imm(s, insn);
break;
Expand All @@ -14239,7 +14226,7 @@ static void disas_a64_legacy(DisasContext *s, uint32_t insn)
disas_data_proc_simd_fp(s, insn);
break;
default:
assert(FALSE); /* all 15 cases should be handled above */
unallocated_encoding(s);
break;
}
}
Expand Down Expand Up @@ -14445,8 +14432,9 @@ static void aarch64_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
disas_sme_fa64(s, insn);
}


if (!disas_a64(s, insn)) {
if (!disas_a64(s, insn) &&
!disas_sme(s, insn) &&
!disas_sve(s, insn)) {
disas_a64_legacy(s, insn);
}

Expand Down

0 comments on commit 270076d

Please sign in to comment.