On 14 June 2015 at 20:49, Aurelio C. Remonda <aurelioremo...@gmail.com> wrote: > Created an ARM_FEATURE_THUMB_DSP to be added to any non-M > thumb2-compatible CPU that uses DSP instructions. There are 85 DSP > instructions (all of them thumb2). On disas_thumb2_insn the DSP feature is > tested before the instruction is generated; if it's not enabled then its an > illegal op. > > Signed-off-by: Aurelio C. Remonda <aurelioremo...@gmail.com>
Thanks. There was one bit where you seemed to have only done half of the hoist-decode-into-switch; I'm going to just make the minor fixup (below) as I put this patch into target-arm.next. I also made some minor format fixes (mostly mis-indented "break" statements). I hope that's OK. @@ -9597,12 +9596,25 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw case 0x08: /* rev */ case 0x09: /* rev16 */ case 0x0b: /* revsh */ - break; + case 0x18: /* clz */ + break; case 0x10: /* sel */ if (!arm_dc_feature(s, ARM_FEATURE_THUMB_DSP)) { goto illegal_op; } - break; + break; + case 0x20: /* crc32/crc32c */ + case 0x21: + case 0x22: + case 0x28: + case 0x29: + case 0x2a: + if (!arm_dc_feature(s, ARM_FEATURE_CRC)) { + goto illegal_op; + } + break; + default: + goto illegal_op; } tmp = load_reg(s, rn); switch (op) { -- PMM