[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 67/68] target/arm: Clean up disas_thumb_insn
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v2 67/68] target/arm: Clean up disas_thumb_insn |
Date: |
Mon, 19 Aug 2019 14:37:54 -0700 |
Now that everything is converted, remove the rest of
the legacy decode.
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/translate.c | 27 ++-------------------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index f8997a8424..bac38e6261 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -10650,32 +10650,9 @@ static void disas_thumb2_insn(DisasContext *s,
uint32_t insn)
static void disas_thumb_insn(DisasContext *s, uint32_t insn)
{
- if (disas_t16(s, insn)) {
- return;
+ if (!disas_t16(s, insn)) {
+ unallocated_encoding(s);
}
- /* fall back to legacy decoder */
-
- switch (insn >> 12) {
- case 0: case 1: /* add/sub (3reg, 2reg imm), shift imm; in decodetree */
- case 2: case 3: /* add, sub, cmp, mov (reg, imm), in decodetree */
- case 4: /* ldr lit, data proc (2reg), data proc ext, bx; in decodetree */
- case 5: /* load/store register offset, in decodetree */
- case 6: /* load/store word immediate offset, in decodetree */
- case 7: /* load/store byte immediate offset, in decodetree */
- case 8: /* load/store halfword immediate offset, in decodetree */
- case 9: /* load/store from stack, in decodetree */
- case 10: /* add PC/SP (immediate), in decodetree */
- case 11: /* misc, in decodetree */
- case 12: /* load/store multiple, in decodetree */
- case 13: /* conditional branch or swi, in decodetree */
- case 14:
- case 15:
- /* branches, in decodetree */
- goto illegal_op;
- }
- return;
-illegal_op:
- unallocated_encoding(s);
}
static bool insn_crosses_page(CPUARMState *env, DisasContext *s)
--
2.17.1
- [Qemu-devel] [PATCH v2 60/68] target/arm: Convert T16, push and pop, (continued)
- [Qemu-devel] [PATCH v2 60/68] target/arm: Convert T16, push and pop, Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 62/68] target/arm: Convert T16, Miscellaneous 16-bit instructions, Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 64/68] target/arm: Convert T16, load (literal), Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 66/68] target/arm: Convert T16, long branches, Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 67/68] target/arm: Clean up disas_thumb_insn,
Richard Henderson <=
- [Qemu-devel] [PATCH v2 63/68] target/arm: Convert T16, shift immediate, Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 65/68] target/arm: Convert T16, Unconditional branch, Richard Henderson, 2019/08/19
- [Qemu-devel] [PATCH v2 68/68] target/arm: Inline gen_bx_im into callers, Richard Henderson, 2019/08/19
- Re: [Qemu-devel] [PATCH v2 00/68] target/arm: Convert aa32 base isa to decodetree, no-reply, 2019/08/19
- Re: [Qemu-devel] [PATCH v2 00/68] target/arm: Convert aa32 base isa to decodetree, Peter Maydell, 2019/08/27