llvm.org GIT mirror llvm / 24b9f25
Diagnose invalid alignments on duplicating VLDn instructions. Patch by Chris Lidbury. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163323 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 7 years ago
3 changed file(s) with 10 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
27002700 unsigned align = fieldFromInstruction(Insn, 4, 1);
27012701 unsigned size = fieldFromInstruction(Insn, 6, 2);
27022702
2703 if (size == 0 && align == 1)
2704 return MCDisassembler::Fail;
27032705 align *= (1 << size);
27042706
27052707 switch (Inst.getOpcode()) {
28302832 unsigned align = fieldFromInstruction(Insn, 4, 1);
28312833
28322834 if (size == 0x3) {
2835 if (align == 0)
2836 return MCDisassembler::Fail;
28332837 size = 4;
28342838 align = 16;
28352839 } else {
None # RUN: llvm-mc --disassemble %s -triple=armv7-unknown-unknwon -mcpu=cortex-a8 2>&1 | grep "invalid instruction encoding"
1 # XFAIL: *
0 # RUN: llvm-mc --disassemble %s -triple=armv7-unknown-unknwon -mcpu=cortex-a8 2>&1 | FileCheck %s
21
32 # Opcode=737 Name=VLD1DUPq8_UPD Format=ARM_FORMAT_NLdSt(30)
43 # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
87 #
98 # 'a' == 1 and data_size == 8 is invalid
109 0x3d 0x3c 0xa0 0xf4
10 # CHECK: invalid instruction encoding
0 # RUN: llvm-mc -triple thumbv7 -show-encoding -disassemble < %s 2>&1 | FileCheck %s
1
2 0xa0 0xf9 0xc0 0x0f
3 # CHECK: invalid instruction encoding