llvm.org GIT mirror llvm / 3f04b50
[ARM] NEON instructions were erroneously decoded from certain invalid encodings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193705 91177308-0d34-0410-b5e6-96231b3b80d8 Artyom Skrobov 6 years ago
2 changed file(s) with 30 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
828828 Check(result, AddThumbPredicate(MI));
829829 return result;
830830 }
831 }
832
833 MI.clear();
834 uint32_t NEONCryptoInsn = insn32;
835 NEONCryptoInsn &= 0xF0FFFFFF; // Clear bits 27-24
836 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4; // Move bit 28 to bit 24
837 NEONCryptoInsn |= 0x12000000; // Set bits 28 and 25
838 result = decodeInstruction(DecoderTablev8Crypto32, MI, NEONCryptoInsn,
839 Address, this, STI);
840 if (result != MCDisassembler::Fail) {
841 Size = 4;
842 return result;
843 }
844
845 MI.clear();
846 uint32_t NEONv8Insn = insn32;
847 NEONv8Insn &= 0xF3FFFFFF; // Clear bits 27-26
848 result = decodeInstruction(DecoderTablev8NEON32, MI, NEONv8Insn, Address,
849 this, STI);
850 if (result != MCDisassembler::Fail) {
851 Size = 4;
852 return result;
831
832 MI.clear();
833 uint32_t NEONCryptoInsn = insn32;
834 NEONCryptoInsn &= 0xF0FFFFFF; // Clear bits 27-24
835 NEONCryptoInsn |= (NEONCryptoInsn & 0x10000000) >> 4; // Move bit 28 to bit 24
836 NEONCryptoInsn |= 0x12000000; // Set bits 28 and 25
837 result = decodeInstruction(DecoderTablev8Crypto32, MI, NEONCryptoInsn,
838 Address, this, STI);
839 if (result != MCDisassembler::Fail) {
840 Size = 4;
841 return result;
842 }
843
844 MI.clear();
845 uint32_t NEONv8Insn = insn32;
846 NEONv8Insn &= 0xF3FFFFFF; // Clear bits 27-26
847 result = decodeInstruction(DecoderTablev8NEON32, MI, NEONv8Insn, Address,
848 this, STI);
849 if (result != MCDisassembler::Fail) {
850 Size = 4;
851 return result;
852 }
853853 }
854854
855855 MI.clear();
3232
3333 0xe0 0xef 0xa1 0x0e
3434 # CHECK: vmull.p64 q8, d16, d17
35
36 # This used to be incorrectly decoded into an sha256h.32 [0x00,0xff,0x40,0x0c]
37 # The other similar encodings are stc2 [0x00,0xfd,0x40,0x0c] and cdp2 [0x00,0xfe,0x40,0x0c]
38 0x00 0xfc 0x40 0x0c
39 # CHECK-NOT: sha256h.32
40 # CHECK-NOT: stc2
41 # CHECK-NOT: cdp2
42