aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-09-23 15:31:34 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-09-23 15:31:34 +0000
commitb2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6 (patch)
treedcce0a20899f83c2f346b284190ee4e27fa15975 /gas/testsuite
parentf4c65163c782969b7998cc5dd93d7d8ce30ad8de (diff)
downloadgdb-b2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6.zip
gdb-b2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6.tar.gz
gdb-b2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6.tar.bz2
* config/tc-arm.c (arm_ext_v6m): New variable.
(arm_ext_m): Add support for OS extension. (arm_ext_os): New variable. (do_t_swi): In v6-M ensure we have the OS extension. (arm_cpus): The cortex-m1 and cortex-m0 options have the OS extension by default. (arm_archs): Add armv6s-m. (arm_extensions): Add 'os' extension. (cpu_arch_ver): Add support for v6S-M. * gas/doc/c-arm.texi: Document the OS Extension, and v6-m and v6s-m architecture options. * gas/testsuite/gas/arm/archv6s-m-bad.d: New test. * gas/testsuite/gas/arm/archv6s-m-bad.l: Likewise. * gas/testsuite/gas/arm/archv6s-m.d: Likewise. * gas/testsuite/gas/arm/archv6s-m.s: Likewise. * gas/testsuite/gas/arm/attr-march-armv6-m+os.d: Likewise. * gas/testsuite/gas/arm/attr-march-armv6s-m.d: Likewise. * include/opcode/arm.h (ARM_EXT_OS): New define. (ARM_AEXT_V6SM): Likewise. (ARM_ARCH_V6SM): Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/arm/archv6s-m-bad.d4
-rw-r--r--gas/testsuite/gas/arm/archv6s-m-bad.l2
-rw-r--r--gas/testsuite/gas/arm/archv6s-m.d9
-rw-r--r--gas/testsuite/gas/arm/archv6s-m.s8
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6-m+os.d14
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv6s-m.d14
7 files changed, 60 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 53a1f1e..e68f070 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+ * gas/arm/archv6s-m-bad.d: New test.
+ * gas/arm/archv6s-m-bad.l: Likewise.
+ * gas/arm/archv6s-m.d: Likewise.
+ * gas/arm/archv6s-m.s: Likewise.
+ * gas/arm/attr-march-armv6-m+os.d: Likewise.
+ * gas/arm/attr-march-armv6s-m.d: Likewise.
+
+2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
* gas/arm/attr-march-all.d: Update for Security Extensions..
* gas/arm/attr-march-armv6k+sec.d: New test.
* gas/arm/attr-march-armv6z.d: Update for Security Extensions.
diff --git a/gas/testsuite/gas/arm/archv6s-m-bad.d b/gas/testsuite/gas/arm/archv6s-m-bad.d
new file mode 100644
index 0000000..d50d34f
--- /dev/null
+++ b/gas/testsuite/gas/arm/archv6s-m-bad.d
@@ -0,0 +1,4 @@
+#name: Valid v6S-M, invalid v6-M
+#as: -march=armv6-m
+#source: archv6s-m.s
+#error-output: archv6s-m-bad.l
diff --git a/gas/testsuite/gas/arm/archv6s-m-bad.l b/gas/testsuite/gas/arm/archv6s-m-bad.l
new file mode 100644
index 0000000..e17420b
--- /dev/null
+++ b/gas/testsuite/gas/arm/archv6s-m-bad.l
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*:7: Error: SVC is not permitted on this architecture
diff --git a/gas/testsuite/gas/arm/archv6s-m.d b/gas/testsuite/gas/arm/archv6s-m.d
new file mode 100644
index 0000000..dd7f12c
--- /dev/null
+++ b/gas/testsuite/gas/arm/archv6s-m.d
@@ -0,0 +1,9 @@
+#name: Valid v6S-M
+#as: -march=armv6s-m
+#objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0[0-9a-f]+ <[^>]+> df00 svc 0
+0[0-9a-f]+ <[^>]+> 46c0 nop.+
diff --git a/gas/testsuite/gas/arm/archv6s-m.s b/gas/testsuite/gas/arm/archv6s-m.s
new file mode 100644
index 0000000..6cd5653
--- /dev/null
+++ b/gas/testsuite/gas/arm/archv6s-m.s
@@ -0,0 +1,8 @@
+ .syntax unified
+ .thumb
+ .text
+ .align 2
+ .global foo
+foo:
+ svc #0
+ nop
diff --git a/gas/testsuite/gas/arm/attr-march-armv6-m+os.d b/gas/testsuite/gas/arm/attr-march-armv6-m+os.d
new file mode 100644
index 0000000..7dd7a73
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6-m+os.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv6-m+os
+# source: blank.s
+# as: -march=armv6-m+os
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6-M"
+ 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/attr-march-armv6s-m.d b/gas/testsuite/gas/arm/attr-march-armv6s-m.d
new file mode 100644
index 0000000..36ac3c8
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv6s-m.d
@@ -0,0 +1,14 @@
+# name: attributes for -march=armv6-m
+# source: blank.s
+# as: -march=armv6-m
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "6-M"
+ Tag_CPU_arch: v6-M
+ Tag_CPU_arch_profile: Microcontroller
+ Tag_THUMB_ISA_use: Thumb-1
+ Tag_DIV_use: Not allowed