Browse Source
(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.binutils-2_21-branch
12 changed files with 112 additions and 10 deletions
@ -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 |
|||
@ -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 |
|||
@ -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 |
|||
Loading…
Reference in new issue