+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.
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
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
+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.
--- /dev/null
+# 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
--- /dev/null
+ .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
--- /dev/null
+# name: Overlapping multiplication operands without architecture specification
+# error-output: mul-overlap.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:6: Rd and Rm should be different in mul
+[^:]*:7: Rd and Rm should be different in mla
--- /dev/null
+ .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