diff options
author | Mark Shinwell <shinwell@codesourcery.com> | 2007-03-18 16:21:27 +0000 |
---|---|---|
committer | Mark Shinwell <shinwell@codesourcery.com> | 2007-03-18 16:21:27 +0000 |
commit | 8fb9d7b9aa21d34743316ad6f5928d06e9a57e02 (patch) | |
tree | b010e336b2a6302add1f8154a8cbf0eb2c63faf3 | |
parent | d74fb15679686e530b89521a4e96701b53a2f7f0 (diff) | |
download | gdb-8fb9d7b9aa21d34743316ad6f5928d06e9a57e02.zip gdb-8fb9d7b9aa21d34743316ad6f5928d06e9a57e02.tar.gz gdb-8fb9d7b9aa21d34743316ad6f5928d06e9a57e02.tar.bz2 |
gas/
* config/tc-arm.c (do_mul): Don't warn about overlapping
Rd and Rm operands when assembling for v6 or above.
Correctly capitalize register names in the messages.
(do_mlas): Likewise. Delete spurious blank line.
gas/testsuite/
* gas/arm/mul-overlap.s: New.
* gas/arm/mul-overlap.d: New.
* gas/arm/mul-overlap.l: New.
* gas/arm/mul-overlap-v6.s: New.
* gas/arm/mul-overlap-v6.d: New.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 12 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mul-overlap-v6.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mul-overlap-v6.s | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mul-overlap.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mul-overlap.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mul-overlap.s | 9 |
8 files changed, 55 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d8c2bfa..735fd4f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2007-03-18 Mark Shinwell <shinwell@codesourcery.com> + + * config/tc-arm.c (do_mul): Don't warn about overlapping + Rd and Rm operands when assembling for v6 or above. + Correctly capitalize register names in the messages. + (do_mlas): Likewise. Delete spurious blank line. + 2007-03-16 Kazu Hirata <kazu@codesourcery.com> * config/tc-m68k.c (m68k_cpus): Add an entry for fidoa. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index b463d96..aa2ac05 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -7051,17 +7051,16 @@ do_lstc (void) static void do_mlas (void) { - /* This restriction does not apply to mls (nor to mla in v6, but - that's hard to detect at present). */ + /* This restriction does not apply to mls (nor to mla in v6 or later). */ if (inst.operands[0].reg == inst.operands[1].reg + && !ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6) && !(inst.instruction & 0x00400000)) - as_tsktsk (_("rd and rm should be different in mla")); + as_tsktsk (_("Rd and Rm should be different in mla")); inst.instruction |= inst.operands[0].reg << 16; inst.instruction |= inst.operands[1].reg; inst.instruction |= inst.operands[2].reg << 8; inst.instruction |= inst.operands[3].reg << 12; - } static void @@ -7169,8 +7168,9 @@ do_mul (void) inst.instruction |= inst.operands[1].reg; inst.instruction |= inst.operands[2].reg << 8; - if (inst.operands[0].reg == inst.operands[1].reg) - as_tsktsk (_("rd and rm should be different in mul")); + if (inst.operands[0].reg == inst.operands[1].reg + && !ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6)) + as_tsktsk (_("Rd and Rm should be different in mul")); } /* Long Multiply Parser diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e6a5da4..fd8431d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2007-03-18 Mark Shinwell <shinwell@codesourcery.com> + + * gas/arm/mul-overlap.s: New. + * gas/arm/mul-overlap.d: New. + * gas/arm/mul-overlap.l: New. + * gas/arm/mul-overlap-v6.s: New. + * gas/arm/mul-overlap-v6.d: New. + 2007-03-14 Daniel Jacobowitz <dan@codesourcery.com> * gas/arm/thumbver.d, gas/arm/thumbver.s: New test. diff --git a/gas/testsuite/gas/arm/mul-overlap-v6.d b/gas/testsuite/gas/arm/mul-overlap-v6.d new file mode 100644 index 0000000..ff42190 --- /dev/null +++ b/gas/testsuite/gas/arm/mul-overlap-v6.d @@ -0,0 +1,10 @@ +# name: Overlapping multiplication operands for ARMv6 +# objdump: -dr --prefix-addresses --show-raw-insn + +.*: +file format .*arm.* + +Disassembly of section .text: +0[0-9a-f]+ <[^>]+> e0000090 mul r0, r0, r0 +0[0-9a-f]+ <[^>]+> e0202190 mla r0, r0, r1, r2 +0[0-9a-f]+ <[^>]+> e0602190 mls r0, r0, r1, r2 +0[0-9a-f]+ <[^>]+> e12fff1e bx lr diff --git a/gas/testsuite/gas/arm/mul-overlap-v6.s b/gas/testsuite/gas/arm/mul-overlap-v6.s new file mode 100644 index 0000000..478a650 --- /dev/null +++ b/gas/testsuite/gas/arm/mul-overlap-v6.s @@ -0,0 +1,10 @@ + .arch armv6t2 + .text + .align 2 + .global foo + .type foo, %function +foo: + mul r0, r0, r0 + mla r0, r0, r1, r2 + mls r0, r0, r1, r2 + bx lr diff --git a/gas/testsuite/gas/arm/mul-overlap.d b/gas/testsuite/gas/arm/mul-overlap.d new file mode 100644 index 0000000..53406e3 --- /dev/null +++ b/gas/testsuite/gas/arm/mul-overlap.d @@ -0,0 +1,2 @@ +# name: Overlapping multiplication operands without architecture specification +# error-output: mul-overlap.l diff --git a/gas/testsuite/gas/arm/mul-overlap.l b/gas/testsuite/gas/arm/mul-overlap.l new file mode 100644 index 0000000..a9eb4ec --- /dev/null +++ b/gas/testsuite/gas/arm/mul-overlap.l @@ -0,0 +1,3 @@ +[^:]*: Assembler messages: +[^:]*:6: Rd and Rm should be different in mul +[^:]*:7: Rd and Rm should be different in mla diff --git a/gas/testsuite/gas/arm/mul-overlap.s b/gas/testsuite/gas/arm/mul-overlap.s new file mode 100644 index 0000000..854036c --- /dev/null +++ b/gas/testsuite/gas/arm/mul-overlap.s @@ -0,0 +1,9 @@ + .text + .align 2 + .global foo + .type foo, %function +foo: + mul r0, r0, r0 + mla r0, r0, r1, r2 + mls r0, r0, r1, r2 + bx lr |