mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 06:45:33 +00:00
target/arm: Tidy up disas_arm_insn()
The only thing left in the "legacy decoder" is the handling of disas_xscale_insn(), and we can simplify the code. Backports commit 8198c071bc55bee55ef4f104a5b125f541b51096
This commit is contained in:
parent
fc4cc9d95f
commit
c675b73b1f
|
@ -8601,26 +8601,18 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
|
||||||
}
|
}
|
||||||
/* fall back to legacy decoder */
|
/* fall back to legacy decoder */
|
||||||
|
|
||||||
switch ((insn >> 24) & 0xf) {
|
/* TODO: convert xscale/iwmmxt decoder to decodetree ?? */
|
||||||
case 0xc:
|
if (arm_dc_feature(s, ARM_FEATURE_XSCALE)) {
|
||||||
case 0xd:
|
if (((insn & 0x0c000e00) == 0x0c000000)
|
||||||
case 0xe:
|
&& ((insn & 0x03000000) != 0x03000000)) {
|
||||||
{
|
/* Coprocessor insn, coprocessor 0 or 1 */
|
||||||
/* First check for coprocessor space used for XScale/iwMMXt insns */
|
|
||||||
int cpnum = (insn >> 8) & 0xf;
|
|
||||||
|
|
||||||
if (arm_dc_feature(s, ARM_FEATURE_XSCALE) && (cpnum < 2)) {
|
|
||||||
disas_xscale_insn(s, insn);
|
disas_xscale_insn(s, insn);
|
||||||
break;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fall through */
|
illegal_op:
|
||||||
}
|
|
||||||
default:
|
|
||||||
illegal_op:
|
|
||||||
unallocated_encoding(s);
|
unallocated_encoding(s);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool thumb_insn_is_16bit(DisasContext *s, uint32_t pc, uint32_t insn)
|
static bool thumb_insn_is_16bit(DisasContext *s, uint32_t pc, uint32_t insn)
|
||||||
|
|
Loading…
Reference in a new issue