Commit 52545641 by Thomas Preud'homme Committed by Thomas Preud'homme

arm-protos.h (arm_arch_thumb1): Declare.

2016-05-31  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm-protos.h (arm_arch_thumb1): Declare.
    * config/arm/arm.c (arm_arch_thumb1): Define.
    (arm_option_override): Initialize arm_arch_thumb1.
    * config/arm/arm.h (arm_arch_thumb1): Declare.
    (TARGET_ARM_ARCH_ISA_THUMB): Use arm_arch_thumb to determine if target
    support Thumb-1 ISA.

    gcc/testsuite/
    * gcc.target/arm/armv5_thumb_isa.c: New test.

From-SVN: r236913
parent 4efae2d6
2016-05-31 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/arm-protos.h (arm_arch_thumb1): Declare.
* config/arm/arm.c (arm_arch_thumb1): Define.
(arm_option_override): Initialize arm_arch_thumb1.
* config/arm/arm.h (arm_arch_thumb1): Declare.
(TARGET_ARM_ARCH_ISA_THUMB): Use arm_arch_thumb to determine if target
support Thumb-1 ISA.
2016-05-31 Kirill Yukhin <kirill.yukhin@intel.com>
PR target/71346
......
......@@ -603,6 +603,9 @@ extern int arm_tune_cortex_a9;
interworking clean. */
extern int arm_cpp_interwork;
/* Nonzero if chip supports Thumb 1. */
extern int arm_arch_thumb1;
/* Nonzero if chip supports Thumb 2. */
extern int arm_arch_thumb2;
......
......@@ -847,6 +847,9 @@ int arm_tune_cortex_a9 = 0;
interworking clean. */
int arm_cpp_interwork = 0;
/* Nonzero if chip supports Thumb 1. */
int arm_arch_thumb1;
/* Nonzero if chip supports Thumb 2. */
int arm_arch_thumb2;
......@@ -3165,6 +3168,7 @@ arm_option_override (void)
arm_arch7em = ARM_FSET_HAS_CPU1 (insn_flags, FL_ARCH7EM);
arm_arch8 = ARM_FSET_HAS_CPU1 (insn_flags, FL_ARCH8);
arm_arch8_1 = ARM_FSET_HAS_CPU2 (insn_flags, FL2_ARCH8_1);
arm_arch_thumb1 = ARM_FSET_HAS_CPU1 (insn_flags, FL_THUMB);
arm_arch_thumb2 = ARM_FSET_HAS_CPU1 (insn_flags, FL_THUMB2);
arm_arch_xscale = ARM_FSET_HAS_CPU1 (insn_flags, FL_XSCALE);
......
......@@ -479,6 +479,9 @@ extern int arm_tune_cortex_a9;
interworking clean. */
extern int arm_cpp_interwork;
/* Nonzero if chip supports Thumb 1. */
extern int arm_arch_thumb1;
/* Nonzero if chip supports Thumb 2. */
extern int arm_arch_thumb2;
......@@ -2189,9 +2192,8 @@ extern int making_const_table;
(arm_base_arch) \
/* The highest Thumb instruction set version supported by the chip. */
#define TARGET_ARM_ARCH_ISA_THUMB \
(arm_arch_thumb2 ? 2 \
: ((TARGET_ARM_ARCH >= 5 || arm_arch4t) ? 1 : 0))
#define TARGET_ARM_ARCH_ISA_THUMB \
(arm_arch_thumb2 ? 2 : (arm_arch_thumb1 ? 1 : 0))
/* Expands to an upper-case char of the target's architectural
profile. */
......
2016-05-31 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.target/arm/armv5_thumb_isa.c: New test.
2016-05-31 Kirill Yukhin <kirill.yukhin@intel.com>
PR target/71346
......
/* { dg-require-effective-target arm_arch_v5_ok } */
/* { dg-add-options arm_arch_v5 } */
#if __ARM_ARCH_ISA_THUMB
#error "__ARM_ARCH_ISA_THUMB defined for ARMv5"
#endif
int foo;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment