qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target/arm: Allow ARMv6-M Thumb2 instructions


From: Julia Suvorova
Subject: Re: [Qemu-devel] [PATCH] target/arm: Allow ARMv6-M Thumb2 instructions
Date: Sun, 17 Jun 2018 21:48:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 17.06.2018 19:33, Peter Maydell wrote:
On 17 June 2018 at 06:36, Richard Henderson
<address@hidden> wrote:
On 06/15/2018 12:55 AM, Peter Maydell wrote:
+    uint32_t armv6m_insn[] = {0xf3808000 /* msr */, 0xf3b08040 /* dsb */,
+                              0xf3b08050 /* dmb */, 0xf3b08060 /* isb */,
+                              0xf3e08000 /* mrs */, 0xf000d000 /* bl */};
+    uint32_t armv6m_mask[] = {0xffe0d000, 0xfff0d0f0, 0xfff0d0f0,
+                              0xfff0d0f0, 0xffe0d000, 0xf800d000};
I think these arrays should be 'const'; we can also move them closer
to their point of use, inside the scope of the if() below.

static as well.

Mmm; commit is already in master though, will need a followup patch.

I can make it if you wish.
In addition, we can simplify following "if" by removing ARM_FEATURE_V6
since V7M and V8M define V6:

    if (!arm_dc_feature(s, ARM_FEATURE_V7) &&
        !(arm_dc_feature(s, ARM_FEATURE_V6) &&
          arm_dc_feature(s, ARM_FEATURE_M))) {
        goto illegal_op;
    }

Like this:

    if (!arm_dc_feature(s, ARM_FEATURE_V7) &&
        !arm_dc_feature(s, ARM_FEATURE_M)) {
        goto illegal_op;
    }

What do you think?

Best regards, Julia Suvorova.



reply via email to

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