diff options
author | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2010-11-15 10:03:05 +0000 |
---|---|---|
committer | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2010-11-15 10:03:05 +0000 |
commit | 251665fc5f2083d8ca987a30534918fec6b3b969 (patch) | |
tree | def0a81480e42d68e698e8f66d1fc968c8740900 /gas/config/tc-arm.c | |
parent | 6936240e66f9641073c9a399bb1c0e20bbde7f97 (diff) | |
download | gdb-251665fc5f2083d8ca987a30534918fec6b3b969.zip gdb-251665fc5f2083d8ca987a30534918fec6b3b969.tar.gz gdb-251665fc5f2083d8ca987a30534918fec6b3b969.tar.bz2 |
PR gas/12198
* gas/config/tc-arm.c (arm_arch_v6m_only): New variable.
(aeabi_set_public_attributes): Ensure we only set the Operating System
Extension when we are on an M-profile core.
* gas/testsuite/gas/arm/pr12198-1.d: New test.
* gas/testsuite/gas/arm/pr12918-1.s: Likewise.
* gas/testsuite/gas/arm/pr12198-2.d: Likewise.
* gas/testsuite/gas/arm/pr12918-2.s: Likewise.
* include/opcode/arm.h (ARM_AEXT_V6M_ONLY): New define.
(ARM_AEXT_V6M): Rewrite in terms of ARM_AEXT_V6M_ONLY.
(ARM_ARCH_V6M_ONLY): New define.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 9a87342..f4ebdc4 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -207,6 +207,7 @@ static const arm_feature_set arm_arch_any = ARM_ANY; static const arm_feature_set arm_arch_full = ARM_FEATURE (-1, -1); static const arm_feature_set arm_arch_t2 = ARM_ARCH_THUMB2; static const arm_feature_set arm_arch_none = ARM_ARCH_NONE; +static const arm_feature_set arm_arch_v6m_only = ARM_ARCH_V6M_ONLY; static const arm_feature_set arm_cext_iwmmxt2 = ARM_FEATURE (0, ARM_CEXT_IWMMXT2); @@ -23232,6 +23233,12 @@ aeabi_set_public_attributes (void) ARM_MERGE_FEATURE_SETS (flags, flags, *object_arch); } + /* We need to make sure that the attributes do not identify us as v6S-M + when the only v6S-M feature in use is the Operating System Extensions. */ + if (ARM_CPU_HAS_FEATURE (flags, arm_ext_os)) + if (!ARM_CPU_HAS_FEATURE (flags, arm_arch_v6m_only)) + ARM_CLEAR_FEATURE (flags, flags, arm_ext_os); + tmp = flags; arch = 0; for (p = cpu_arch_ver; p->val; p++) |