[ARM] Optional -mthumb for Thumb only targets
authorThomas Preud'homme <thopre01@gcc.gnu.org>
Fri, 18 Nov 2016 16:45:37 +0000 (16:45 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Fri, 18 Nov 2016 16:45:37 +0000 (16:45 +0000)
commit70e73d3c4277fa602999b3e3c104a06024932c70
tree0738e0d3eecf68cd9832d1f205bfb9fe3d9ae111
parent05237cf81e0b0bb1c530d4fc46566e25c513730f
[ARM] Optional -mthumb for Thumb only targets

2016-11-18  Terry Guo  <terry.guo@arm.com>
            Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * common/config/arm/arm-common.c (arm_target_thumb_only): New function.
    * config/arm/arm-opts.h: Include arm-flags.h.
    (struct arm_arch_core_flag): Define.
    (arm_arch_core_flags): Define.
    * config/arm/arm-protos.h: Include arm-flags.h
    (FL_NONE, FL_ANY, FL_CO_PROC, FL_ARCH3M, FL_MODE26, FL_MODE32,
    FL_ARCH4, FL_ARCH5, FL_THUMB, FL_LDSCHED, FL_STRONG, FL_ARCH5E,
    FL_XSCALE, FL_ARCH6, FL_VFPV2, FL_WBUF, FL_ARCH6K, FL_THUMB2, FL_NOTM,
    FL_THUMB_DIV, FL_VFPV3, FL_NEON, FL_ARCH7EM, FL_ARCH7, FL_ARM_DIV,
    FL_ARCH8, FL_CRC32, FL_SMALLMUL, FL_NO_VOLATILE_CE, FL_IWMMXT,
    FL_IWMMXT2, FL_ARCH6KZ, FL2_ARCH8_1, FL2_ARCH8_2, FL2_FP16INST,
    FL_TUNE, FL_FOR_ARCH2, FL_FOR_ARCH3, FL_FOR_ARCH3M, FL_FOR_ARCH4,
    FL_FOR_ARCH4T, FL_FOR_ARCH5, FL_FOR_ARCH5T, FL_FOR_ARCH5E,
    FL_FOR_ARCH5TE, FL_FOR_ARCH5TEJ, FL_FOR_ARCH6, FL_FOR_ARCH6J,
    FL_FOR_ARCH6K, FL_FOR_ARCH6Z, FL_FOR_ARCH6ZK, FL_FOR_ARCH6KZ,
    FL_FOR_ARCH6T2, FL_FOR_ARCH6M, FL_FOR_ARCH7, FL_FOR_ARCH7A,
    FL_FOR_ARCH7VE, FL_FOR_ARCH7R, FL_FOR_ARCH7M, FL_FOR_ARCH7EM,
    FL_FOR_ARCH8A, FL2_FOR_ARCH8_1A, FL2_FOR_ARCH8_2A, FL_FOR_ARCH8M_BASE,
    FL_FOR_ARCH8M_MAIN, arm_feature_set, ARM_FSET_MAKE,
    ARM_FSET_MAKE_CPU1, ARM_FSET_MAKE_CPU2, ARM_FSET_CPU1, ARM_FSET_CPU2,
    ARM_FSET_EMPTY, ARM_FSET_ANY, ARM_FSET_HAS_CPU1, ARM_FSET_HAS_CPU2,
    ARM_FSET_HAS_CPU, ARM_FSET_ADD_CPU1, ARM_FSET_ADD_CPU2,
    ARM_FSET_DEL_CPU1, ARM_FSET_DEL_CPU2, ARM_FSET_UNION, ARM_FSET_INTER,
    ARM_FSET_XOR, ARM_FSET_EXCLUDE, ARM_FSET_IS_EMPTY,
    ARM_FSET_CPU_SUBSET): Move to ...
    * config/arm/arm-flags.h: This new file.
    * config/arm/arm.h (TARGET_MODE_SPEC_FUNCTIONS): Define.
    (EXTRA_SPEC_FUNCTIONS): Add TARGET_MODE_SPEC_FUNCTIONS to its value.
    (TARGET_MODE_SPECS): Define.
    (DRIVER_SELF_SPECS): Add TARGET_MODE_SPECS to its value.

    gcc/testsuite/
    * gcc.target/arm/optional_thumb-1.c: New test.
    * gcc.target/arm/optional_thumb-2.c: New test.
    * gcc.target/arm/optional_thumb-3.c: New test.

From-SVN: r242597
gcc/ChangeLog
gcc/common/config/arm/arm-common.c
gcc/config/arm/arm-flags.h [new file with mode: 0644]
gcc/config/arm/arm-opts.h
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/optional_thumb-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/optional_thumb-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/optional_thumb-3.c [new file with mode: 0644]