Fix a bug in the disassembly of VGETLNs8 where the lane index was wrong.
authorJohnny Chen <johnny.chen@apple.com>
Wed, 6 Apr 2011 18:27:46 +0000 (18:27 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Wed, 6 Apr 2011 18:27:46 +0000 (18:27 +0000)
Also set the encoding bits (for A8.6.303, A8.6.328, A8.6.329) Inst{3-0} = 0b0000,
in class NVLaneOp.

rdar://problem/9240648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129015 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrFormats.td
lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
test/MC/Disassembler/ARM/neon-tests.txt

index f29fddecf15a2f59122809e0adae9e39c1894b13..f5fb98ece4af78b1e935f1a3dbf7b70b8f649255 100644 (file)
@@ -1850,6 +1850,8 @@ class NVLaneOp<bits<8> opcod1, bits<4> opcod2, bits<2> opcod3,
   let Inst{11-8}  = opcod2;
   let Inst{6-5}   = opcod3;
   let Inst{4}     = 1;
+  // A8.6.303, A8.6.328, A8.6.329
+  let Inst{3-0}   = 0b0000;
 
   let OutOperandList = oops;
   let InOperandList = !con(iops, (ins pred:$p));
index 509a01949d5b2414edd681861b4d7310c7c497c9..5ac0819fd45c0d1efea724196fec6a32f84f3898 100644 (file)
@@ -3037,7 +3037,7 @@ static bool DisassembleNGetLnFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
   ElemSize esize =
     Opcode == ARM::VGETLNi32 ? ESize32
       : ((Opcode == ARM::VGETLNs16 || Opcode == ARM::VGETLNu16) ? ESize16
-                                                                : ESize32);
+                                                                : ESize8);
 
   // Rt = Inst{15-12} => ARM Rd
   MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
index 2a50cc5e2f3ee93018a194bac809d435aa7cd945..b08b9ddc5f11dd3265980b5635cea896f93874a1 100644 (file)
@@ -71,3 +71,6 @@
 
 # CHECK:       vst2.32 {d16, d18}, [r2, :64], r2
 0x92 0x9 0x42 0xf4
+
+# CHECK:       vmov.s8 r0, d8[1]
+0x30 0x0b 0x58 0xee