[llvm-commits] [llvm] r154884 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassembler.cpp test/MC/Disassembler/ARM/neon.txt test/MC/Disassembler/ARM/neont2.txt
Kevin Enderby
enderby at apple.com
Mon Apr 16 17:49:27 PDT 2012
Author: enderby
Date: Mon Apr 16 19:49:27 2012
New Revision: 154884
URL: http://llvm.org/viewvc/llvm-project?rev=154884&view=rev
Log:
Fix ARM disassembly of VLD2 (single 2-element structure to all lanes)
instructions with writebacks. And add test a case for all opcodes handed by
DecodeVLD2DupInstruction() in ARMDisassembler.cpp .
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
llvm/trunk/test/MC/Disassembler/ARM/neon.txt
llvm/trunk/test/MC/Disassembler/ARM/neont2.txt
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=154884&r1=154883&r2=154884&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Mon Apr 16 19:49:27 2012
@@ -2690,7 +2690,6 @@
unsigned Rm = fieldFromInstruction32(Insn, 0, 4);
unsigned align = fieldFromInstruction32(Insn, 4, 1);
unsigned size = 1 << fieldFromInstruction32(Insn, 6, 2);
- unsigned pred = fieldFromInstruction32(Insn, 22, 4);
align *= 2*size;
switch (Inst.getOpcode()) {
@@ -2721,16 +2720,11 @@
return MCDisassembler::Fail;
Inst.addOperand(MCOperand::CreateImm(align));
- if (Rm == 0xD)
- Inst.addOperand(MCOperand::CreateReg(0));
- else if (Rm != 0xF) {
+ if (Rm != 0xD && Rm != 0xF) {
if (!Check(S, DecodeGPRRegisterClass(Inst, Rm, Address, Decoder)))
return MCDisassembler::Fail;
}
- if (!Check(S, DecodePredicateOperand(Inst, pred, Address, Decoder)))
- return MCDisassembler::Fail;
-
return S;
}
Modified: llvm/trunk/test/MC/Disassembler/ARM/neon.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neon.txt?rev=154884&r1=154883&r2=154884&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neon.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neon.txt Mon Apr 16 19:49:27 2012
@@ -2243,3 +2243,40 @@
# CHECK: vld4.16 {d8, d10, d12, d14}, [r4]
0x8f 0x81 0x24 0xf4
# CHECK: vld4.32 {d8, d10, d12, d14}, [r4]
+
+# rdar://11256967
+0x0f 0x0d 0xa2 0xf4
+# CHECK: vld2.8 {d0[], d1[]}, [r2]
+0x4f 0x0d 0xa2 0xf4
+# CHECK: vld2.16 {d0[], d1[]}, [r2]
+0x8f 0x0d 0xa2 0xf4
+# CHECK: vld2.32 {d0[], d1[]}, [r2]
+0x0d 0x0d 0xa2 0xf4
+# CHECK: vld2.8 {d0[], d1[]}, [r2]!
+0x4d 0x0d 0xa2 0xf4
+# CHECK: vld2.16 {d0[], d1[]}, [r2]!
+0x8d 0x0d 0xa2 0xf4
+# CHECK: vld2.32 {d0[], d1[]}, [r2]!
+0x03 0x0d 0xa2 0xf4
+# CHECK: vld2.8 {d0[], d1[]}, [r2], r3
+0x43 0x0d 0xa2 0xf4
+# CHECK: vld2.16 {d0[], d1[]}, [r2], r3
+0x83 0x0d 0xa2 0xf4
+# CHECK: vld2.32 {d0[], d1[]}, [r2], r3
+0x2f 0x0d 0xa3 0xf4
+# CHECK: vld2.8 {d0[], d2[]}, [r3]
+0x6f 0x0d 0xa3 0xf4
+# CHECK: vld2.16 {d0[], d2[]}, [r3]
+0xaf 0x0d 0xa3 0xf4
+# CHECK: vld2.32 {d0[], d2[]}, [r3]
+0x2d 0x0d 0xa3 0xf4
+# CHECK: vld2.8 {d0[], d2[]}, [r3]!
+0x6d 0x0d 0xa3 0xf4
+# CHECK: vld2.16 {d0[], d2[]}, [r3]!
+0xad 0x0d 0xa3 0xf4
+# CHECK: vld2.32 {d0[], d2[]}, [r3]!
+0x24 0x0d 0xa3 0xf4
+# CHECK: vld2.8 {d0[], d2[]}, [r3], r4
+0x64 0x0d 0xa3 0xf4
+0xa4 0x0d 0xa3 0xf4
+# CHECK: vld2.32 {d0[], d2[]}, [r3], r4
Modified: llvm/trunk/test/MC/Disassembler/ARM/neont2.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/neont2.txt?rev=154884&r1=154883&r2=154884&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/neont2.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/neont2.txt Mon Apr 16 19:49:27 2012
@@ -1960,3 +1960,41 @@
# CHECK: vld4.16 {d8, d10, d12, d14}, [r4]
0x24 0xf9 0x8f 0x81
# CHECK: vld4.32 {d8, d10, d12, d14}, [r4]
+
+# rdar://11256967
+0xa2 0xf9 0x0f 0x0d
+# CHECK: vld2.8 {d0[], d1[]}, [r2]
+0xa2 0xf9 0x4f 0x0d
+# CHECK: vld2.16 {d0[], d1[]}, [r2]
+0xa2 0xf9 0x8f 0x0d
+# CHECK: vld2.32 {d0[], d1[]}, [r2]
+0xa2 0xf9 0x0d 0x0d
+# CHECK: vld2.8 {d0[], d1[]}, [r2]!
+0xa2 0xf9 0x4d 0x0d
+# CHECK: vld2.16 {d0[], d1[]}, [r2]!
+0xa2 0xf9 0x8d 0x0d
+# CHECK: vld2.32 {d0[], d1[]}, [r2]!
+0xa2 0xf9 0x03 0x0d
+# CHECK: vld2.8 {d0[], d1[]}, [r2], r3
+0xa2 0xf9 0x43 0x0d
+# CHECK: vld2.16 {d0[], d1[]}, [r2], r3
+0xa2 0xf9 0x83 0x0d
+# CHECK: vld2.32 {d0[], d1[]}, [r2], r3
+0xa3 0xf9 0x2f 0x0d
+# CHECK: vld2.8 {d0[], d2[]}, [r3]
+0xa3 0xf9 0x6f 0x0d
+# CHECK: vld2.16 {d0[], d2[]}, [r3]
+0xa3 0xf9 0xaf 0x0d
+# CHECK: vld2.32 {d0[], d2[]}, [r3]
+0xa3 0xf9 0x2d 0x0d
+# CHECK: vld2.8 {d0[], d2[]}, [r3]!
+0xa3 0xf9 0x6d 0x0d
+# CHECK: vld2.16 {d0[], d2[]}, [r3]!
+0xa3 0xf9 0xad 0x0d
+# CHECK: vld2.32 {d0[], d2[]}, [r3]!
+0xa3 0xf9 0x24 0x0d
+# CHECK: vld2.8 {d0[], d2[]}, [r3], r4
+0xa3 0xf9 0x64 0x0d
+# CHECK: vld2.16 {d0[], d2[]}, [r3], r4
+0xa3 0xf9 0xa4 0x0d
+# CHECK: vld2.32 {d0[], d2[]}, [r3], r4
More information about the llvm-commits
mailing list