qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2] Target-arm: Add the THUMB_DSP feature


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH V2] Target-arm: Add the THUMB_DSP feature
Date: Mon, 15 Jun 2015 12:39:36 +0100

On 14 June 2015 at 20:49, Aurelio C. Remonda <address@hidden> 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 <address@hidden>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]