llvm.org GIT mirror llvm / e47f375
Fix the encoding and parsing of clrex instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123936 91177308-0d34-0410-b5e6-96231b3b80d8 Bruno Cardoso Lopes 9 years ago
4 changed file(s) with 13 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
29112911 }
29122912
29132913 // Clear-Exclusive is for disassembly only.
2914 def t2CLREX : T2I<(outs), (ins), NoItinerary, "clrex", "",
2915 [/* For disassembly only; pattern left blank */]>,
2916 Requires<[IsARM, HasV7]> {
2917 let Inst{31-20} = 0xf3b;
2914 def t2CLREX : T2XI<(outs), (ins), NoItinerary, "clrex",
2915 [/* For disassembly only; pattern left blank */]>,
2916 Requires<[IsThumb2, HasV7]> {
2917 let Inst{31-16} = 0xf3bf;
29182918 let Inst{15-14} = 0b10;
2919 let Inst{13} = 0;
29192920 let Inst{12} = 0;
2921 let Inst{11-8} = 0b1111;
29202922 let Inst{7-4} = 0b0010;
2923 let Inst{3-0} = 0b1111;
29212924 }
29222925
29232926 //===----------------------------------------------------------------------===//
11931193 Mnemonic == "cps" || Mnemonic == "mcr2" || Mnemonic == "it" ||
11941194 Mnemonic == "mcrr2" || Mnemonic == "cbz" || Mnemonic == "cdp2" ||
11951195 Mnemonic == "trap" || Mnemonic == "mrc2" || Mnemonic == "mrrc2" ||
1196 Mnemonic == "dsb" || Mnemonic == "movs" || Mnemonic == "isb") {
1196 Mnemonic == "dsb" || Mnemonic == "movs" || Mnemonic == "isb" ||
1197 Mnemonic == "clrex") {
11971198 CanAcceptPredicationCode = false;
11981199 } else {
11991200 CanAcceptPredicationCode = true;
158158 @ CHECK: cdp2 p7, #1, c1, c1, c1, #4 @ encoding: [0x81,0x17,0x11,0xfe]
159159 cdp2 p7, #1, c1, c1, c1, #4
160160
161 @ CHECK: clrex @ encoding: [0x1f,0xf0,0x7f,0xf5]
162 clrex
196196 @ CHECK: cdp2 p7, #1, c1, c1, c1, #4 @ encoding: [0x11,0xfe,0x81,0x17]
197197 cdp2 p7, #1, c1, c1, c1, #4
198198
199 @ CHECK: clrex @ encoding: [0xbf,0xf3,0x2f,0x8f]
200 clrex