diff options
author | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2010-09-23 15:37:45 +0000 |
---|---|---|
committer | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2010-09-23 15:37:45 +0000 |
commit | eea54501f730cf7697d5bce04f634c95a236bfdd (patch) | |
tree | 596566d320432d70f014c8a28de1b995efd5d677 /gas/testsuite | |
parent | b2a5fbdc946c0b4a0032f4d9f8cf23d87f5a2dd6 (diff) | |
download | gdb-eea54501f730cf7697d5bce04f634c95a236bfdd.zip gdb-eea54501f730cf7697d5bce04f634c95a236bfdd.tar.gz gdb-eea54501f730cf7697d5bce04f634c95a236bfdd.tar.bz2 |
* gas/config/tc-arm.c (arm_ext_adiv): New variable.
(do_div): New function.
(insns): Accept UDIV and SDIV in ARM state.
(arm_cpus): The cortex-a15 option has all current v7-A extensions.
(arm_extensions): Add 'idiv' extension.
(aeabi_set_public_attributes): Update Tag_DIV_use values for the
Integer Divide extension.
* gas/doc/c-arm.texi: Document the idiv extension.
* gas/testsuite/gas/arm/armv7-a+idiv.d: New test.
* gas/testsuite/gas/arm/armv7-a+idiv.s: Likewise.
* gas/testsuite/gas/arm/attr-march-all.d: Update for Integer divide extension.
* gas/testsuite/gas/arm/attr-march-armv7-a+idiv.d: New test.
* include/opcode/arm.h (ARM_AEXT_ADIV): New define.
(ARM_ARCH_V7A_IDIV_MP_SEC): Likewise.
* opcodes/arm-dis.c (arm_opcodes): Support disassembly of UDIV and SDIV in
ARM state.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv7-a+idiv.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv7-a+idiv.s | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/attr-march-all.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/attr-march-armv7-a+idiv.d | 15 |
5 files changed, 47 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e68f070..37f8417 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> + * gas/arm/armv7-a+idiv.d: New test. + * gas/arm/armv7-a+idiv.s: Likewise. + * gas/arm/attr-march-all.d: Update for Integer divide extension. + * gas/arm/attr-march-armv7-a+idiv.d: New test. + +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. diff --git a/gas/testsuite/gas/arm/armv7-a+idiv.d b/gas/testsuite/gas/arm/armv7-a+idiv.d new file mode 100644 index 0000000..ba8a2a1 --- /dev/null +++ b/gas/testsuite/gas/arm/armv7-a+idiv.d @@ -0,0 +1,10 @@ +#name: Valid v7-A+IDIV +#objdump: -dr --prefix-addresses --show-raw-insn + +.*: +file format .*arm.* + +Disassembly of section .text: +0[0-9a-f]+ <[^>]+> e730f211 udiv r0, r1, r2 +0[0-9a-f]+ <[^>]+> e710f211 sdiv r0, r1, r2 +0[0-9a-f]+ <[^>]+> fbb1 f0f2 udiv r0, r1, r2 +0[0-9a-f]+ <[^>]+> fb91 f0f2 sdiv r0, r1, r2 diff --git a/gas/testsuite/gas/arm/armv7-a+idiv.s b/gas/testsuite/gas/arm/armv7-a+idiv.s new file mode 100644 index 0000000..eaefde8 --- /dev/null +++ b/gas/testsuite/gas/arm/armv7-a+idiv.s @@ -0,0 +1,14 @@ + .syntax unified + .text + .arch armv7-a + .arch_extension idiv + +foo: + udiv r0, r1, r2 + sdiv r0, r1, r2 + + .thumb + .thumb_func +bar: + udiv r0, r1, r2 + sdiv r0, r1, r2 diff --git a/gas/testsuite/gas/arm/attr-march-all.d b/gas/testsuite/gas/arm/attr-march-all.d index 2c29fff9..a976d04 100644 --- a/gas/testsuite/gas/arm/attr-march-all.d +++ b/gas/testsuite/gas/arm/attr-march-all.d @@ -13,4 +13,5 @@ File Attributes Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-2 Tag_MPextension_use: Allowed + Tag_DIV_use: Allowed in v7-A with integer division extension Tag_Virtualization_use: TrustZone diff --git a/gas/testsuite/gas/arm/attr-march-armv7-a+idiv.d b/gas/testsuite/gas/arm/attr-march-armv7-a+idiv.d new file mode 100644 index 0000000..42ce50e --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv7-a+idiv.d @@ -0,0 +1,15 @@ +# name: attributes for -march=armv7-a+idiv +# source: blank.s +# as: -march=armv7-a+idiv +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "7-A" + Tag_CPU_arch: v7 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_DIV_use: Allowed in v7-A with integer division extension |