aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>2015-12-17 10:55:54 +0000
committerRamana Radhakrishnan <ramana.radhakrishnan@arm.com>2015-12-17 11:34:39 +0000
commit10c9892b66d56de0aab3fbaec3d59a0304dc0a21 (patch)
tree21bce0e00935ef662b7085b86b240d021d816ac2 /gas
parent0bef0414267e22a1ba581b001836fc800b6370e1 (diff)
downloadgdb-10c9892b66d56de0aab3fbaec3d59a0304dc0a21.zip
gdb-10c9892b66d56de0aab3fbaec3d59a0304dc0a21.tar.gz
gdb-10c9892b66d56de0aab3fbaec3d59a0304dc0a21.tar.bz2
[Patch ARM] Fix build attributes for armv8-a in case of assembler files that contain no directives.
There is currently a problem in the way in which we produce build attributes for simple assembler files that have armv8-a instructions. In these case we need to generate TAG_ISA_THUMB_Use to be Thumb-2 and set the architecture profile to be 'A' rather than not setting architecture profile to be 'A' and setting TAG_ISA_THUMB_Use to be Thumb-1. This is a pre-requisite for any v8-m patches that have been posted. arm-none-eabi gas testsuite run. no regressions. 2015-12-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * gas/config/tc-arm.c (aeabi_set_public_attributes): Adjust TAG_ARCH_profile for armv8-a. * gas/testsuite/gas/arm/armv8a-automatic-hlt.d: New test. * gas/testsuite/gas/arm/armv8a-automatic-hlt.s: New test. * gas/testsuite/gas/arm/armv8a-automatic-lda.d: New test. * gas/testsuite/gas/arm/armv8a-automatic-lda.s: New test.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-arm.c3
-rw-r--r--gas/testsuite/gas/arm/armv8a-automatic-hlt.d8
-rw-r--r--gas/testsuite/gas/arm/armv8a-automatic-hlt.s6
-rw-r--r--gas/testsuite/gas/arm/armv8a-automatic-lda.d8
-rw-r--r--gas/testsuite/gas/arm/armv8a-automatic-lda.s4
5 files changed, 28 insertions, 1 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 6f3f933..f9c76ef 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -25649,7 +25649,8 @@ aeabi_set_public_attributes (void)
aeabi_set_attribute_int (Tag_CPU_arch, arch);
/* Tag_CPU_arch_profile. */
- if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7a))
+ if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7a)
+ || ARM_CPU_HAS_FEATURE (flags, arm_ext_v8))
profile = 'A';
else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7r))
profile = 'R';
diff --git a/gas/testsuite/gas/arm/armv8a-automatic-hlt.d b/gas/testsuite/gas/arm/armv8a-automatic-hlt.d
new file mode 100644
index 0000000..6e8c1db
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv8a-automatic-hlt.d
@@ -0,0 +1,8 @@
+# readelf: -A
+# This test is only valid on ELF based ports.
+#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_arch: v8
+ Tag_CPU_arch_profile: Application
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/armv8a-automatic-hlt.s b/gas/testsuite/gas/arm/armv8a-automatic-hlt.s
new file mode 100644
index 0000000..29dd4ff
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv8a-automatic-hlt.s
@@ -0,0 +1,6 @@
+ .thumb
+ .syntax unified
+ hlt
+ stlexd r0, r2, [r3]
+ sevl
+ hlt 0xf
diff --git a/gas/testsuite/gas/arm/armv8a-automatic-lda.d b/gas/testsuite/gas/arm/armv8a-automatic-lda.d
new file mode 100644
index 0000000..6e8c1db
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv8a-automatic-lda.d
@@ -0,0 +1,8 @@
+# readelf: -A
+# This test is only valid on ELF based ports.
+#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_arch: v8
+ Tag_CPU_arch_profile: Application
+ Tag_THUMB_ISA_use: Thumb-2
diff --git a/gas/testsuite/gas/arm/armv8a-automatic-lda.s b/gas/testsuite/gas/arm/armv8a-automatic-lda.s
new file mode 100644
index 0000000..8e1ca0c
--- /dev/null
+++ b/gas/testsuite/gas/arm/armv8a-automatic-lda.s
@@ -0,0 +1,4 @@
+ .thumb
+ .syntax unified
+ lda r0, [r0]
+ stl r0, [r1]