summaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authormgretton <mgretton>2010-11-15 10:03:03 +0000
committermgretton <mgretton>2010-11-15 10:03:03 +0000
commit95e4c1b1c401ee0861a529f6c00c1d11103b148e (patch)
treeefd64fcaefbdcf65e3fe0e4c34852cf36dd323da /gas/testsuite
parent80a0375da9a27b2bce9cec2f9686c4ae57f8bd90 (diff)
downloadbinutils-redhat-95e4c1b1c401ee0861a529f6c00c1d11103b148e.tar.gz
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/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/arm/pr12198-1.d12
-rw-r--r--gas/testsuite/gas/arm/pr12198-1.s7
-rw-r--r--gas/testsuite/gas/arm/pr12198-2.d13
-rw-r--r--gas/testsuite/gas/arm/pr12198-2.s8
5 files changed, 48 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index b2f09dc936..594a5c93a1 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ PR gas/12198
+ * gas/arm/pr12198-1.d: New test.
+ * gas/arm/pr12918-1.s: Likewise.
+ * gas/arm/pr12198-2.d: Likewise.
+ * gas/arm/pr12918-2.s: Likewise.
+
2010-11-13 Richard Sandiford <rdsandiford@googlemail.com>
* gas/mips/elf-rel28.s, gas/mips/elf-rel28-n32.d,
diff --git a/gas/testsuite/gas/arm/pr12198-1.d b/gas/testsuite/gas/arm/pr12198-1.d
new file mode 100644
index 0000000000..c5f7718745
--- /dev/null
+++ b/gas/testsuite/gas/arm/pr12198-1.d
@@ -0,0 +1,12 @@
+# name: PR12198 - Only select v6S-M when v6-M is selected (1)
+# source: pr12198-1.s
+# as:
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_arch: v4T
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_DIV_use: Not allowed
diff --git a/gas/testsuite/gas/arm/pr12198-1.s b/gas/testsuite/gas/arm/pr12198-1.s
new file mode 100644
index 0000000000..15c880551f
--- /dev/null
+++ b/gas/testsuite/gas/arm/pr12198-1.s
@@ -0,0 +1,7 @@
+ .thumb
+ .global f
+ .type f, %function
+f:
+ svc 0xab
+ bx lr
+
diff --git a/gas/testsuite/gas/arm/pr12198-2.d b/gas/testsuite/gas/arm/pr12198-2.d
new file mode 100644
index 0000000000..39465c8883
--- /dev/null
+++ b/gas/testsuite/gas/arm/pr12198-2.d
@@ -0,0 +1,13 @@
+# name: PR12198 - Only select v6S-M when v6-M is selected (2)
+# source: pr12198-2.s
+# as:
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_arch: v6S-M
+ Tag_CPU_arch_profile: Microcontroller
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_DIV_use: Not allowed
diff --git a/gas/testsuite/gas/arm/pr12198-2.s b/gas/testsuite/gas/arm/pr12198-2.s
new file mode 100644
index 0000000000..711cc7ef14
--- /dev/null
+++ b/gas/testsuite/gas/arm/pr12198-2.s
@@ -0,0 +1,8 @@
+ .thumb
+ .global f
+ .type f, %function
+f:
+ svc 0xab
+ dsb
+ bx lr
+