aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-12-06 05:03:45 +0000
committerJim Grosbach <grosbach@apple.com>2011-12-06 05:03:45 +0000
commitcf9814ddd277dfcbb4ec5727e2cb510b8a451e04 (patch)
tree8af16d3b47235ff4d9c5a97b5fd5400ea2f52d2d
parent1ff73d7a67e4a5bc464523cd1dd7ed3f20baf85b (diff)
Thumb2: MUL two-operand form encoding operand order fix.
Fix the alias to encode 'mul r5, r6' as if it were 'mul r5, r6, r5' so we match gas. rdar://10532439 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145922 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td2
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td
index 6129fa307c..f204f0d9e8 100644
--- a/lib/Target/ARM/ARMInstrThumb2.td
+++ b/lib/Target/ARM/ARMInstrThumb2.td
@@ -4088,4 +4088,4 @@ def : t2InstAlias<"mov${p} $Rd, $imm",
// Wide 'mul' encoding can be specified with only two operands.
def : t2InstAlias<"mul${p} $Rn, $Rm",
- (t2MUL rGPR:$Rn, rGPR:$Rn, rGPR:$Rm, pred:$p)>;
+ (t2MUL rGPR:$Rn, rGPR:$Rm, rGPR:$Rn, pred:$p)>;
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index 5de5104ac3..e2f7527b6c 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -1236,7 +1236,7 @@ _func:
muleq r3, r4, r5
it le
mulle r4, r4, r8
- mul r6, r5
+ mul r5, r6
@ CHECK: muls r3, r4, r3 @ encoding: [0x63,0x43]
@ CHECK: mul r3, r4, r3 @ encoding: [0x04,0xfb,0x03,0xf3]
@@ -1245,7 +1245,7 @@ _func:
@ CHECK: muleq r3, r4, r5 @ encoding: [0x04,0xfb,0x05,0xf3]
@ CHECK: it le @ encoding: [0xd8,0xbf]
@ CHECK: mulle r4, r4, r8 @ encoding: [0x04,0xfb,0x08,0xf4]
-@ CHECK: mul r6, r6, r5 @ encoding: [0x06,0xfb,0x05,0xf6]
+@ CHECK: mul r5, r6, r5 @ encoding: [0x06,0xfb,0x05,0xf5]
@------------------------------------------------------------------------------