diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2018-01-15 14:09:28 +0000 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2018-01-15 14:09:28 +0000 |
commit | df9909b8675c8c9b6fa88c5d13afd2efa66dcf68 (patch) | |
tree | a1ee9bb0064ed3520f45d008dfe879e14a346371 /gas/config | |
parent | d726cb5d3784f7ed96318a2214ea777a86f9faad (diff) | |
download | gdb-df9909b8675c8c9b6fa88c5d13afd2efa66dcf68.zip gdb-df9909b8675c8c9b6fa88c5d13afd2efa66dcf68.tar.gz gdb-df9909b8675c8c9b6fa88c5d13afd2efa66dcf68.tar.bz2 |
[ARM] No IT usage deprecation for ARMv8-M
Deprecations related to the use of the IT instruction introduced in
Armv8-A do not apply to Armv8-M Baseline and mainline. However the
warning logic do not distinguish between the various profiles and warn
whenever the architecture version is 8.
This patch adds a check to exclude M profile architectures from this
warning. This works as expected when -march is specified on the
command-line or a .arch/.cpu directive exist. However, in autodetection
mode the CPU/architecture targeted is only known once the instructions
have been all processed but this code is run when IT instruction is
processed. It is therefore not possible to distinguish between Armv8-M
and Armv8-A in that mode.
The approach chosen here is not to warn in autodetection mode. The udf.d
testcase that relied on that behavior to test deprecation warning for
Armv8-A is therefore updated to explicitely pass -march=armv8-a.
2018-01-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
gas/
* config/tc-arm.c (it_fsm_post_encode): Do not warn if targeting M
profile architecture or if in autodetection mode. Clarify that
deprecation is for performance reason and concerns Armv8-A and Armv8-R.
* testsuite/gas/arm/armv8-ar-bad.l: Adapt to new IT deprecation warning
message.
* testsuite/gas/arm/armv8-ar-it-bad.l: Likewise.
* testsuite/gas/arm/sp-pc-validations-bad-t-v8a.l: Likewise.
* testsuite/gas/arm/udf.l: Likewise.
* testsuite/gas/arm/udf.d: Assemble for Armv8-A explicitely.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 0e16688..c07362a 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -18559,12 +18559,13 @@ it_fsm_post_encode (void) if (now_it.insn_cond && !now_it.warn_deprecated && warn_on_deprecated - && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8)) + && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v8) + && !ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_m)) { if (inst.instruction >= 0x10000) { as_tsktsk (_("IT blocks containing 32-bit Thumb instructions are " - "deprecated in ARMv8")); + "performance deprecated in ARMv8-A and ARMv8-R")); now_it.warn_deprecated = TRUE; } else @@ -18575,9 +18576,10 @@ it_fsm_post_encode (void) { if ((inst.instruction & p->mask) == p->pattern) { - as_tsktsk (_("IT blocks containing 16-bit Thumb instructions " - "of the following class are deprecated in ARMv8: " - "%s"), p->description); + as_tsktsk (_("IT blocks containing 16-bit Thumb " + "instructions of the following class are " + "performance deprecated in ARMv8-A and " + "ARMv8-R: %s"), p->description); now_it.warn_deprecated = TRUE; break; } @@ -18589,7 +18591,8 @@ it_fsm_post_encode (void) if (now_it.block_length > 1) { as_tsktsk (_("IT blocks containing more than one conditional " - "instruction are deprecated in ARMv8")); + "instruction are performance deprecated in ARMv8-A and " + "ARMv8-R")); now_it.warn_deprecated = TRUE; } } |