Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 1 | //===- ARMInstrFormats.td - ARM Instruction Formats --*- tablegen -*---------=// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | // |
| 12 | // ARM Instruction Format Definitions. |
| 13 | // |
| 14 | |
| 15 | // Format specifies the encoding used by the instruction. This is part of the |
| 16 | // ad-hoc solution used to emit machine instruction encodings by our machine |
| 17 | // code emitter. |
| 18 | class Format<bits<5> val> { |
| 19 | bits<5> Value = val; |
| 20 | } |
| 21 | |
| 22 | def Pseudo : Format<1>; |
| 23 | def MulFrm : Format<2>; |
| 24 | def MulSMLAW : Format<3>; |
| 25 | def MulSMULW : Format<4>; |
| 26 | def MulSMLA : Format<5>; |
| 27 | def MulSMUL : Format<6>; |
| 28 | def Branch : Format<7>; |
| 29 | def BranchMisc : Format<8>; |
| 30 | |
Evan Cheng | a964b7d | 2008-09-12 23:15:39 +0000 | [diff] [blame] | 31 | def UnaryFrm : Format<9>; |
| 32 | def BinaryFrm : Format<10>; |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 33 | |
Evan Cheng | a964b7d | 2008-09-12 23:15:39 +0000 | [diff] [blame] | 34 | def LdFrm : Format<11>; |
| 35 | def StFrm : Format<12>; |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 36 | |
Evan Cheng | a964b7d | 2008-09-12 23:15:39 +0000 | [diff] [blame] | 37 | def ArithMisc : Format<13>; |
| 38 | def ThumbFrm : Format<14>; |
| 39 | def VFPFrm : Format<15>; |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 40 | |
| 41 | |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 42 | //===----------------------------------------------------------------------===// |
| 43 | |
| 44 | // ARM Instruction templates. |
| 45 | // |
| 46 | |
| 47 | class InstARM<bits<4> opcod, AddrMode am, SizeFlagVal sz, IndexMode im, |
| 48 | Format f, string cstr> |
| 49 | : Instruction { |
Evan Cheng | 612b79e | 2008-08-29 07:40:52 +0000 | [diff] [blame] | 50 | field bits<32> Inst; |
| 51 | |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 52 | let Namespace = "ARM"; |
| 53 | |
| 54 | bits<4> Opcode = opcod; |
| 55 | AddrMode AM = am; |
| 56 | bits<4> AddrModeBits = AM.Value; |
| 57 | |
| 58 | SizeFlagVal SZ = sz; |
| 59 | bits<3> SizeFlag = SZ.Value; |
| 60 | |
| 61 | IndexMode IM = im; |
| 62 | bits<2> IndexModeBits = IM.Value; |
| 63 | |
| 64 | Format F = f; |
| 65 | bits<5> Form = F.Value; |
| 66 | |
| 67 | let Constraints = cstr; |
| 68 | } |
| 69 | |
| 70 | class PseudoInst<dag oops, dag iops, string asm, list<dag> pattern> |
| 71 | : InstARM<0, AddrModeNone, SizeSpecial, IndexModeNone, Pseudo, ""> { |
| 72 | let OutOperandList = oops; |
| 73 | let InOperandList = iops; |
| 74 | let AsmString = asm; |
| 75 | let Pattern = pattern; |
| 76 | } |
| 77 | |
| 78 | // Almost all ARM instructions are predicable. |
| 79 | class I<bits<4> opcod, dag oops, dag iops, AddrMode am, SizeFlagVal sz, |
| 80 | IndexMode im, Format f, string opc, string asm, string cstr, |
| 81 | list<dag> pattern> |
| 82 | : InstARM<opcod, am, sz, im, f, cstr> { |
| 83 | let OutOperandList = oops; |
| 84 | let InOperandList = !con(iops, (ops pred:$p)); |
| 85 | let AsmString = !strconcat(opc, !strconcat("${p}", asm)); |
| 86 | let Pattern = pattern; |
| 87 | list<Predicate> Predicates = [IsARM]; |
| 88 | } |
| 89 | |
| 90 | // Same as I except it can optionally modify CPSR. Note it's modeled as |
| 91 | // an input operand since by default it's a zero register. It will |
| 92 | // become an implicit def once it's "flipped". |
| 93 | class sI<bits<4> opcod, dag oops, dag iops, AddrMode am, SizeFlagVal sz, |
| 94 | IndexMode im, Format f, string opc, string asm, string cstr, |
| 95 | list<dag> pattern> |
| 96 | : InstARM<opcod, am, sz, im, f, cstr> { |
| 97 | let OutOperandList = oops; |
| 98 | let InOperandList = !con(iops, (ops pred:$p, cc_out:$s)); |
| 99 | let AsmString = !strconcat(opc, !strconcat("${p}${s}", asm)); |
| 100 | let Pattern = pattern; |
| 101 | list<Predicate> Predicates = [IsARM]; |
| 102 | } |
| 103 | |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 104 | // Special cases |
| 105 | class XI<bits<4> opcod, dag oops, dag iops, AddrMode am, SizeFlagVal sz, |
| 106 | IndexMode im, Format f, string asm, string cstr, list<dag> pattern> |
| 107 | : InstARM<opcod, am, sz, im, f, cstr> { |
| 108 | let OutOperandList = oops; |
| 109 | let InOperandList = iops; |
| 110 | let AsmString = asm; |
| 111 | let Pattern = pattern; |
| 112 | list<Predicate> Predicates = [IsARM]; |
| 113 | } |
| 114 | |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 115 | class AI<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 116 | string asm, list<dag> pattern> |
| 117 | : I<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, opc, |
| 118 | asm,"",pattern>; |
| 119 | class AsI<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 120 | string asm, list<dag> pattern> |
| 121 | : sI<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, opc, |
| 122 | asm,"",pattern>; |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 123 | class AXI<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 124 | list<dag> pattern> |
| 125 | : XI<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, asm, |
| 126 | "", pattern>; |
Evan Cheng | 3aac788 | 2008-09-01 08:25:56 +0000 | [diff] [blame] | 127 | |
| 128 | // Ctrl flow instructions |
| 129 | class ABLpredI<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 130 | string asm, list<dag> pattern> |
| 131 | : I<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, opc, |
| 132 | asm,"",pattern> { |
| 133 | let Inst{24} = 1; // L bit |
| 134 | let Inst{25-27} = 5; |
| 135 | } |
| 136 | class ABLI<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 137 | list<dag> pattern> |
| 138 | : XI<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, asm, |
| 139 | "", pattern> { |
| 140 | let Inst{24} = 1; // L bit |
| 141 | let Inst{25-27} = 5; |
| 142 | } |
| 143 | class ABLXI<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 144 | list<dag> pattern> |
| 145 | : XI<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, asm, |
| 146 | "", pattern> { |
| 147 | let Inst{4-7} = 3; |
| 148 | let Inst{20-27} = 0x12; |
| 149 | } |
| 150 | // FIXME: BX |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 151 | class AXIx2<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 152 | list<dag> pattern> |
| 153 | : XI<opcod, oops, iops, AddrModeNone, Size8Bytes, IndexModeNone, f, asm, |
| 154 | "", pattern>; |
Evan Cheng | 3aac788 | 2008-09-01 08:25:56 +0000 | [diff] [blame] | 155 | class ABI<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 156 | list<dag> pattern> |
| 157 | : XI<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, asm, |
| 158 | "", pattern> { |
| 159 | let Inst{24} = 0; // L bit |
| 160 | let Inst{25-27} = 5; |
| 161 | } |
| 162 | class ABccI<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 163 | string asm, list<dag> pattern> |
| 164 | : I<opcod, oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, f, opc, |
| 165 | asm,"",pattern> { |
| 166 | let Inst{24} = 0; // L bit |
| 167 | let Inst{25-27} = 5; |
| 168 | } |
| 169 | |
| 170 | // BR_JT instructions |
| 171 | // == mov pc |
| 172 | class JTI<bits<4> opcod, dag oops, dag iops, string asm, list<dag> pattern> |
| 173 | : XI<opcod, oops, iops, AddrModeNone, SizeSpecial, IndexModeNone, BranchMisc, |
| 174 | asm, "", pattern> { |
| 175 | let Inst{20} = 0; // S Bit |
| 176 | let Inst{21-24} = 0xd; |
| 177 | let Inst{26-27} = 0; |
| 178 | } |
| 179 | // == ldr pc |
| 180 | class JTI1<bits<4> opcod, dag oops, dag iops, string asm, list<dag> pattern> |
| 181 | : XI<opcod, oops, iops, AddrMode1, SizeSpecial, IndexModeNone, BranchMisc, |
| 182 | asm, "", pattern> { |
| 183 | let Inst{20} = 1; // L bit |
| 184 | let Inst{21} = 0; // W bit |
| 185 | let Inst{22} = 0; // B bit |
| 186 | let Inst{24} = 1; // P bit |
| 187 | } |
| 188 | // == add pc |
| 189 | class JTI2<bits<4> opcod, dag oops, dag iops, string asm, list<dag> pattern> |
| 190 | : XI<opcod, oops, iops, AddrMode2, SizeSpecial, IndexModeNone, BranchMisc, |
| 191 | asm, "", pattern> { |
| 192 | let Inst{20} = 0; // S bit |
| 193 | let Inst{21-24} = 4; |
| 194 | let Inst{26-27} = 0; |
| 195 | } |
| 196 | |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 197 | |
| 198 | // addrmode1 instructions |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 199 | class AI1<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 200 | string asm, list<dag> pattern> |
| 201 | : I<opcod, oops, iops, AddrMode1, Size4Bytes, IndexModeNone, f, opc, |
Evan Cheng | 612b79e | 2008-08-29 07:40:52 +0000 | [diff] [blame] | 202 | asm, "", pattern> { |
Evan Cheng | b7880ac | 2008-08-31 18:32:16 +0000 | [diff] [blame] | 203 | let Inst{21-24} = opcod; |
| 204 | let Inst{26-27} = 0; |
Evan Cheng | 612b79e | 2008-08-29 07:40:52 +0000 | [diff] [blame] | 205 | } |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 206 | class AsI1<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 207 | string asm, list<dag> pattern> |
| 208 | : sI<opcod, oops, iops, AddrMode1, Size4Bytes, IndexModeNone, f, opc, |
Evan Cheng | 612b79e | 2008-08-29 07:40:52 +0000 | [diff] [blame] | 209 | asm, "", pattern> { |
Evan Cheng | b7880ac | 2008-08-31 18:32:16 +0000 | [diff] [blame] | 210 | let Inst{21-24} = opcod; |
| 211 | let Inst{26-27} = 0; |
Evan Cheng | 612b79e | 2008-08-29 07:40:52 +0000 | [diff] [blame] | 212 | } |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 213 | class AXI1<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 214 | list<dag> pattern> |
| 215 | : XI<opcod, oops, iops, AddrMode1, Size4Bytes, IndexModeNone, f, asm, |
| 216 | "", pattern> { |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 217 | let Inst{21-24} = opcod; |
| 218 | let Inst{26-27} = 0; |
| 219 | } |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 220 | class AI1x2<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 221 | string asm, list<dag> pattern> |
| 222 | : I<opcod, oops, iops, AddrMode1, Size8Bytes, IndexModeNone, f, opc, |
| 223 | asm, "", pattern>; |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 224 | |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 225 | |
| 226 | // addrmode2 loads and stores |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 227 | class AI2<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 228 | string asm, list<dag> pattern> |
| 229 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, opc, |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 230 | asm, "", pattern> { |
| 231 | let Inst{26-27} = 1; |
| 232 | } |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 233 | class AXI2<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 234 | list<dag> pattern> |
| 235 | : XI<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, asm, |
| 236 | "", pattern>; |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 237 | |
| 238 | // loads |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 239 | class AI2ldw<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 240 | string asm, list<dag> pattern> |
| 241 | : AI2<opcod, oops, iops, f, opc, asm, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 242 | let Inst{20} = 1; // L bit |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 243 | let Inst{21} = 0; // W bit |
| 244 | let Inst{22} = 0; // B bit |
| 245 | let Inst{24} = 1; // P bit |
| 246 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 247 | class AXI2ldw<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 248 | list<dag> pattern> |
| 249 | : XI<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, asm, |
| 250 | "", pattern> { |
| 251 | let Inst{20} = 1; // L bit |
| 252 | let Inst{21} = 0; // W bit |
| 253 | let Inst{22} = 0; // B bit |
| 254 | let Inst{24} = 1; // P bit |
| 255 | } |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 256 | class AI2ldb<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 257 | string asm, list<dag> pattern> |
| 258 | : AI2<opcod, oops, iops, f, opc, asm, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 259 | let Inst{20} = 1; // L bit |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 260 | let Inst{21} = 0; // W bit |
| 261 | let Inst{22} = 1; // B bit |
| 262 | let Inst{24} = 1; // P bit |
| 263 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 264 | class AXI2ldb<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 265 | list<dag> pattern> |
| 266 | : XI<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, asm, |
| 267 | "", pattern> { |
| 268 | let Inst{20} = 1; // L bit |
| 269 | let Inst{21} = 0; // W bit |
| 270 | let Inst{22} = 1; // B bit |
| 271 | let Inst{24} = 1; // P bit |
| 272 | } |
Evan Cheng | 17222df | 2008-08-31 19:02:21 +0000 | [diff] [blame] | 273 | |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 274 | // stores |
| 275 | class AI2stw<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 276 | string asm, list<dag> pattern> |
| 277 | : AI2<opcod, oops, iops, f, opc, asm, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 278 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 279 | let Inst{21} = 0; // W bit |
| 280 | let Inst{22} = 0; // B bit |
| 281 | let Inst{24} = 1; // P bit |
| 282 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 283 | class AXI2stw<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 284 | list<dag> pattern> |
| 285 | : XI<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, asm, |
| 286 | "", pattern> { |
| 287 | let Inst{20} = 0; // L bit |
| 288 | let Inst{21} = 0; // W bit |
| 289 | let Inst{22} = 0; // B bit |
| 290 | let Inst{24} = 1; // P bit |
| 291 | } |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 292 | class AI2stb<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 293 | string asm, list<dag> pattern> |
| 294 | : AI2<opcod, oops, iops, f, opc, asm, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 295 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 296 | let Inst{21} = 0; // W bit |
| 297 | let Inst{22} = 1; // B bit |
| 298 | let Inst{24} = 1; // P bit |
| 299 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 300 | class AXI2stb<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 301 | list<dag> pattern> |
| 302 | : XI<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModeNone, f, asm, |
| 303 | "", pattern> { |
| 304 | let Inst{20} = 0; // L bit |
| 305 | let Inst{21} = 0; // W bit |
| 306 | let Inst{22} = 1; // B bit |
| 307 | let Inst{24} = 1; // P bit |
| 308 | } |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 309 | |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 310 | // Pre-indexed loads |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 311 | class AI2ldwpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 312 | string asm, string cstr, list<dag> pattern> |
| 313 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePre, f, opc, |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 314 | asm, cstr, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 315 | let Inst{20} = 1; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 316 | let Inst{21} = 1; // W bit |
| 317 | let Inst{22} = 0; // B bit |
| 318 | let Inst{24} = 1; // P bit |
| 319 | } |
| 320 | class AI2ldbpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 321 | string asm, string cstr, list<dag> pattern> |
| 322 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePre, f, opc, |
| 323 | asm, cstr, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 324 | let Inst{20} = 1; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 325 | let Inst{21} = 1; // W bit |
| 326 | let Inst{22} = 1; // B bit |
| 327 | let Inst{24} = 1; // P bit |
| 328 | } |
| 329 | |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 330 | // Pre-indexed stores |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 331 | class AI2stwpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 332 | string asm, string cstr, list<dag> pattern> |
| 333 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePre, f, opc, |
| 334 | asm, cstr, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 335 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 336 | let Inst{21} = 1; // W bit |
| 337 | let Inst{22} = 0; // B bit |
| 338 | let Inst{24} = 1; // P bit |
| 339 | } |
| 340 | class AI2stbpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 341 | string asm, string cstr, list<dag> pattern> |
| 342 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePre, f, opc, |
| 343 | asm, cstr, pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 344 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 345 | let Inst{21} = 1; // W bit |
| 346 | let Inst{22} = 1; // B bit |
| 347 | let Inst{24} = 1; // P bit |
| 348 | } |
| 349 | |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 350 | // Post-indexed loads |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 351 | class AI2ldwpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 352 | string asm, string cstr, list<dag> pattern> |
| 353 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePost, f, opc, |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 354 | asm, cstr,pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 355 | let Inst{20} = 1; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 356 | let Inst{21} = 0; // W bit |
| 357 | let Inst{22} = 0; // B bit |
| 358 | let Inst{24} = 0; // P bit |
| 359 | } |
| 360 | class AI2ldbpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 361 | string asm, string cstr, list<dag> pattern> |
| 362 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePost, f, opc, |
| 363 | asm, cstr,pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 364 | let Inst{20} = 1; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 365 | let Inst{21} = 0; // W bit |
| 366 | let Inst{22} = 1; // B bit |
| 367 | let Inst{24} = 0; // P bit |
| 368 | } |
| 369 | |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 370 | // Post-indexed stores |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 371 | class AI2stwpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 372 | string asm, string cstr, list<dag> pattern> |
| 373 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePost, f, opc, |
| 374 | asm, cstr,pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 375 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 376 | let Inst{21} = 0; // W bit |
| 377 | let Inst{22} = 0; // B bit |
| 378 | let Inst{24} = 0; // P bit |
| 379 | } |
| 380 | class AI2stbpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 381 | string asm, string cstr, list<dag> pattern> |
| 382 | : I<opcod, oops, iops, AddrMode2, Size4Bytes, IndexModePost, f, opc, |
| 383 | asm, cstr,pattern> { |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 384 | let Inst{20} = 0; // L bit |
Evan Cheng | 9391273 | 2008-09-01 01:27:33 +0000 | [diff] [blame] | 385 | let Inst{21} = 0; // W bit |
| 386 | let Inst{22} = 1; // B bit |
| 387 | let Inst{24} = 0; // P bit |
| 388 | } |
| 389 | |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 390 | // addrmode3 instructions |
| 391 | class AI3<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 392 | string asm, list<dag> pattern> |
| 393 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 394 | asm, "", pattern>; |
Evan Cheng | 4bbd5f8 | 2008-09-01 07:19:00 +0000 | [diff] [blame] | 395 | class AXI3<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 396 | list<dag> pattern> |
| 397 | : XI<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, asm, |
| 398 | "", pattern>; |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 399 | |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 400 | // loads |
| 401 | class AI3ldh<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 402 | string asm, list<dag> pattern> |
| 403 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 404 | asm, "", pattern> { |
| 405 | let Inst{4} = 1; |
| 406 | let Inst{5} = 1; // H bit |
| 407 | let Inst{6} = 0; // S bit |
| 408 | let Inst{7} = 1; |
| 409 | let Inst{20} = 1; // L bit |
| 410 | let Inst{21} = 0; // W bit |
| 411 | let Inst{24} = 1; // P bit |
| 412 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 413 | class AXI3ldh<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 414 | list<dag> pattern> |
| 415 | : XI<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, asm, |
| 416 | "", pattern> { |
| 417 | let Inst{4} = 1; |
| 418 | let Inst{5} = 1; // H bit |
| 419 | let Inst{6} = 0; // S bit |
| 420 | let Inst{7} = 1; |
| 421 | let Inst{20} = 1; // L bit |
| 422 | let Inst{21} = 0; // W bit |
| 423 | let Inst{24} = 1; // P bit |
| 424 | } |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 425 | class AI3ldsh<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 426 | string asm, list<dag> pattern> |
| 427 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 428 | asm, "", pattern> { |
| 429 | let Inst{4} = 1; |
| 430 | let Inst{5} = 1; // H bit |
| 431 | let Inst{6} = 1; // S bit |
| 432 | let Inst{7} = 1; |
| 433 | let Inst{20} = 1; // L bit |
| 434 | let Inst{21} = 0; // W bit |
| 435 | let Inst{24} = 1; // P bit |
| 436 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 437 | class AXI3ldsh<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 438 | list<dag> pattern> |
| 439 | : XI<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, asm, |
| 440 | "", pattern> { |
| 441 | let Inst{4} = 1; |
| 442 | let Inst{5} = 1; // H bit |
| 443 | let Inst{6} = 1; // S bit |
| 444 | let Inst{7} = 1; |
| 445 | let Inst{20} = 1; // L bit |
| 446 | let Inst{21} = 0; // W bit |
| 447 | let Inst{24} = 1; // P bit |
| 448 | } |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 449 | class AI3ldsb<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 450 | string asm, list<dag> pattern> |
| 451 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 452 | asm, "", pattern> { |
| 453 | let Inst{4} = 1; |
| 454 | let Inst{5} = 0; // H bit |
| 455 | let Inst{6} = 1; // S bit |
| 456 | let Inst{7} = 1; |
| 457 | let Inst{20} = 1; // L bit |
| 458 | let Inst{21} = 0; // W bit |
| 459 | let Inst{24} = 1; // P bit |
| 460 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 461 | class AXI3ldsb<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 462 | list<dag> pattern> |
| 463 | : XI<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, asm, |
| 464 | "", pattern> { |
| 465 | let Inst{4} = 1; |
| 466 | let Inst{5} = 0; // H bit |
| 467 | let Inst{6} = 1; // S bit |
| 468 | let Inst{7} = 1; |
| 469 | let Inst{20} = 1; // L bit |
| 470 | let Inst{21} = 0; // W bit |
| 471 | let Inst{24} = 1; // P bit |
| 472 | } |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 473 | class AI3ldd<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 474 | string asm, list<dag> pattern> |
| 475 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 476 | asm, "", pattern> { |
| 477 | let Inst{4} = 1; |
| 478 | let Inst{5} = 0; // H bit |
| 479 | let Inst{6} = 1; // S bit |
| 480 | let Inst{7} = 1; |
| 481 | let Inst{20} = 0; // L bit |
| 482 | let Inst{21} = 0; // W bit |
| 483 | let Inst{24} = 1; // P bit |
| 484 | } |
| 485 | |
| 486 | // stores |
| 487 | class AI3sth<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 488 | string asm, list<dag> pattern> |
| 489 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 490 | asm, "", pattern> { |
| 491 | let Inst{4} = 1; |
| 492 | let Inst{5} = 1; // H bit |
| 493 | let Inst{6} = 0; // S bit |
| 494 | let Inst{7} = 1; |
| 495 | let Inst{20} = 0; // L bit |
| 496 | let Inst{21} = 0; // W bit |
| 497 | let Inst{24} = 1; // P bit |
| 498 | } |
Evan Cheng | 5d2c1cf | 2008-09-01 07:34:13 +0000 | [diff] [blame] | 499 | class AXI3sth<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 500 | list<dag> pattern> |
| 501 | : XI<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, asm, |
| 502 | "", pattern> { |
| 503 | let Inst{4} = 1; |
| 504 | let Inst{5} = 1; // H bit |
| 505 | let Inst{6} = 0; // S bit |
| 506 | let Inst{7} = 1; |
| 507 | let Inst{20} = 0; // L bit |
| 508 | let Inst{21} = 0; // W bit |
| 509 | let Inst{24} = 1; // P bit |
| 510 | } |
Evan Cheng | 840917b | 2008-09-01 07:00:14 +0000 | [diff] [blame] | 511 | class AI3std<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 512 | string asm, list<dag> pattern> |
| 513 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModeNone, f, opc, |
| 514 | asm, "", pattern> { |
| 515 | let Inst{4} = 1; |
| 516 | let Inst{5} = 1; // H bit |
| 517 | let Inst{6} = 1; // S bit |
| 518 | let Inst{7} = 1; |
| 519 | let Inst{20} = 0; // L bit |
| 520 | let Inst{21} = 0; // W bit |
| 521 | let Inst{24} = 1; // P bit |
| 522 | } |
| 523 | |
| 524 | // Pre-indexed loads |
| 525 | class AI3ldhpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 526 | string asm, string cstr, list<dag> pattern> |
| 527 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, opc, |
| 528 | asm, cstr, pattern> { |
| 529 | let Inst{4} = 1; |
| 530 | let Inst{5} = 1; // H bit |
| 531 | let Inst{6} = 0; // S bit |
| 532 | let Inst{7} = 1; |
| 533 | let Inst{20} = 1; // L bit |
| 534 | let Inst{21} = 1; // W bit |
| 535 | let Inst{24} = 1; // P bit |
| 536 | } |
| 537 | class AI3ldshpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 538 | string asm, string cstr, list<dag> pattern> |
| 539 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, opc, |
| 540 | asm, cstr, pattern> { |
| 541 | let Inst{4} = 1; |
| 542 | let Inst{5} = 1; // H bit |
| 543 | let Inst{6} = 1; // S bit |
| 544 | let Inst{7} = 1; |
| 545 | let Inst{20} = 1; // L bit |
| 546 | let Inst{21} = 1; // W bit |
| 547 | let Inst{24} = 1; // P bit |
| 548 | } |
| 549 | class AI3ldsbpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 550 | string asm, string cstr, list<dag> pattern> |
| 551 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, opc, |
| 552 | asm, cstr, pattern> { |
| 553 | let Inst{4} = 1; |
| 554 | let Inst{5} = 0; // H bit |
| 555 | let Inst{6} = 1; // S bit |
| 556 | let Inst{7} = 1; |
| 557 | let Inst{20} = 1; // L bit |
| 558 | let Inst{21} = 1; // W bit |
| 559 | let Inst{24} = 1; // P bit |
| 560 | } |
| 561 | |
| 562 | // Pre-indexed stores |
| 563 | class AI3sthpr<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 564 | string asm, string cstr, list<dag> pattern> |
| 565 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, opc, |
| 566 | asm, cstr, pattern> { |
| 567 | let Inst{4} = 1; |
| 568 | let Inst{5} = 1; // H bit |
| 569 | let Inst{6} = 0; // S bit |
| 570 | let Inst{7} = 1; |
| 571 | let Inst{20} = 0; // L bit |
| 572 | let Inst{21} = 1; // W bit |
| 573 | let Inst{24} = 1; // P bit |
| 574 | } |
| 575 | |
| 576 | // Post-indexed loads |
| 577 | class AI3ldhpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 578 | string asm, string cstr, list<dag> pattern> |
| 579 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, opc, |
| 580 | asm, cstr,pattern> { |
| 581 | let Inst{4} = 1; |
| 582 | let Inst{5} = 1; // H bit |
| 583 | let Inst{6} = 0; // S bit |
| 584 | let Inst{7} = 1; |
| 585 | let Inst{20} = 1; // L bit |
| 586 | let Inst{21} = 1; // W bit |
| 587 | let Inst{24} = 0; // P bit |
| 588 | } |
| 589 | class AI3ldshpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 590 | string asm, string cstr, list<dag> pattern> |
| 591 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, opc, |
| 592 | asm, cstr,pattern> { |
| 593 | let Inst{4} = 1; |
| 594 | let Inst{5} = 1; // H bit |
| 595 | let Inst{6} = 1; // S bit |
| 596 | let Inst{7} = 1; |
| 597 | let Inst{20} = 1; // L bit |
| 598 | let Inst{21} = 1; // W bit |
| 599 | let Inst{24} = 0; // P bit |
| 600 | } |
| 601 | class AI3ldsbpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 602 | string asm, string cstr, list<dag> pattern> |
| 603 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, opc, |
| 604 | asm, cstr,pattern> { |
| 605 | let Inst{4} = 1; |
| 606 | let Inst{5} = 0; // H bit |
| 607 | let Inst{6} = 1; // S bit |
| 608 | let Inst{7} = 1; |
| 609 | let Inst{20} = 1; // L bit |
| 610 | let Inst{21} = 1; // W bit |
| 611 | let Inst{24} = 0; // P bit |
| 612 | } |
| 613 | |
| 614 | // Post-indexed stores |
| 615 | class AI3sthpo<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 616 | string asm, string cstr, list<dag> pattern> |
| 617 | : I<opcod, oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, opc, |
| 618 | asm, cstr,pattern> { |
| 619 | let Inst{4} = 1; |
| 620 | let Inst{5} = 1; // H bit |
| 621 | let Inst{6} = 0; // S bit |
| 622 | let Inst{7} = 1; |
| 623 | let Inst{20} = 0; // L bit |
| 624 | let Inst{21} = 1; // W bit |
| 625 | let Inst{24} = 0; // P bit |
| 626 | } |
| 627 | |
| 628 | |
Evan Cheng | 0d14fc8 | 2008-09-01 01:51:14 +0000 | [diff] [blame] | 629 | // addrmode4 instructions |
| 630 | class AI4<bits<4> opcod, dag oops, dag iops, Format f, string opc, |
| 631 | string asm, list<dag> pattern> |
| 632 | : I<opcod, oops, iops, AddrMode4, Size4Bytes, IndexModeNone, f, opc, |
Evan Cheng | 3c2ee49 | 2008-09-01 07:48:18 +0000 | [diff] [blame] | 633 | asm, "", pattern> { |
| 634 | let Inst{25-27} = 0x4; |
| 635 | } |
| 636 | class AXI4ld<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 637 | list<dag> pattern> |
| 638 | : XI<opcod, oops, iops, AddrMode4, Size4Bytes, IndexModeNone, f, asm, |
Evan Cheng | 3c2ee49 | 2008-09-01 07:48:18 +0000 | [diff] [blame] | 639 | "", pattern> { |
| 640 | let Inst{20} = 1; // L bit |
| 641 | let Inst{22} = 0; // S bit |
| 642 | let Inst{25-27} = 0x4; |
| 643 | } |
| 644 | class AXI4ldpc<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 645 | list<dag> pattern> |
| 646 | : XI<opcod, oops, iops, AddrMode4, Size4Bytes, IndexModeNone, f, asm, |
| 647 | "", pattern> { |
| 648 | let Inst{20} = 1; // L bit |
| 649 | let Inst{22} = 1; // S bit |
| 650 | let Inst{25-27} = 0x4; |
| 651 | } |
| 652 | class AXI4st<bits<4> opcod, dag oops, dag iops, Format f, string asm, |
| 653 | list<dag> pattern> |
| 654 | : XI<opcod, oops, iops, AddrMode4, Size4Bytes, IndexModeNone, f, asm, |
| 655 | "", pattern> { |
| 656 | let Inst{20} = 0; // L bit |
| 657 | let Inst{22} = 0; // S bit |
| 658 | let Inst{25-27} = 0x4; |
| 659 | } |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 660 | |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 661 | |
Evan Cheng | 37f25d9 | 2008-08-28 23:39:26 +0000 | [diff] [blame] | 662 | //===----------------------------------------------------------------------===// |
| 663 | |
| 664 | // ARMPat - Same as Pat<>, but requires that the compiler be in ARM mode. |
| 665 | class ARMPat<dag pattern, dag result> : Pat<pattern, result> { |
| 666 | list<Predicate> Predicates = [IsARM]; |
| 667 | } |
| 668 | class ARMV5TEPat<dag pattern, dag result> : Pat<pattern, result> { |
| 669 | list<Predicate> Predicates = [IsARM, HasV5TE]; |
| 670 | } |
| 671 | class ARMV6Pat<dag pattern, dag result> : Pat<pattern, result> { |
| 672 | list<Predicate> Predicates = [IsARM, HasV6]; |
| 673 | } |
Evan Cheng | 1309664 | 2008-08-29 06:41:12 +0000 | [diff] [blame] | 674 | |
| 675 | //===----------------------------------------------------------------------===// |
| 676 | // |
| 677 | // Thumb Instruction Format Definitions. |
| 678 | // |
| 679 | |
| 680 | |
| 681 | // TI - Thumb instruction. |
| 682 | |
| 683 | class ThumbI<dag outs, dag ins, AddrMode am, SizeFlagVal sz, |
| 684 | string asm, string cstr, list<dag> pattern> |
| 685 | // FIXME: Set all opcodes to 0 for now. |
| 686 | : InstARM<0, am, sz, IndexModeNone, ThumbFrm, cstr> { |
| 687 | let OutOperandList = outs; |
| 688 | let InOperandList = ins; |
| 689 | let AsmString = asm; |
| 690 | let Pattern = pattern; |
| 691 | list<Predicate> Predicates = [IsThumb]; |
| 692 | } |
| 693 | |
| 694 | class TI<dag outs, dag ins, string asm, list<dag> pattern> |
| 695 | : ThumbI<outs, ins, AddrModeNone, Size2Bytes, asm, "", pattern>; |
| 696 | class TI1<dag outs, dag ins, string asm, list<dag> pattern> |
| 697 | : ThumbI<outs, ins, AddrModeT1, Size2Bytes, asm, "", pattern>; |
| 698 | class TI2<dag outs, dag ins, string asm, list<dag> pattern> |
| 699 | : ThumbI<outs, ins, AddrModeT2, Size2Bytes, asm, "", pattern>; |
| 700 | class TI4<dag outs, dag ins, string asm, list<dag> pattern> |
| 701 | : ThumbI<outs, ins, AddrModeT4, Size2Bytes, asm, "", pattern>; |
| 702 | class TIs<dag outs, dag ins, string asm, list<dag> pattern> |
| 703 | : ThumbI<outs, ins, AddrModeTs, Size2Bytes, asm, "", pattern>; |
| 704 | |
| 705 | // Two-address instructions |
| 706 | class TIt<dag outs, dag ins, string asm, list<dag> pattern> |
| 707 | : ThumbI<outs, ins, AddrModeNone, Size2Bytes, asm, "$lhs = $dst", pattern>; |
| 708 | |
| 709 | // BL, BLX(1) are translated by assembler into two instructions |
| 710 | class TIx2<dag outs, dag ins, string asm, list<dag> pattern> |
| 711 | : ThumbI<outs, ins, AddrModeNone, Size4Bytes, asm, "", pattern>; |
| 712 | |
| 713 | // BR_JT instructions |
| 714 | class TJTI<dag outs, dag ins, string asm, list<dag> pattern> |
| 715 | : ThumbI<outs, ins, AddrModeNone, SizeSpecial, asm, "", pattern>; |
| 716 | |
| 717 | |
| 718 | //===----------------------------------------------------------------------===// |
| 719 | |
| 720 | |
| 721 | // ThumbPat - Same as Pat<>, but requires that the compiler be in Thumb mode. |
| 722 | class ThumbPat<dag pattern, dag result> : Pat<pattern, result> { |
| 723 | list<Predicate> Predicates = [IsThumb]; |
| 724 | } |
| 725 | |
| 726 | class ThumbV5Pat<dag pattern, dag result> : Pat<pattern, result> { |
| 727 | list<Predicate> Predicates = [IsThumb, HasV5T]; |
| 728 | } |