From b2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6 Mon Sep 17 00:00:00 2001 From: Matthew Gretton-Dann Date: Thu, 23 Sep 2010 15:31:34 +0000 Subject: * 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. --- gas/testsuite/ChangeLog | 9 +++++++++ gas/testsuite/gas/arm/archv6s-m-bad.d | 4 ++++ gas/testsuite/gas/arm/archv6s-m-bad.l | 2 ++ gas/testsuite/gas/arm/archv6s-m.d | 9 +++++++++ gas/testsuite/gas/arm/archv6s-m.s | 8 ++++++++ gas/testsuite/gas/arm/attr-march-armv6-m+os.d | 14 ++++++++++++++ gas/testsuite/gas/arm/attr-march-armv6s-m.d | 14 ++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 gas/testsuite/gas/arm/archv6s-m-bad.d create mode 100644 gas/testsuite/gas/arm/archv6s-m-bad.l create mode 100644 gas/testsuite/gas/arm/archv6s-m.d create mode 100644 gas/testsuite/gas/arm/archv6s-m.s create mode 100644 gas/testsuite/gas/arm/attr-march-armv6-m+os.d create mode 100644 gas/testsuite/gas/arm/attr-march-armv6s-m.d (limited to 'gas/testsuite') 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 + * 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 + * 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 -- cgit v1.1