* 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.
This commit is contained in:
Mark Shinwell 2007-03-18 16:21:27 +00:00
parent d74fb15679
commit 8fb9d7b9aa
8 changed files with 55 additions and 6 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,2 @@
# name: Overlapping multiplication operands without architecture specification
# error-output: mul-overlap.l

View File

@ -0,0 +1,3 @@
[^:]*: Assembler messages:
[^:]*:6: Rd and Rm should be different in mul
[^:]*:7: Rd and Rm should be different in mla

View File

@ -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