llvm.org GIT mirror llvm / 6340009
[ARM] Fix disassembly for conditional VMRS and VMSR instructions in ARM mode Differential Revision: https://reviews.llvm.org/D38347 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316085 91177308-0d34-0410-b5e6-96231b3b80d8 Andre Vieira 2 years ago
3 changed file(s) with 96 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
53395339 } else
53405340 Check(S, DecodeGPRnopcRegisterClass(Inst, Rt, Address, Decoder));
53415341
5342 Inst.addOperand(MCOperand::createImm(ARMCC::AL));
5343 Inst.addOperand(MCOperand::createReg(0));
5344
5345 return S;
5346 }
5342 if (featureBits[ARM::ModeThumb]) {
5343 Inst.addOperand(MCOperand::createImm(ARMCC::AL));
5344 Inst.addOperand(MCOperand::createReg(0));
5345 } else {
5346 unsigned pred = fieldFromInstruction(Val, 28, 4);
5347 if (!Check(S, DecodePredicateOperand(Inst, pred, Address, Decoder)))
5348 return MCDisassembler::Fail;
5349 }
5350
5351 return S;
5352 }
5757 # CHECK-V8A: vmsr fpsid, r2 @ encoding: [0x10,0x2a,0xe0,0xee]
5858 # CHECK-V8A: vmsr fpscr, r10 @ encoding: [0x10,0xaa,0xe1,0xee]
5959 # CHECK-V8A: vmsr fpscr, sp @ encoding: [0x10,0xda,0xe1,0xee]
60
61 [0x10,0xfa,0xf1,0x0e]
62 [0x10,0xfa,0xf1,0x1e]
63 [0x10,0xfa,0xf1,0x2e]
64 [0x10,0xaa,0xf1,0x3e]
65 [0x10,0x2a,0xf0,0x4e]
66 [0x10,0x3a,0xf0,0x5e]
67 [0x10,0x4a,0xf7,0x6e]
68 [0x10,0x5a,0xf6,0x7e]
69 [0x10,0x6a,0xf5,0x8e]
70 [0x10,0xda,0xf1,0x9e]
71
72 # CHECK-V7A: vmrseq APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x0e]
73 # CHECK-V7A: vmrsne APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x1e]
74 # CHECK-V7A: vmrshs APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x2e]
75 # CHECK-V7A: vmrslo r10, fpscr @ encoding: [0x10,0xaa,0xf1,0x3e]
76 # CHECK-V7A: vmrsmi r2, fpsid @ encoding: [0x10,0x2a,0xf0,0x4e]
77 # CHECK-V7A: vmrspl r3, fpsid @ encoding: [0x10,0x3a,0xf0,0x5e]
78 # CHECK-V7A: vmrsvs r4, mvfr0 @ encoding: [0x10,0x4a,0xf7,0x6e]
79 # CHECK-V7A: vmrsvc r5, mvfr1 @ encoding: [0x10,0x5a,0xf6,0x7e]
80 # ERROR-V7A: invalid instruction encoding
81 # CHECK-V7A: vmrsls sp, fpscr @ encoding: [0x10,0xda,0xf1,0x9e]
82
83 # CHECK-V8A: vmrseq APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x0e]
84 # CHECK-V8A: vmrsne APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x1e]
85 # CHECK-V8A: vmrshs APSR_nzcv, fpscr @ encoding: [0x10,0xfa,0xf1,0x2e]
86 # CHECK-V8A: vmrslo r10, fpscr @ encoding: [0x10,0xaa,0xf1,0x3e]
87 # CHECK-V8A: vmrsmi r2, fpsid @ encoding: [0x10,0x2a,0xf0,0x4e]
88 # CHECK-V8A: vmrspl r3, fpsid @ encoding: [0x10,0x3a,0xf0,0x5e]
89 # CHECK-V8A: vmrsvs r4, mvfr0 @ encoding: [0x10,0x4a,0xf7,0x6e]
90 # CHECK-V8A: vmrsvc r5, mvfr1 @ encoding: [0x10,0x5a,0xf6,0x7e]
91 # CHECK-V8A: vmrshi r6, mvfr2 @ encoding: [0x10,0x6a,0xf5,0x8e]
92 # CHECK-V8A: vmrsls sp, fpscr @ encoding: [0x10,0xda,0xf1,0x9e]
93
94 [0x10,0x0a,0xe1,0xae]
95 [0x10,0x1a,0xe8,0xbe]
96 [0x10,0x2a,0xe0,0xce]
97 [0x10,0xaa,0xe1,0xde]
98 [0x10,0xda,0xe1,0x0e]
99
100 # CHECK-V7A: vmsrge fpscr, r0 @ encoding: [0x10,0x0a,0xe1,0xae]
101 # CHECK-V7A: vmsrlt fpexc, r1 @ encoding: [0x10,0x1a,0xe8,0xbe]
102 # CHECK-V7A: vmsrgt fpsid, r2 @ encoding: [0x10,0x2a,0xe0,0xce]
103 # CHECK-V7A: vmsrle fpscr, r10 @ encoding: [0x10,0xaa,0xe1,0xde]
104 # CHECK-V7A: vmsreq fpscr, sp @ encoding: [0x10,0xda,0xe1,0x0e]
105
106 # CHECK-V8A: vmsrge fpscr, r0 @ encoding: [0x10,0x0a,0xe1,0xae]
107 # CHECK-V8A: vmsrlt fpexc, r1 @ encoding: [0x10,0x1a,0xe8,0xbe]
108 # CHECK-V8A: vmsrgt fpsid, r2 @ encoding: [0x10,0x2a,0xe0,0xce]
109 # CHECK-V8A: vmsrle fpscr, r10 @ encoding: [0x10,0xaa,0xe1,0xde]
110 # CHECK-V8A: vmsreq fpscr, sp @ encoding: [0x10,0xda,0xe1,0x0e]
120120 # ERROR-NOVFP: invalid instruction encoding
121121 # ERROR-NOVFP: invalid instruction encoding
122122
123 [0x0b,0xbf]
124 [0xf7,0xee,0x10,0x4a]
125 [0xf6,0xee,0x10,0x5a]
126 [0xe1,0xee,0x10,0x0a]
127 [0xe0,0xee,0x10,0x2a]
128
129 # CHECK-V7A: itete eq @ encoding: [0x0b,0xbf]
130 # CHECK-V7A: vmrseq r4, mvfr0 @ encoding: [0xf7,0xee,0x10,0x4a]
131 # CHECK-V7A: vmrsne r5, mvfr1 @ encoding: [0xf6,0xee,0x10,0x5a]
132 # CHECK-V7A: vmsreq fpscr, r0 @ encoding: [0xe1,0xee,0x10,0x0a]
133 # CHECK-V7A: vmsrne fpsid, r2 @ encoding: [0xe0,0xee,0x10,0x2a]
134
135 # CHECK-V7M: itete eq @ encoding: [0x0b,0xbf]
136 # CHECK-V7M: vmrseq r4, mvfr0 @ encoding: [0xf7,0xee,0x10,0x4a]
137 # CHECK-V7M: vmrsne r5, mvfr1 @ encoding: [0xf6,0xee,0x10,0x5a]
138 # CHECK-V7M: vmsreq fpscr, r0 @ encoding: [0xe1,0xee,0x10,0x0a]
139 # CHECK-V7M: vmsrne fpsid, r2 @ encoding: [0xe0,0xee,0x10,0x2a]
140
141 # CHECK-V8A: itete eq @ encoding: [0x0b,0xbf]
142 # CHECK-V8A: vmrseq r4, mvfr0 @ encoding: [0xf7,0xee,0x10,0x4a]
143 # CHECK-V8A: vmrsne r5, mvfr1 @ encoding: [0xf6,0xee,0x10,0x5a]
144 # CHECK-V8A: vmsreq fpscr, r0 @ encoding: [0xe1,0xee,0x10,0x0a]
145 # CHECK-V8A: vmsrne fpsid, r2 @ encoding: [0xe0,0xee,0x10,0x2a]
146
147 # CHECK-V8M: itete eq @ encoding: [0x0b,0xbf]
148 # CHECK-V8M: vmrseq r4, mvfr0 @ encoding: [0xf7,0xee,0x10,0x4a]
149 # CHECK-V8M: vmrsne r5, mvfr1 @ encoding: [0xf6,0xee,0x10,0x5a]
150 # CHECK-V8M: vmsreq fpscr, r0 @ encoding: [0xe1,0xee,0x10,0x0a]
151 # CHECK-V8M: vmsrne fpsid, r2 @ encoding: [0xe0,0xee,0x10,0x2a]
152
153 # ERROR-NOVFP: invalid instruction encoding
154 # ERROR-NOVFP: invalid instruction encoding
155 # ERROR-NOVFP: invalid instruction encoding
156 # ERROR-NOVFP: invalid instruction encoding