Specify a necessary fixed bit for VLD3DUP, and otherwise rearrange the Thumb2 NEON decoding hooks to bring us closer to correctness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2011-08-15 23:38:54 +00:00
parent 8400bfe9fa
commit ef2865a8ea
3 changed files with 27 additions and 20 deletions

View File

@ -494,7 +494,28 @@ bool ThumbDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
}
MI.clear();
result = decodeNEONDupInstruction32(MI, insn32, Address, this);
if (result) {
Size = 4;
AddThumbPredicate(MI);
return true;
}
if (fieldFromInstruction32(insn32, 24, 8) == 0xF9) {
MI.clear();
uint32_t NEONLdStInsn = insn32;
NEONLdStInsn &= 0xF0FFFFFF;
NEONLdStInsn |= 0x04000000;
result = decodeNEONLoadStoreInstruction32(MI, NEONLdStInsn, Address, this);
if (result) {
Size = 4;
AddThumbPredicate(MI);
return true;
}
}
if (fieldFromInstruction32(insn32, 24, 4) == 0xF) {
MI.clear();
uint32_t NEONDataInsn = insn32;
NEONDataInsn &= 0xF0FFFFFF; // Clear bits 27-24
NEONDataInsn |= (NEONDataInsn & 0x10000000) >> 4; // Move bit 28 to bit 24
@ -507,22 +528,6 @@ bool ThumbDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
}
}
MI.clear();
result = decodeNEONLoadStoreInstruction32(MI, insn32, Address, this);
if (result) {
Size = 4;
AddThumbPredicate(MI);
return true;
}
MI.clear();
result = decodeNEONDupInstruction32(MI, insn32, Address, this);
if (result) {
Size = 4;
AddThumbPredicate(MI);
return true;
}
return false;
}