[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 09/14] tcg-arm: Simplify logic in detecting t
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 09/14] tcg-arm: Simplify logic in detecting the ARM ISA in use |
Date: |
Thu, 4 Jul 2013 12:22:08 +0100 |
On 3 July 2013 22:29, Richard Henderson <address@hidden> wrote:
> -#if defined(__ARM_ARCH_7__) || \
> - defined(__ARM_ARCH_7A__) || \
> - defined(__ARM_ARCH_7EM__) || \
> - defined(__ARM_ARCH_7M__) || \
> - defined(__ARM_ARCH_7R__)
> -#define USE_ARMV7_INSTRUCTIONS
> +/* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */
> +#ifndef __ARM_ARCH
> +# if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
> + || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
> + || defined(__ARM_ARCH_7EM__)
> +# define __ARM_ARCH 7
> +# elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
> + || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
> + || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)
> +# define __ARM_ARCH 6
> +# elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5E__) \
> + || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) \
> + || defined(__ARM_ARCH_5TEJ__)
> +# define __ARM_ARCH 5
> +# else
> +# define __ARM_ARCH 4
> +# endif
> #endif
>
> -#if defined(USE_ARMV7_INSTRUCTIONS) || \
> - defined(__ARM_ARCH_6J__) || \
> - defined(__ARM_ARCH_6K__) || \
> - defined(__ARM_ARCH_6T2__) || \
> - defined(__ARM_ARCH_6Z__) || \
> - defined(__ARM_ARCH_6ZK__)
> -#define USE_ARMV6_INSTRUCTIONS
> -#endif
> -
> -#if defined(USE_ARMV6_INSTRUCTIONS) || \
> - defined(__ARM_ARCH_5T__) || \
> - defined(__ARM_ARCH_5TE__) || \
> - defined(__ARM_ARCH_5TEJ__)
> -#define USE_ARMV5_INSTRUCTIONS
> -#endif
This change means we now set use_armv5_instructions
for __ARCH_ARCH_5__ and __ARM_ARCH_5E__, which we didn't
before. However one of the things that bool is gating is
whether we use the 'blx' insn, which is ARMv5T and above only.
So this will break v5-but-not-v5T CPUs.
(use_armv6_instructions is similarly now set for __ARCH_ARCH_6__
where it was not before, but none of the things we guard with
that test are insns that aren't in base v6.)
thanks
-- PMM
[Qemu-devel] [PATCH v3 10/14] tcg-arm: Use AT_PLATFORM to detect the host ISA, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 11/14] tcg: Fix high_pc fields in .debug_info, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 12/14] tcg: Move the CIE and FDE header definitions to common code, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 13/14] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size, Richard Henderson, 2013/07/03
[Qemu-devel] [PATCH v3 14/14] tcg-arm: Implement tcg_register_jit, Richard Henderson, 2013/07/03