[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] Target-arm: Add the Cortex-M4 CPU
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH V2] Target-arm: Add the Cortex-M4 CPU |
Date: |
Mon, 1 Jun 2015 18:27:03 +0100 |
On 1 June 2015 at 15:33, Aurelio C. Remonda <address@hidden> wrote:
> * Changes in V2: Add the ARM_FEATURE_THUMB_DSP in a separate patch.
> This patch adds the Cortex-M4 CPU. The M4 is basically the same as the M3,
> the main differences being the DSP instructions and an optional FPU.
> I created an ARM_FEATURE_THUMB_DSP to be added to any non-M thumb2-compatible
> CPU that uses DSP instructions, and I manually added it to the M4 in its
> initfn.
>
> Signed-off-by: Aurelio C. Remonda <address@hidden>
> ---
> target-arm/cpu.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 4a888ab..537e6ee 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -533,6 +533,10 @@ static void arm_cpu_realizefn(DeviceState *dev, Error
> **errp)
> if (arm_feature(env, ARM_FEATURE_CBAR_RO)) {
> set_feature(env, ARM_FEATURE_CBAR);
> }
> + if (arm_feature(env, ARM_FEATURE_THUMB2) &&
> + !arm_feature(env, ARM_FEATURE_M)) {
> + set_feature(env, ARM_FEATURE_THUMB_DSP);
> + }
This part needs to go in the other patch, because otherwise
it will break non-M-profile Thumb2 CPUs.
thanks
-- PMM