Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Side by Side Diff: src/arm64/constants-arm64.h

Issue 2812573003: Reland "ARM64: Add NEON support" (Closed)
Patch Set: Add trace directory to gitignore Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/decoder-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM64_CONSTANTS_ARM64_H_ 5 #ifndef V8_ARM64_CONSTANTS_ARM64_H_
6 #define V8_ARM64_CONSTANTS_ARM64_H_ 6 #define V8_ARM64_CONSTANTS_ARM64_H_
7 7
8 #include "src/base/macros.h" 8 #include "src/base/macros.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 15 matching lines...) Expand all
26 namespace v8 { 26 namespace v8 {
27 namespace internal { 27 namespace internal {
28 28
29 29
30 const unsigned kInstructionSize = 4; 30 const unsigned kInstructionSize = 4;
31 const unsigned kInstructionSizeLog2 = 2; 31 const unsigned kInstructionSizeLog2 = 2;
32 const unsigned kLoadLiteralScaleLog2 = 2; 32 const unsigned kLoadLiteralScaleLog2 = 2;
33 const unsigned kMaxLoadLiteralRange = 1 * MB; 33 const unsigned kMaxLoadLiteralRange = 1 * MB;
34 34
35 const int kNumberOfRegisters = 32; 35 const int kNumberOfRegisters = 32;
36 const int kNumberOfFPRegisters = 32; 36 const int kNumberOfVRegisters = 32;
37 // Callee saved registers are x19-x30(lr). 37 // Callee saved registers are x19-x30(lr).
38 const int kNumberOfCalleeSavedRegisters = 11; 38 const int kNumberOfCalleeSavedRegisters = 11;
39 const int kFirstCalleeSavedRegisterIndex = 19; 39 const int kFirstCalleeSavedRegisterIndex = 19;
40 // Callee saved FP registers are d8-d15. 40 // Callee saved FP registers are d8-d15.
41 const int kNumberOfCalleeSavedFPRegisters = 8; 41 const int kNumberOfCalleeSavedVRegisters = 8;
42 const int kFirstCalleeSavedFPRegisterIndex = 8; 42 const int kFirstCalleeSavedVRegisterIndex = 8;
43 // Callee saved registers with no specific purpose in JS are x19-x25. 43 // Callee saved registers with no specific purpose in JS are x19-x25.
44 const unsigned kJSCalleeSavedRegList = 0x03f80000; 44 const unsigned kJSCalleeSavedRegList = 0x03f80000;
45 const int kWRegSizeInBits = 32; 45 const int kWRegSizeInBits = 32;
46 const int kWRegSizeInBitsLog2 = 5; 46 const int kWRegSizeInBitsLog2 = 5;
47 const int kWRegSize = kWRegSizeInBits >> 3; 47 const int kWRegSize = kWRegSizeInBits >> 3;
48 const int kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3; 48 const int kWRegSizeLog2 = kWRegSizeInBitsLog2 - 3;
49 const int kXRegSizeInBits = 64; 49 const int kXRegSizeInBits = 64;
50 const int kXRegSizeInBitsLog2 = 6; 50 const int kXRegSizeInBitsLog2 = 6;
51 const int kXRegSize = kXRegSizeInBits >> 3; 51 const int kXRegSize = kXRegSizeInBits >> 3;
52 const int kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3; 52 const int kXRegSizeLog2 = kXRegSizeInBitsLog2 - 3;
53 const int kSRegSizeInBits = 32; 53 const int kSRegSizeInBits = 32;
54 const int kSRegSizeInBitsLog2 = 5; 54 const int kSRegSizeInBitsLog2 = 5;
55 const int kSRegSize = kSRegSizeInBits >> 3; 55 const int kSRegSize = kSRegSizeInBits >> 3;
56 const int kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3; 56 const int kSRegSizeLog2 = kSRegSizeInBitsLog2 - 3;
57 const int kDRegSizeInBits = 64; 57 const int kDRegSizeInBits = 64;
58 const int kDRegSizeInBitsLog2 = 6; 58 const int kDRegSizeInBitsLog2 = 6;
59 const int kDRegSize = kDRegSizeInBits >> 3; 59 const int kDRegSize = kDRegSizeInBits >> 3;
60 const int kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3; 60 const int kDRegSizeLog2 = kDRegSizeInBitsLog2 - 3;
61 const int kDRegSizeInBytesLog2 = kDRegSizeInBitsLog2 - 3;
62 const int kBRegSizeInBits = 8;
63 const int kBRegSize = kBRegSizeInBits >> 3;
64 const int kHRegSizeInBits = 16;
65 const int kHRegSize = kHRegSizeInBits >> 3;
66 const int kQRegSizeInBits = 128;
67 const int kQRegSizeInBitsLog2 = 7;
68 const int kQRegSize = kQRegSizeInBits >> 3;
69 const int kQRegSizeLog2 = kQRegSizeInBitsLog2 - 3;
70 const int kVRegSizeInBits = kQRegSizeInBits;
71 const int kVRegSize = kVRegSizeInBits >> 3;
61 const int64_t kWRegMask = 0x00000000ffffffffL; 72 const int64_t kWRegMask = 0x00000000ffffffffL;
62 const int64_t kXRegMask = 0xffffffffffffffffL; 73 const int64_t kXRegMask = 0xffffffffffffffffL;
63 const int64_t kSRegMask = 0x00000000ffffffffL; 74 const int64_t kSRegMask = 0x00000000ffffffffL;
64 const int64_t kDRegMask = 0xffffffffffffffffL; 75 const int64_t kDRegMask = 0xffffffffffffffffL;
65 // TODO(all) check if the expression below works on all compilers or if it 76 // TODO(all) check if the expression below works on all compilers or if it
66 // triggers an overflow error. 77 // triggers an overflow error.
67 const int64_t kDSignBit = 63; 78 const int64_t kDSignBit = 63;
68 const int64_t kDSignMask = 0x1L << kDSignBit; 79 const int64_t kDSignMask = 0x1L << kDSignBit;
69 const int64_t kSSignBit = 31; 80 const int64_t kSSignBit = 31;
70 const int64_t kSSignMask = 0x1L << kSSignBit; 81 const int64_t kSSignMask = 0x1L << kSSignBit;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const unsigned kHalfWordSizeInBytes = kHalfWordSize >> 3; 114 const unsigned kHalfWordSizeInBytes = kHalfWordSize >> 3;
104 const unsigned kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3; 115 const unsigned kHalfWordSizeInBytesLog2 = kHalfWordSizeLog2 - 3;
105 const unsigned kWordSize = 32; 116 const unsigned kWordSize = 32;
106 const unsigned kWordSizeLog2 = 5; 117 const unsigned kWordSizeLog2 = 5;
107 const unsigned kWordSizeInBytes = kWordSize >> 3; 118 const unsigned kWordSizeInBytes = kWordSize >> 3;
108 const unsigned kWordSizeInBytesLog2 = kWordSizeLog2 - 3; 119 const unsigned kWordSizeInBytesLog2 = kWordSizeLog2 - 3;
109 const unsigned kDoubleWordSize = 64; 120 const unsigned kDoubleWordSize = 64;
110 const unsigned kDoubleWordSizeInBytes = kDoubleWordSize >> 3; 121 const unsigned kDoubleWordSizeInBytes = kDoubleWordSize >> 3;
111 const unsigned kQuadWordSize = 128; 122 const unsigned kQuadWordSize = 128;
112 const unsigned kQuadWordSizeInBytes = kQuadWordSize >> 3; 123 const unsigned kQuadWordSizeInBytes = kQuadWordSize >> 3;
124 const int kMaxLanesPerVector = 16;
125
126 const unsigned kAddressTagOffset = 56;
127 const unsigned kAddressTagWidth = 8;
128 const uint64_t kAddressTagMask = ((UINT64_C(1) << kAddressTagWidth) - 1)
129 << kAddressTagOffset;
130 static_assert(kAddressTagMask == UINT64_C(0xff00000000000000),
131 "AddressTagMask must represent most-significant eight bits.");
132
113 // AArch64 floating-point specifics. These match IEEE-754. 133 // AArch64 floating-point specifics. These match IEEE-754.
114 const unsigned kDoubleMantissaBits = 52; 134 const unsigned kDoubleMantissaBits = 52;
115 const unsigned kDoubleExponentBits = 11; 135 const unsigned kDoubleExponentBits = 11;
116 const unsigned kDoubleExponentBias = 1023; 136 const unsigned kDoubleExponentBias = 1023;
117 const unsigned kFloatMantissaBits = 23; 137 const unsigned kFloatMantissaBits = 23;
118 const unsigned kFloatExponentBits = 8; 138 const unsigned kFloatExponentBits = 8;
139 const unsigned kFloatExponentBias = 127;
140 const unsigned kFloat16MantissaBits = 10;
141 const unsigned kFloat16ExponentBits = 5;
142 const unsigned kFloat16ExponentBias = 15;
143
144 typedef uint16_t float16;
119 145
120 #define INSTRUCTION_FIELDS_LIST(V_) \ 146 #define INSTRUCTION_FIELDS_LIST(V_) \
121 /* Register fields */ \ 147 /* Register fields */ \
122 V_(Rd, 4, 0, Bits) /* Destination register. */ \ 148 V_(Rd, 4, 0, Bits) /* Destination register. */ \
123 V_(Rn, 9, 5, Bits) /* First source register. */ \ 149 V_(Rn, 9, 5, Bits) /* First source register. */ \
124 V_(Rm, 20, 16, Bits) /* Second source register. */ \ 150 V_(Rm, 20, 16, Bits) /* Second source register. */ \
125 V_(Ra, 14, 10, Bits) /* Third source register. */ \ 151 V_(Ra, 14, 10, Bits) /* Third source register. */ \
126 V_(Rt, 4, 0, Bits) /* Load dest / store source. */ \ 152 V_(Rt, 4, 0, Bits) /* Load dest / store source. */ \
127 V_(Rt2, 14, 10, Bits) /* Load second dest / */ \ 153 V_(Rt2, 14, 10, Bits) /* Load second dest / */ \
128 /* store second source. */ \ 154 /* store second source. */ \
129 V_(Rs, 20, 16, Bits) /* Store-exclusive status */ \ 155 V_(Rs, 20, 16, Bits) /* Store-exclusive status */ \
130 V_(PrefetchMode, 4, 0, Bits) \ 156 V_(PrefetchMode, 4, 0, Bits) \
131 \ 157 \
132 /* Common bits */ \ 158 /* Common bits */ \
133 V_(SixtyFourBits, 31, 31, Bits) \ 159 V_(SixtyFourBits, 31, 31, Bits) \
134 V_(FlagsUpdate, 29, 29, Bits) \ 160 V_(FlagsUpdate, 29, 29, Bits) \
135 \ 161 \
136 /* PC relative addressing */ \ 162 /* PC relative addressing */ \
137 V_(ImmPCRelHi, 23, 5, SignedBits) \ 163 V_(ImmPCRelHi, 23, 5, SignedBits) \
138 V_(ImmPCRelLo, 30, 29, Bits) \ 164 V_(ImmPCRelLo, 30, 29, Bits) \
139 \ 165 \
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 \ 200 \
175 /* Floating point */ \ 201 /* Floating point */ \
176 V_(FPType, 23, 22, Bits) \ 202 V_(FPType, 23, 22, Bits) \
177 V_(ImmFP, 20, 13, Bits) \ 203 V_(ImmFP, 20, 13, Bits) \
178 V_(FPScale, 15, 10, Bits) \ 204 V_(FPScale, 15, 10, Bits) \
179 \ 205 \
180 /* Load Store */ \ 206 /* Load Store */ \
181 V_(ImmLS, 20, 12, SignedBits) \ 207 V_(ImmLS, 20, 12, SignedBits) \
182 V_(ImmLSUnsigned, 21, 10, Bits) \ 208 V_(ImmLSUnsigned, 21, 10, Bits) \
183 V_(ImmLSPair, 21, 15, SignedBits) \ 209 V_(ImmLSPair, 21, 15, SignedBits) \
184 V_(SizeLS, 31, 30, Bits) \
185 V_(ImmShiftLS, 12, 12, Bits) \ 210 V_(ImmShiftLS, 12, 12, Bits) \
211 V_(LSOpc, 23, 22, Bits) \
212 V_(LSVector, 26, 26, Bits) \
213 V_(LSSize, 31, 30, Bits) \
214 \
215 /* NEON generic fields */ \
216 V_(NEONQ, 30, 30, Bits) \
217 V_(NEONSize, 23, 22, Bits) \
218 V_(NEONLSSize, 11, 10, Bits) \
219 V_(NEONS, 12, 12, Bits) \
220 V_(NEONL, 21, 21, Bits) \
221 V_(NEONM, 20, 20, Bits) \
222 V_(NEONH, 11, 11, Bits) \
223 V_(ImmNEONExt, 14, 11, Bits) \
224 V_(ImmNEON5, 20, 16, Bits) \
225 V_(ImmNEON4, 14, 11, Bits) \
186 \ 226 \
187 /* Other immediates */ \ 227 /* Other immediates */ \
188 V_(ImmUncondBranch, 25, 0, SignedBits) \ 228 V_(ImmUncondBranch, 25, 0, SignedBits) \
189 V_(ImmCmpBranch, 23, 5, SignedBits) \ 229 V_(ImmCmpBranch, 23, 5, SignedBits) \
190 V_(ImmLLiteral, 23, 5, SignedBits) \ 230 V_(ImmLLiteral, 23, 5, SignedBits) \
191 V_(ImmException, 20, 5, Bits) \ 231 V_(ImmException, 20, 5, Bits) \
192 V_(ImmHint, 11, 5, Bits) \ 232 V_(ImmHint, 11, 5, Bits) \
193 V_(ImmBarrierDomain, 11, 10, Bits) \ 233 V_(ImmBarrierDomain, 11, 10, Bits) \
194 V_(ImmBarrierType, 9, 8, Bits) \ 234 V_(ImmBarrierType, 9, 8, Bits) \
195 \ 235 \
196 /* System (MRS, MSR) */ \ 236 /* System (MRS, MSR) */ \
197 V_(ImmSystemRegister, 19, 5, Bits) \ 237 V_(ImmSystemRegister, 19, 5, Bits) \
198 V_(SysO0, 19, 19, Bits) \ 238 V_(SysO0, 19, 19, Bits) \
199 V_(SysOp1, 18, 16, Bits) \ 239 V_(SysOp1, 18, 16, Bits) \
200 V_(SysOp2, 7, 5, Bits) \ 240 V_(SysOp2, 7, 5, Bits) \
201 V_(CRn, 15, 12, Bits) \ 241 V_(CRn, 15, 12, Bits) \
202 V_(CRm, 11, 8, Bits) \ 242 V_(CRm, 11, 8, Bits) \
203 \ 243 \
204 /* Load-/store-exclusive */ \ 244 /* Load-/store-exclusive */ \
205 V_(LoadStoreXLoad, 22, 22, Bits) \ 245 V_(LoadStoreXLoad, 22, 22, Bits) \
206 V_(LoadStoreXNotExclusive, 23, 23, Bits) \ 246 V_(LoadStoreXNotExclusive, 23, 23, Bits) \
207 V_(LoadStoreXAcquireRelease, 15, 15, Bits) \ 247 V_(LoadStoreXAcquireRelease, 15, 15, Bits) \
208 V_(LoadStoreXSizeLog2, 31, 30, Bits) \ 248 V_(LoadStoreXSizeLog2, 31, 30, Bits) \
209 V_(LoadStoreXPair, 21, 21, Bits) 249 V_(LoadStoreXPair, 21, 21, Bits) \
250 \
251 /* NEON load/store */ \
252 V_(NEONLoad, 22, 22, Bits) \
253 \
254 /* NEON Modified Immediate fields */ \
255 V_(ImmNEONabc, 18, 16, Bits) \
256 V_(ImmNEONdefgh, 9, 5, Bits) \
257 V_(NEONModImmOp, 29, 29, Bits) \
258 V_(NEONCmode, 15, 12, Bits) \
259 \
260 /* NEON Shift Immediate fields */ \
261 V_(ImmNEONImmhImmb, 22, 16, Bits) \
262 V_(ImmNEONImmh, 22, 19, Bits) \
263 V_(ImmNEONImmb, 18, 16, Bits)
210 264
211 #define SYSTEM_REGISTER_FIELDS_LIST(V_, M_) \ 265 #define SYSTEM_REGISTER_FIELDS_LIST(V_, M_) \
212 /* NZCV */ \ 266 /* NZCV */ \
213 V_(Flags, 31, 28, Bits, uint32_t) \ 267 V_(Flags, 31, 28, Bits, uint32_t) \
214 V_(N, 31, 31, Bits, bool) \ 268 V_(N, 31, 31, Bits, bool) \
215 V_(Z, 30, 30, Bits, bool) \ 269 V_(Z, 30, 30, Bits, bool) \
216 V_(C, 29, 29, Bits, bool) \ 270 V_(C, 29, 29, Bits, bool) \
217 V_(V, 28, 28, Bits, uint32_t) \ 271 V_(V, 28, 28, Bits, uint32_t) \
218 M_(NZCV, Flags_mask) \ 272 M_(NZCV, Flags_mask) \
219 \ 273 \
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 FPLessThanFlag = NFlag, 385 FPLessThanFlag = NFlag,
332 FPGreaterThanFlag = CFlag, 386 FPGreaterThanFlag = CFlag,
333 FPUnorderedFlag = CVFlag 387 FPUnorderedFlag = CVFlag
334 }; 388 };
335 389
336 enum Shift { 390 enum Shift {
337 NO_SHIFT = -1, 391 NO_SHIFT = -1,
338 LSL = 0x0, 392 LSL = 0x0,
339 LSR = 0x1, 393 LSR = 0x1,
340 ASR = 0x2, 394 ASR = 0x2,
341 ROR = 0x3 395 ROR = 0x3,
396 MSL = 0x4
342 }; 397 };
343 398
344 enum Extend { 399 enum Extend {
345 NO_EXTEND = -1, 400 NO_EXTEND = -1,
346 UXTB = 0, 401 UXTB = 0,
347 UXTH = 1, 402 UXTH = 1,
348 UXTW = 2, 403 UXTW = 2,
349 UXTX = 3, 404 UXTX = 3,
350 SXTB = 4, 405 SXTB = 4,
351 SXTH = 5, 406 SXTH = 5,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // 459 //
405 // The enumerations can be used like this: 460 // The enumerations can be used like this:
406 // 461 //
407 // DCHECK(instr->Mask(PCRelAddressingFMask) == PCRelAddressingFixed); 462 // DCHECK(instr->Mask(PCRelAddressingFMask) == PCRelAddressingFixed);
408 // switch(instr->Mask(PCRelAddressingMask)) { 463 // switch(instr->Mask(PCRelAddressingMask)) {
409 // case ADR: Format("adr 'Xd, 'AddrPCRelByte"); break; 464 // case ADR: Format("adr 'Xd, 'AddrPCRelByte"); break;
410 // case ADRP: Format("adrp 'Xd, 'AddrPCRelPage"); break; 465 // case ADRP: Format("adrp 'Xd, 'AddrPCRelPage"); break;
411 // default: printf("Unknown instruction\n"); 466 // default: printf("Unknown instruction\n");
412 // } 467 // }
413 468
469 // Used to corrupt encodings by setting all bits when orred. Although currently
470 // unallocated in AArch64, this encoding is not guaranteed to be undefined
471 // indefinitely.
472 const uint32_t kUnallocatedInstruction = 0xffffffff;
414 473
415 // Generic fields. 474 // Generic fields.
416 enum GenericInstrField { 475 enum GenericInstrField {
417 SixtyFourBits = 0x80000000, 476 SixtyFourBits = 0x80000000,
418 ThirtyTwoBits = 0x00000000, 477 ThirtyTwoBits = 0x00000000,
419 FP32 = 0x00000000, 478 FP32 = 0x00000000,
420 FP64 = 0x00400000 479 FP64 = 0x00400000
421 }; 480 };
422 481
482 enum NEONFormatField {
483 NEONFormatFieldMask = 0x40C00000,
484 NEON_Q = 0x40000000,
485 NEON_8B = 0x00000000,
486 NEON_16B = NEON_8B | NEON_Q,
487 NEON_4H = 0x00400000,
488 NEON_8H = NEON_4H | NEON_Q,
489 NEON_2S = 0x00800000,
490 NEON_4S = NEON_2S | NEON_Q,
491 NEON_1D = 0x00C00000,
492 NEON_2D = 0x00C00000 | NEON_Q
493 };
494
495 enum NEONFPFormatField {
496 NEONFPFormatFieldMask = 0x40400000,
497 NEON_FP_2S = FP32,
498 NEON_FP_4S = FP32 | NEON_Q,
499 NEON_FP_2D = FP64 | NEON_Q
500 };
501
502 enum NEONLSFormatField {
503 NEONLSFormatFieldMask = 0x40000C00,
504 LS_NEON_8B = 0x00000000,
505 LS_NEON_16B = LS_NEON_8B | NEON_Q,
506 LS_NEON_4H = 0x00000400,
507 LS_NEON_8H = LS_NEON_4H | NEON_Q,
508 LS_NEON_2S = 0x00000800,
509 LS_NEON_4S = LS_NEON_2S | NEON_Q,
510 LS_NEON_1D = 0x00000C00,
511 LS_NEON_2D = LS_NEON_1D | NEON_Q
512 };
513
514 enum NEONScalarFormatField {
515 NEONScalarFormatFieldMask = 0x00C00000,
516 NEONScalar = 0x10000000,
517 NEON_B = 0x00000000,
518 NEON_H = 0x00400000,
519 NEON_S = 0x00800000,
520 NEON_D = 0x00C00000
521 };
522
423 // PC relative addressing. 523 // PC relative addressing.
424 enum PCRelAddressingOp { 524 enum PCRelAddressingOp {
425 PCRelAddressingFixed = 0x10000000, 525 PCRelAddressingFixed = 0x10000000,
426 PCRelAddressingFMask = 0x1F000000, 526 PCRelAddressingFMask = 0x1F000000,
427 PCRelAddressingMask = 0x9F000000, 527 PCRelAddressingMask = 0x9F000000,
428 ADR = PCRelAddressingFixed | 0x00000000, 528 ADR = PCRelAddressingFixed | 0x00000000,
429 ADRP = PCRelAddressingFixed | 0x80000000 529 ADRP = PCRelAddressingFixed | 0x80000000
430 }; 530 };
431 531
432 // Add/sub (immediate, shifted and extended.) 532 // Add/sub (immediate, shifted and extended.)
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 LoadStoreAnyFMask = 0x0a000000, 806 LoadStoreAnyFMask = 0x0a000000,
707 LoadStoreAnyFixed = 0x08000000 807 LoadStoreAnyFixed = 0x08000000
708 }; 808 };
709 809
710 // Any load pair or store pair. 810 // Any load pair or store pair.
711 enum LoadStorePairAnyOp { 811 enum LoadStorePairAnyOp {
712 LoadStorePairAnyFMask = 0x3a000000, 812 LoadStorePairAnyFMask = 0x3a000000,
713 LoadStorePairAnyFixed = 0x28000000 813 LoadStorePairAnyFixed = 0x28000000
714 }; 814 };
715 815
716 #define LOAD_STORE_PAIR_OP_LIST(V) \ 816 #define LOAD_STORE_PAIR_OP_LIST(V) \
717 V(STP, w, 0x00000000), \ 817 V(STP, w, 0x00000000) \
718 V(LDP, w, 0x00400000), \ 818 , V(LDP, w, 0x00400000), V(LDPSW, x, 0x40400000), V(STP, x, 0x80000000), \
719 V(LDPSW, x, 0x40400000), \ 819 V(LDP, x, 0x80400000), V(STP, s, 0x04000000), V(LDP, s, 0x04400000), \
720 V(STP, x, 0x80000000), \ 820 V(STP, d, 0x44000000), V(LDP, d, 0x44400000), V(STP, q, 0x84000000), \
721 V(LDP, x, 0x80400000), \ 821 V(LDP, q, 0x84400000)
722 V(STP, s, 0x04000000), \
723 V(LDP, s, 0x04400000), \
724 V(STP, d, 0x44000000), \
725 V(LDP, d, 0x44400000)
726 822
727 // Load/store pair (post, pre and offset.) 823 // Load/store pair (post, pre and offset.)
728 enum LoadStorePairOp { 824 enum LoadStorePairOp {
729 LoadStorePairMask = 0xC4400000, 825 LoadStorePairMask = 0xC4400000,
730 LoadStorePairLBit = 1 << 22, 826 LoadStorePairLBit = 1 << 22,
731 #define LOAD_STORE_PAIR(A, B, C) \ 827 #define LOAD_STORE_PAIR(A, B, C) \
732 A##_##B = C 828 A##_##B = C
733 LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR) 829 LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR)
734 #undef LOAD_STORE_PAIR 830 #undef LOAD_STORE_PAIR
735 }; 831 };
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 LoadLiteralFMask = 0x3B000000, 866 LoadLiteralFMask = 0x3B000000,
771 LoadLiteralMask = 0xFF000000, 867 LoadLiteralMask = 0xFF000000,
772 LDR_w_lit = LoadLiteralFixed | 0x00000000, 868 LDR_w_lit = LoadLiteralFixed | 0x00000000,
773 LDR_x_lit = LoadLiteralFixed | 0x40000000, 869 LDR_x_lit = LoadLiteralFixed | 0x40000000,
774 LDRSW_x_lit = LoadLiteralFixed | 0x80000000, 870 LDRSW_x_lit = LoadLiteralFixed | 0x80000000,
775 PRFM_lit = LoadLiteralFixed | 0xC0000000, 871 PRFM_lit = LoadLiteralFixed | 0xC0000000,
776 LDR_s_lit = LoadLiteralFixed | 0x04000000, 872 LDR_s_lit = LoadLiteralFixed | 0x04000000,
777 LDR_d_lit = LoadLiteralFixed | 0x44000000 873 LDR_d_lit = LoadLiteralFixed | 0x44000000
778 }; 874 };
779 875
780 #define LOAD_STORE_OP_LIST(V) \ 876 // clang-format off
781 V(ST, RB, w, 0x00000000), \
782 V(ST, RH, w, 0x40000000), \
783 V(ST, R, w, 0x80000000), \
784 V(ST, R, x, 0xC0000000), \
785 V(LD, RB, w, 0x00400000), \
786 V(LD, RH, w, 0x40400000), \
787 V(LD, R, w, 0x80400000), \
788 V(LD, R, x, 0xC0400000), \
789 V(LD, RSB, x, 0x00800000), \
790 V(LD, RSH, x, 0x40800000), \
791 V(LD, RSW, x, 0x80800000), \
792 V(LD, RSB, w, 0x00C00000), \
793 V(LD, RSH, w, 0x40C00000), \
794 V(ST, R, s, 0x84000000), \
795 V(ST, R, d, 0xC4000000), \
796 V(LD, R, s, 0x84400000), \
797 V(LD, R, d, 0xC4400000)
798 877
878 #define LOAD_STORE_OP_LIST(V) \
879 V(ST, RB, w, 0x00000000), \
880 V(ST, RH, w, 0x40000000), \
881 V(ST, R, w, 0x80000000), \
882 V(ST, R, x, 0xC0000000), \
883 V(LD, RB, w, 0x00400000), \
884 V(LD, RH, w, 0x40400000), \
885 V(LD, R, w, 0x80400000), \
886 V(LD, R, x, 0xC0400000), \
887 V(LD, RSB, x, 0x00800000), \
888 V(LD, RSH, x, 0x40800000), \
889 V(LD, RSW, x, 0x80800000), \
890 V(LD, RSB, w, 0x00C00000), \
891 V(LD, RSH, w, 0x40C00000), \
892 V(ST, R, b, 0x04000000), \
893 V(ST, R, h, 0x44000000), \
894 V(ST, R, s, 0x84000000), \
895 V(ST, R, d, 0xC4000000), \
896 V(ST, R, q, 0x04800000), \
897 V(LD, R, b, 0x04400000), \
898 V(LD, R, h, 0x44400000), \
899 V(LD, R, s, 0x84400000), \
900 V(LD, R, d, 0xC4400000), \
901 V(LD, R, q, 0x04C00000)
902
903 // clang-format on
799 904
800 // Load/store unscaled offset. 905 // Load/store unscaled offset.
801 enum LoadStoreUnscaledOffsetOp { 906 enum LoadStoreUnscaledOffsetOp {
802 LoadStoreUnscaledOffsetFixed = 0x38000000, 907 LoadStoreUnscaledOffsetFixed = 0x38000000,
803 LoadStoreUnscaledOffsetFMask = 0x3B200C00, 908 LoadStoreUnscaledOffsetFMask = 0x3B200C00,
804 LoadStoreUnscaledOffsetMask = 0xFFE00C00, 909 LoadStoreUnscaledOffsetMask = 0xFFE00C00,
805 #define LOAD_STORE_UNSCALED(A, B, C, D) \ 910 #define LOAD_STORE_UNSCALED(A, B, C, D) \
806 A##U##B##_##C = LoadStoreUnscaledOffsetFixed | D 911 A##U##B##_##C = LoadStoreUnscaledOffsetFixed | D
807 LOAD_STORE_OP_LIST(LOAD_STORE_UNSCALED) 912 LOAD_STORE_OP_LIST(LOAD_STORE_UNSCALED)
808 #undef LOAD_STORE_UNSCALED 913 #undef LOAD_STORE_UNSCALED
809 }; 914 };
810 915
811 // Load/store (post, pre, offset and unsigned.) 916 // Load/store (post, pre, offset and unsigned.)
812 enum LoadStoreOp { 917 enum LoadStoreOp {
813 LoadStoreOpMask = 0xC4C00000, 918 LoadStoreMask = 0xC4C00000,
814 #define LOAD_STORE(A, B, C, D) \ 919 #define LOAD_STORE(A, B, C, D) A##B##_##C = D
815 A##B##_##C = D
816 LOAD_STORE_OP_LIST(LOAD_STORE), 920 LOAD_STORE_OP_LIST(LOAD_STORE),
817 #undef LOAD_STORE 921 #undef LOAD_STORE
818 PRFM = 0xC0800000 922 PRFM = 0xC0800000
819 }; 923 };
820 924
821 // Load/store post index. 925 // Load/store post index.
822 enum LoadStorePostIndex { 926 enum LoadStorePostIndex {
823 LoadStorePostIndexFixed = 0x38000400, 927 LoadStorePostIndexFixed = 0x38000400,
824 LoadStorePostIndexFMask = 0x3B200C00, 928 LoadStorePostIndexFMask = 0x3B200C00,
825 LoadStorePostIndexMask = 0xFFE00C00, 929 LoadStorePostIndexMask = 0xFFE00C00,
826 #define LOAD_STORE_POST_INDEX(A, B, C, D) \ 930 #define LOAD_STORE_POST_INDEX(A, B, C, D) \
827 A##B##_##C##_post = LoadStorePostIndexFixed | D 931 A##B##_##C##_post = LoadStorePostIndexFixed | D
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 FPImmediateFMask = 0x5F201C00, 1160 FPImmediateFMask = 0x5F201C00,
1057 FPImmediateMask = 0xFFE01C00, 1161 FPImmediateMask = 0xFFE01C00,
1058 FMOV_s_imm = FPImmediateFixed | 0x00000000, 1162 FMOV_s_imm = FPImmediateFixed | 0x00000000,
1059 FMOV_d_imm = FPImmediateFixed | FP64 | 0x00000000 1163 FMOV_d_imm = FPImmediateFixed | FP64 | 0x00000000
1060 }; 1164 };
1061 1165
1062 // Floating point data processing 1 source. 1166 // Floating point data processing 1 source.
1063 enum FPDataProcessing1SourceOp { 1167 enum FPDataProcessing1SourceOp {
1064 FPDataProcessing1SourceFixed = 0x1E204000, 1168 FPDataProcessing1SourceFixed = 0x1E204000,
1065 FPDataProcessing1SourceFMask = 0x5F207C00, 1169 FPDataProcessing1SourceFMask = 0x5F207C00,
1066 FPDataProcessing1SourceMask = 0xFFFFFC00, 1170 FPDataProcessing1SourceMask = 0xFFFFFC00,
1067 FMOV_s = FPDataProcessing1SourceFixed | 0x00000000, 1171 FMOV_s = FPDataProcessing1SourceFixed | 0x00000000,
1068 FMOV_d = FPDataProcessing1SourceFixed | FP64 | 0x00000000, 1172 FMOV_d = FPDataProcessing1SourceFixed | FP64 | 0x00000000,
1069 FMOV = FMOV_s, 1173 FMOV = FMOV_s,
1070 FABS_s = FPDataProcessing1SourceFixed | 0x00008000, 1174 FABS_s = FPDataProcessing1SourceFixed | 0x00008000,
1071 FABS_d = FPDataProcessing1SourceFixed | FP64 | 0x00008000, 1175 FABS_d = FPDataProcessing1SourceFixed | FP64 | 0x00008000,
1072 FABS = FABS_s, 1176 FABS = FABS_s,
1073 FNEG_s = FPDataProcessing1SourceFixed | 0x00010000, 1177 FNEG_s = FPDataProcessing1SourceFixed | 0x00010000,
1074 FNEG_d = FPDataProcessing1SourceFixed | FP64 | 0x00010000, 1178 FNEG_d = FPDataProcessing1SourceFixed | FP64 | 0x00010000,
1075 FNEG = FNEG_s, 1179 FNEG = FNEG_s,
1076 FSQRT_s = FPDataProcessing1SourceFixed | 0x00018000, 1180 FSQRT_s = FPDataProcessing1SourceFixed | 0x00018000,
1077 FSQRT_d = FPDataProcessing1SourceFixed | FP64 | 0x00018000, 1181 FSQRT_d = FPDataProcessing1SourceFixed | FP64 | 0x00018000,
1078 FSQRT = FSQRT_s, 1182 FSQRT = FSQRT_s,
1079 FCVT_ds = FPDataProcessing1SourceFixed | 0x00028000, 1183 FCVT_ds = FPDataProcessing1SourceFixed | 0x00028000,
1080 FCVT_sd = FPDataProcessing1SourceFixed | FP64 | 0x00020000, 1184 FCVT_sd = FPDataProcessing1SourceFixed | FP64 | 0x00020000,
1185 FCVT_hs = FPDataProcessing1SourceFixed | 0x00038000,
1186 FCVT_hd = FPDataProcessing1SourceFixed | FP64 | 0x00038000,
1187 FCVT_sh = FPDataProcessing1SourceFixed | 0x00C20000,
1188 FCVT_dh = FPDataProcessing1SourceFixed | 0x00C28000,
1081 FRINTN_s = FPDataProcessing1SourceFixed | 0x00040000, 1189 FRINTN_s = FPDataProcessing1SourceFixed | 0x00040000,
1082 FRINTN_d = FPDataProcessing1SourceFixed | FP64 | 0x00040000, 1190 FRINTN_d = FPDataProcessing1SourceFixed | FP64 | 0x00040000,
1083 FRINTN = FRINTN_s, 1191 FRINTN = FRINTN_s,
1084 FRINTP_s = FPDataProcessing1SourceFixed | 0x00048000, 1192 FRINTP_s = FPDataProcessing1SourceFixed | 0x00048000,
1085 FRINTP_d = FPDataProcessing1SourceFixed | FP64 | 0x00048000, 1193 FRINTP_d = FPDataProcessing1SourceFixed | FP64 | 0x00048000,
1086 FRINTP = FRINTP_s, 1194 FRINTP = FRINTP_s,
1087 FRINTM_s = FPDataProcessing1SourceFixed | 0x00050000, 1195 FRINTM_s = FPDataProcessing1SourceFixed | 0x00050000,
1088 FRINTM_d = FPDataProcessing1SourceFixed | FP64 | 0x00050000, 1196 FRINTM_d = FPDataProcessing1SourceFixed | FP64 | 0x00050000,
1089 FRINTM = FRINTM_s, 1197 FRINTM = FRINTM_s,
1090 FRINTZ_s = FPDataProcessing1SourceFixed | 0x00058000, 1198 FRINTZ_s = FPDataProcessing1SourceFixed | 0x00058000,
1091 FRINTZ_d = FPDataProcessing1SourceFixed | FP64 | 0x00058000, 1199 FRINTZ_d = FPDataProcessing1SourceFixed | FP64 | 0x00058000,
1092 FRINTZ = FRINTZ_s, 1200 FRINTZ = FRINTZ_s,
1093 FRINTA_s = FPDataProcessing1SourceFixed | 0x00060000, 1201 FRINTA_s = FPDataProcessing1SourceFixed | 0x00060000,
1094 FRINTA_d = FPDataProcessing1SourceFixed | FP64 | 0x00060000, 1202 FRINTA_d = FPDataProcessing1SourceFixed | FP64 | 0x00060000,
1095 FRINTA = FRINTA_s, 1203 FRINTA = FRINTA_s,
1096 FRINTX_s = FPDataProcessing1SourceFixed | 0x00070000, 1204 FRINTX_s = FPDataProcessing1SourceFixed | 0x00070000,
1097 FRINTX_d = FPDataProcessing1SourceFixed | FP64 | 0x00070000, 1205 FRINTX_d = FPDataProcessing1SourceFixed | FP64 | 0x00070000,
1098 FRINTX = FRINTX_s, 1206 FRINTX = FRINTX_s,
1099 FRINTI_s = FPDataProcessing1SourceFixed | 0x00078000, 1207 FRINTI_s = FPDataProcessing1SourceFixed | 0x00078000,
1100 FRINTI_d = FPDataProcessing1SourceFixed | FP64 | 0x00078000, 1208 FRINTI_d = FPDataProcessing1SourceFixed | FP64 | 0x00078000,
1101 FRINTI = FRINTI_s 1209 FRINTI = FRINTI_s
1102 }; 1210 };
1103 1211
1104 // Floating point data processing 2 source. 1212 // Floating point data processing 2 source.
1105 enum FPDataProcessing2SourceOp { 1213 enum FPDataProcessing2SourceOp {
1106 FPDataProcessing2SourceFixed = 0x1E200800, 1214 FPDataProcessing2SourceFixed = 0x1E200800,
1107 FPDataProcessing2SourceFMask = 0x5F200C00, 1215 FPDataProcessing2SourceFMask = 0x5F200C00,
1108 FPDataProcessing2SourceMask = 0xFFE0FC00, 1216 FPDataProcessing2SourceMask = 0xFFE0FC00,
1109 FMUL = FPDataProcessing2SourceFixed | 0x00000000, 1217 FMUL = FPDataProcessing2SourceFixed | 0x00000000,
1110 FMUL_s = FMUL, 1218 FMUL_s = FMUL,
1111 FMUL_d = FMUL | FP64, 1219 FMUL_d = FMUL | FP64,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 FMADD_d = FPDataProcessing3SourceFixed | 0x00400000, 1255 FMADD_d = FPDataProcessing3SourceFixed | 0x00400000,
1148 FMSUB_d = FPDataProcessing3SourceFixed | 0x00408000, 1256 FMSUB_d = FPDataProcessing3SourceFixed | 0x00408000,
1149 FNMADD_d = FPDataProcessing3SourceFixed | 0x00600000, 1257 FNMADD_d = FPDataProcessing3SourceFixed | 0x00600000,
1150 FNMSUB_d = FPDataProcessing3SourceFixed | 0x00608000 1258 FNMSUB_d = FPDataProcessing3SourceFixed | 0x00608000
1151 }; 1259 };
1152 1260
1153 // Conversion between floating point and integer. 1261 // Conversion between floating point and integer.
1154 enum FPIntegerConvertOp { 1262 enum FPIntegerConvertOp {
1155 FPIntegerConvertFixed = 0x1E200000, 1263 FPIntegerConvertFixed = 0x1E200000,
1156 FPIntegerConvertFMask = 0x5F20FC00, 1264 FPIntegerConvertFMask = 0x5F20FC00,
1157 FPIntegerConvertMask = 0xFFFFFC00, 1265 FPIntegerConvertMask = 0xFFFFFC00,
1158 FCVTNS = FPIntegerConvertFixed | 0x00000000, 1266 FCVTNS = FPIntegerConvertFixed | 0x00000000,
1159 FCVTNS_ws = FCVTNS, 1267 FCVTNS_ws = FCVTNS,
1160 FCVTNS_xs = FCVTNS | SixtyFourBits, 1268 FCVTNS_xs = FCVTNS | SixtyFourBits,
1161 FCVTNS_wd = FCVTNS | FP64, 1269 FCVTNS_wd = FCVTNS | FP64,
1162 FCVTNS_xd = FCVTNS | SixtyFourBits | FP64, 1270 FCVTNS_xd = FCVTNS | SixtyFourBits | FP64,
1163 FCVTNU = FPIntegerConvertFixed | 0x00010000, 1271 FCVTNU = FPIntegerConvertFixed | 0x00010000,
1164 FCVTNU_ws = FCVTNU, 1272 FCVTNU_ws = FCVTNU,
1165 FCVTNU_xs = FCVTNU | SixtyFourBits, 1273 FCVTNU_xs = FCVTNU | SixtyFourBits,
1166 FCVTNU_wd = FCVTNU | FP64, 1274 FCVTNU_wd = FCVTNU | FP64,
1167 FCVTNU_xd = FCVTNU | SixtyFourBits | FP64, 1275 FCVTNU_xd = FCVTNU | SixtyFourBits | FP64,
1168 FCVTPS = FPIntegerConvertFixed | 0x00080000, 1276 FCVTPS = FPIntegerConvertFixed | 0x00080000,
1169 FCVTPS_ws = FCVTPS, 1277 FCVTPS_ws = FCVTPS,
1170 FCVTPS_xs = FCVTPS | SixtyFourBits, 1278 FCVTPS_xs = FCVTPS | SixtyFourBits,
1171 FCVTPS_wd = FCVTPS | FP64, 1279 FCVTPS_wd = FCVTPS | FP64,
1172 FCVTPS_xd = FCVTPS | SixtyFourBits | FP64, 1280 FCVTPS_xd = FCVTPS | SixtyFourBits | FP64,
1173 FCVTPU = FPIntegerConvertFixed | 0x00090000, 1281 FCVTPU = FPIntegerConvertFixed | 0x00090000,
1174 FCVTPU_ws = FCVTPU, 1282 FCVTPU_ws = FCVTPU,
1175 FCVTPU_xs = FCVTPU | SixtyFourBits, 1283 FCVTPU_xs = FCVTPU | SixtyFourBits,
1176 FCVTPU_wd = FCVTPU | FP64, 1284 FCVTPU_wd = FCVTPU | FP64,
1177 FCVTPU_xd = FCVTPU | SixtyFourBits | FP64, 1285 FCVTPU_xd = FCVTPU | SixtyFourBits | FP64,
1178 FCVTMS = FPIntegerConvertFixed | 0x00100000, 1286 FCVTMS = FPIntegerConvertFixed | 0x00100000,
1179 FCVTMS_ws = FCVTMS, 1287 FCVTMS_ws = FCVTMS,
1180 FCVTMS_xs = FCVTMS | SixtyFourBits, 1288 FCVTMS_xs = FCVTMS | SixtyFourBits,
1181 FCVTMS_wd = FCVTMS | FP64, 1289 FCVTMS_wd = FCVTMS | FP64,
1182 FCVTMS_xd = FCVTMS | SixtyFourBits | FP64, 1290 FCVTMS_xd = FCVTMS | SixtyFourBits | FP64,
1183 FCVTMU = FPIntegerConvertFixed | 0x00110000, 1291 FCVTMU = FPIntegerConvertFixed | 0x00110000,
1184 FCVTMU_ws = FCVTMU, 1292 FCVTMU_ws = FCVTMU,
1185 FCVTMU_xs = FCVTMU | SixtyFourBits, 1293 FCVTMU_xs = FCVTMU | SixtyFourBits,
1186 FCVTMU_wd = FCVTMU | FP64, 1294 FCVTMU_wd = FCVTMU | FP64,
1187 FCVTMU_xd = FCVTMU | SixtyFourBits | FP64, 1295 FCVTMU_xd = FCVTMU | SixtyFourBits | FP64,
1188 FCVTZS = FPIntegerConvertFixed | 0x00180000, 1296 FCVTZS = FPIntegerConvertFixed | 0x00180000,
1189 FCVTZS_ws = FCVTZS, 1297 FCVTZS_ws = FCVTZS,
1190 FCVTZS_xs = FCVTZS | SixtyFourBits, 1298 FCVTZS_xs = FCVTZS | SixtyFourBits,
1191 FCVTZS_wd = FCVTZS | FP64, 1299 FCVTZS_wd = FCVTZS | FP64,
1192 FCVTZS_xd = FCVTZS | SixtyFourBits | FP64, 1300 FCVTZS_xd = FCVTZS | SixtyFourBits | FP64,
1193 FCVTZU = FPIntegerConvertFixed | 0x00190000, 1301 FCVTZU = FPIntegerConvertFixed | 0x00190000,
1194 FCVTZU_ws = FCVTZU, 1302 FCVTZU_ws = FCVTZU,
1195 FCVTZU_xs = FCVTZU | SixtyFourBits, 1303 FCVTZU_xs = FCVTZU | SixtyFourBits,
1196 FCVTZU_wd = FCVTZU | FP64, 1304 FCVTZU_wd = FCVTZU | FP64,
1197 FCVTZU_xd = FCVTZU | SixtyFourBits | FP64, 1305 FCVTZU_xd = FCVTZU | SixtyFourBits | FP64,
1198 SCVTF = FPIntegerConvertFixed | 0x00020000, 1306 SCVTF = FPIntegerConvertFixed | 0x00020000,
1199 SCVTF_sw = SCVTF, 1307 SCVTF_sw = SCVTF,
1200 SCVTF_sx = SCVTF | SixtyFourBits, 1308 SCVTF_sx = SCVTF | SixtyFourBits,
1201 SCVTF_dw = SCVTF | FP64, 1309 SCVTF_dw = SCVTF | FP64,
1202 SCVTF_dx = SCVTF | SixtyFourBits | FP64, 1310 SCVTF_dx = SCVTF | SixtyFourBits | FP64,
1203 UCVTF = FPIntegerConvertFixed | 0x00030000, 1311 UCVTF = FPIntegerConvertFixed | 0x00030000,
1204 UCVTF_sw = UCVTF, 1312 UCVTF_sw = UCVTF,
1205 UCVTF_sx = UCVTF | SixtyFourBits, 1313 UCVTF_sx = UCVTF | SixtyFourBits,
1206 UCVTF_dw = UCVTF | FP64, 1314 UCVTF_dw = UCVTF | FP64,
1207 UCVTF_dx = UCVTF | SixtyFourBits | FP64, 1315 UCVTF_dx = UCVTF | SixtyFourBits | FP64,
1208 FCVTAS = FPIntegerConvertFixed | 0x00040000, 1316 FCVTAS = FPIntegerConvertFixed | 0x00040000,
1209 FCVTAS_ws = FCVTAS, 1317 FCVTAS_ws = FCVTAS,
1210 FCVTAS_xs = FCVTAS | SixtyFourBits, 1318 FCVTAS_xs = FCVTAS | SixtyFourBits,
1211 FCVTAS_wd = FCVTAS | FP64, 1319 FCVTAS_wd = FCVTAS | FP64,
1212 FCVTAS_xd = FCVTAS | SixtyFourBits | FP64, 1320 FCVTAS_xd = FCVTAS | SixtyFourBits | FP64,
1213 FCVTAU = FPIntegerConvertFixed | 0x00050000, 1321 FCVTAU = FPIntegerConvertFixed | 0x00050000,
1214 FCVTAU_ws = FCVTAU, 1322 FCVTAU_ws = FCVTAU,
1215 FCVTAU_xs = FCVTAU | SixtyFourBits, 1323 FCVTAU_xs = FCVTAU | SixtyFourBits,
1216 FCVTAU_wd = FCVTAU | FP64, 1324 FCVTAU_wd = FCVTAU | FP64,
1217 FCVTAU_xd = FCVTAU | SixtyFourBits | FP64, 1325 FCVTAU_xd = FCVTAU | SixtyFourBits | FP64,
1218 FMOV_ws = FPIntegerConvertFixed | 0x00060000, 1326 FMOV_ws = FPIntegerConvertFixed | 0x00060000,
1219 FMOV_sw = FPIntegerConvertFixed | 0x00070000, 1327 FMOV_sw = FPIntegerConvertFixed | 0x00070000,
1220 FMOV_xd = FMOV_ws | SixtyFourBits | FP64, 1328 FMOV_xd = FMOV_ws | SixtyFourBits | FP64,
1221 FMOV_dx = FMOV_sw | SixtyFourBits | FP64 1329 FMOV_dx = FMOV_sw | SixtyFourBits | FP64,
1330 FMOV_d1_x = FPIntegerConvertFixed | SixtyFourBits | 0x008F0000,
1331 FMOV_x_d1 = FPIntegerConvertFixed | SixtyFourBits | 0x008E0000
1222 }; 1332 };
1223 1333
1224 // Conversion between fixed point and floating point. 1334 // Conversion between fixed point and floating point.
1225 enum FPFixedPointConvertOp { 1335 enum FPFixedPointConvertOp {
1226 FPFixedPointConvertFixed = 0x1E000000, 1336 FPFixedPointConvertFixed = 0x1E000000,
1227 FPFixedPointConvertFMask = 0x5F200000, 1337 FPFixedPointConvertFMask = 0x5F200000,
1228 FPFixedPointConvertMask = 0xFFFF0000, 1338 FPFixedPointConvertMask = 0xFFFF0000,
1229 FCVTZS_fixed = FPFixedPointConvertFixed | 0x00180000, 1339 FCVTZS_fixed = FPFixedPointConvertFixed | 0x00180000,
1230 FCVTZS_ws_fixed = FCVTZS_fixed, 1340 FCVTZS_ws_fixed = FCVTZS_fixed,
1231 FCVTZS_xs_fixed = FCVTZS_fixed | SixtyFourBits, 1341 FCVTZS_xs_fixed = FCVTZS_fixed | SixtyFourBits,
1232 FCVTZS_wd_fixed = FCVTZS_fixed | FP64, 1342 FCVTZS_wd_fixed = FCVTZS_fixed | FP64,
1233 FCVTZS_xd_fixed = FCVTZS_fixed | SixtyFourBits | FP64, 1343 FCVTZS_xd_fixed = FCVTZS_fixed | SixtyFourBits | FP64,
1234 FCVTZU_fixed = FPFixedPointConvertFixed | 0x00190000, 1344 FCVTZU_fixed = FPFixedPointConvertFixed | 0x00190000,
1235 FCVTZU_ws_fixed = FCVTZU_fixed, 1345 FCVTZU_ws_fixed = FCVTZU_fixed,
1236 FCVTZU_xs_fixed = FCVTZU_fixed | SixtyFourBits, 1346 FCVTZU_xs_fixed = FCVTZU_fixed | SixtyFourBits,
1237 FCVTZU_wd_fixed = FCVTZU_fixed | FP64, 1347 FCVTZU_wd_fixed = FCVTZU_fixed | FP64,
1238 FCVTZU_xd_fixed = FCVTZU_fixed | SixtyFourBits | FP64, 1348 FCVTZU_xd_fixed = FCVTZU_fixed | SixtyFourBits | FP64,
1239 SCVTF_fixed = FPFixedPointConvertFixed | 0x00020000, 1349 SCVTF_fixed = FPFixedPointConvertFixed | 0x00020000,
1240 SCVTF_sw_fixed = SCVTF_fixed, 1350 SCVTF_sw_fixed = SCVTF_fixed,
1241 SCVTF_sx_fixed = SCVTF_fixed | SixtyFourBits, 1351 SCVTF_sx_fixed = SCVTF_fixed | SixtyFourBits,
1242 SCVTF_dw_fixed = SCVTF_fixed | FP64, 1352 SCVTF_dw_fixed = SCVTF_fixed | FP64,
1243 SCVTF_dx_fixed = SCVTF_fixed | SixtyFourBits | FP64, 1353 SCVTF_dx_fixed = SCVTF_fixed | SixtyFourBits | FP64,
1244 UCVTF_fixed = FPFixedPointConvertFixed | 0x00030000, 1354 UCVTF_fixed = FPFixedPointConvertFixed | 0x00030000,
1245 UCVTF_sw_fixed = UCVTF_fixed, 1355 UCVTF_sw_fixed = UCVTF_fixed,
1246 UCVTF_sx_fixed = UCVTF_fixed | SixtyFourBits, 1356 UCVTF_sx_fixed = UCVTF_fixed | SixtyFourBits,
1247 UCVTF_dw_fixed = UCVTF_fixed | FP64, 1357 UCVTF_dw_fixed = UCVTF_fixed | FP64,
1248 UCVTF_dx_fixed = UCVTF_fixed | SixtyFourBits | FP64 1358 UCVTF_dx_fixed = UCVTF_fixed | SixtyFourBits | FP64
1249 }; 1359 };
1250 1360
1361 // NEON instructions with two register operands.
1362 enum NEON2RegMiscOp {
1363 NEON2RegMiscFixed = 0x0E200800,
1364 NEON2RegMiscFMask = 0x9F3E0C00,
1365 NEON2RegMiscMask = 0xBF3FFC00,
1366 NEON2RegMiscUBit = 0x20000000,
1367 NEON_REV64 = NEON2RegMiscFixed | 0x00000000,
1368 NEON_REV32 = NEON2RegMiscFixed | 0x20000000,
1369 NEON_REV16 = NEON2RegMiscFixed | 0x00001000,
1370 NEON_SADDLP = NEON2RegMiscFixed | 0x00002000,
1371 NEON_UADDLP = NEON_SADDLP | NEON2RegMiscUBit,
1372 NEON_SUQADD = NEON2RegMiscFixed | 0x00003000,
1373 NEON_USQADD = NEON_SUQADD | NEON2RegMiscUBit,
1374 NEON_CLS = NEON2RegMiscFixed | 0x00004000,
1375 NEON_CLZ = NEON2RegMiscFixed | 0x20004000,
1376 NEON_CNT = NEON2RegMiscFixed | 0x00005000,
1377 NEON_RBIT_NOT = NEON2RegMiscFixed | 0x20005000,
1378 NEON_SADALP = NEON2RegMiscFixed | 0x00006000,
1379 NEON_UADALP = NEON_SADALP | NEON2RegMiscUBit,
1380 NEON_SQABS = NEON2RegMiscFixed | 0x00007000,
1381 NEON_SQNEG = NEON2RegMiscFixed | 0x20007000,
1382 NEON_CMGT_zero = NEON2RegMiscFixed | 0x00008000,
1383 NEON_CMGE_zero = NEON2RegMiscFixed | 0x20008000,
1384 NEON_CMEQ_zero = NEON2RegMiscFixed | 0x00009000,
1385 NEON_CMLE_zero = NEON2RegMiscFixed | 0x20009000,
1386 NEON_CMLT_zero = NEON2RegMiscFixed | 0x0000A000,
1387 NEON_ABS = NEON2RegMiscFixed | 0x0000B000,
1388 NEON_NEG = NEON2RegMiscFixed | 0x2000B000,
1389 NEON_XTN = NEON2RegMiscFixed | 0x00012000,
1390 NEON_SQXTUN = NEON2RegMiscFixed | 0x20012000,
1391 NEON_SHLL = NEON2RegMiscFixed | 0x20013000,
1392 NEON_SQXTN = NEON2RegMiscFixed | 0x00014000,
1393 NEON_UQXTN = NEON_SQXTN | NEON2RegMiscUBit,
1394
1395 NEON2RegMiscOpcode = 0x0001F000,
1396 NEON_RBIT_NOT_opcode = NEON_RBIT_NOT & NEON2RegMiscOpcode,
1397 NEON_NEG_opcode = NEON_NEG & NEON2RegMiscOpcode,
1398 NEON_XTN_opcode = NEON_XTN & NEON2RegMiscOpcode,
1399 NEON_UQXTN_opcode = NEON_UQXTN & NEON2RegMiscOpcode,
1400
1401 // These instructions use only one bit of the size field. The other bit is
1402 // used to distinguish between instructions.
1403 NEON2RegMiscFPMask = NEON2RegMiscMask | 0x00800000,
1404 NEON_FABS = NEON2RegMiscFixed | 0x0080F000,
1405 NEON_FNEG = NEON2RegMiscFixed | 0x2080F000,
1406 NEON_FCVTN = NEON2RegMiscFixed | 0x00016000,
1407 NEON_FCVTXN = NEON2RegMiscFixed | 0x20016000,
1408 NEON_FCVTL = NEON2RegMiscFixed | 0x00017000,
1409 NEON_FRINTN = NEON2RegMiscFixed | 0x00018000,
1410 NEON_FRINTA = NEON2RegMiscFixed | 0x20018000,
1411 NEON_FRINTP = NEON2RegMiscFixed | 0x00818000,
1412 NEON_FRINTM = NEON2RegMiscFixed | 0x00019000,
1413 NEON_FRINTX = NEON2RegMiscFixed | 0x20019000,
1414 NEON_FRINTZ = NEON2RegMiscFixed | 0x00819000,
1415 NEON_FRINTI = NEON2RegMiscFixed | 0x20819000,
1416 NEON_FCVTNS = NEON2RegMiscFixed | 0x0001A000,
1417 NEON_FCVTNU = NEON_FCVTNS | NEON2RegMiscUBit,
1418 NEON_FCVTPS = NEON2RegMiscFixed | 0x0081A000,
1419 NEON_FCVTPU = NEON_FCVTPS | NEON2RegMiscUBit,
1420 NEON_FCVTMS = NEON2RegMiscFixed | 0x0001B000,
1421 NEON_FCVTMU = NEON_FCVTMS | NEON2RegMiscUBit,
1422 NEON_FCVTZS = NEON2RegMiscFixed | 0x0081B000,
1423 NEON_FCVTZU = NEON_FCVTZS | NEON2RegMiscUBit,
1424 NEON_FCVTAS = NEON2RegMiscFixed | 0x0001C000,
1425 NEON_FCVTAU = NEON_FCVTAS | NEON2RegMiscUBit,
1426 NEON_FSQRT = NEON2RegMiscFixed | 0x2081F000,
1427 NEON_SCVTF = NEON2RegMiscFixed | 0x0001D000,
1428 NEON_UCVTF = NEON_SCVTF | NEON2RegMiscUBit,
1429 NEON_URSQRTE = NEON2RegMiscFixed | 0x2081C000,
1430 NEON_URECPE = NEON2RegMiscFixed | 0x0081C000,
1431 NEON_FRSQRTE = NEON2RegMiscFixed | 0x2081D000,
1432 NEON_FRECPE = NEON2RegMiscFixed | 0x0081D000,
1433 NEON_FCMGT_zero = NEON2RegMiscFixed | 0x0080C000,
1434 NEON_FCMGE_zero = NEON2RegMiscFixed | 0x2080C000,
1435 NEON_FCMEQ_zero = NEON2RegMiscFixed | 0x0080D000,
1436 NEON_FCMLE_zero = NEON2RegMiscFixed | 0x2080D000,
1437 NEON_FCMLT_zero = NEON2RegMiscFixed | 0x0080E000,
1438
1439 NEON_FCVTL_opcode = NEON_FCVTL & NEON2RegMiscOpcode,
1440 NEON_FCVTN_opcode = NEON_FCVTN & NEON2RegMiscOpcode
1441 };
1442
1443 // NEON instructions with three same-type operands.
1444 enum NEON3SameOp {
1445 NEON3SameFixed = 0x0E200400,
1446 NEON3SameFMask = 0x9F200400,
1447 NEON3SameMask = 0xBF20FC00,
1448 NEON3SameUBit = 0x20000000,
1449 NEON_ADD = NEON3SameFixed | 0x00008000,
1450 NEON_ADDP = NEON3SameFixed | 0x0000B800,
1451 NEON_SHADD = NEON3SameFixed | 0x00000000,
1452 NEON_SHSUB = NEON3SameFixed | 0x00002000,
1453 NEON_SRHADD = NEON3SameFixed | 0x00001000,
1454 NEON_CMEQ = NEON3SameFixed | NEON3SameUBit | 0x00008800,
1455 NEON_CMGE = NEON3SameFixed | 0x00003800,
1456 NEON_CMGT = NEON3SameFixed | 0x00003000,
1457 NEON_CMHI = NEON3SameFixed | NEON3SameUBit | NEON_CMGT,
1458 NEON_CMHS = NEON3SameFixed | NEON3SameUBit | NEON_CMGE,
1459 NEON_CMTST = NEON3SameFixed | 0x00008800,
1460 NEON_MLA = NEON3SameFixed | 0x00009000,
1461 NEON_MLS = NEON3SameFixed | 0x20009000,
1462 NEON_MUL = NEON3SameFixed | 0x00009800,
1463 NEON_PMUL = NEON3SameFixed | 0x20009800,
1464 NEON_SRSHL = NEON3SameFixed | 0x00005000,
1465 NEON_SQSHL = NEON3SameFixed | 0x00004800,
1466 NEON_SQRSHL = NEON3SameFixed | 0x00005800,
1467 NEON_SSHL = NEON3SameFixed | 0x00004000,
1468 NEON_SMAX = NEON3SameFixed | 0x00006000,
1469 NEON_SMAXP = NEON3SameFixed | 0x0000A000,
1470 NEON_SMIN = NEON3SameFixed | 0x00006800,
1471 NEON_SMINP = NEON3SameFixed | 0x0000A800,
1472 NEON_SABD = NEON3SameFixed | 0x00007000,
1473 NEON_SABA = NEON3SameFixed | 0x00007800,
1474 NEON_UABD = NEON3SameFixed | NEON3SameUBit | NEON_SABD,
1475 NEON_UABA = NEON3SameFixed | NEON3SameUBit | NEON_SABA,
1476 NEON_SQADD = NEON3SameFixed | 0x00000800,
1477 NEON_SQSUB = NEON3SameFixed | 0x00002800,
1478 NEON_SUB = NEON3SameFixed | NEON3SameUBit | 0x00008000,
1479 NEON_UHADD = NEON3SameFixed | NEON3SameUBit | NEON_SHADD,
1480 NEON_UHSUB = NEON3SameFixed | NEON3SameUBit | NEON_SHSUB,
1481 NEON_URHADD = NEON3SameFixed | NEON3SameUBit | NEON_SRHADD,
1482 NEON_UMAX = NEON3SameFixed | NEON3SameUBit | NEON_SMAX,
1483 NEON_UMAXP = NEON3SameFixed | NEON3SameUBit | NEON_SMAXP,
1484 NEON_UMIN = NEON3SameFixed | NEON3SameUBit | NEON_SMIN,
1485 NEON_UMINP = NEON3SameFixed | NEON3SameUBit | NEON_SMINP,
1486 NEON_URSHL = NEON3SameFixed | NEON3SameUBit | NEON_SRSHL,
1487 NEON_UQADD = NEON3SameFixed | NEON3SameUBit | NEON_SQADD,
1488 NEON_UQRSHL = NEON3SameFixed | NEON3SameUBit | NEON_SQRSHL,
1489 NEON_UQSHL = NEON3SameFixed | NEON3SameUBit | NEON_SQSHL,
1490 NEON_UQSUB = NEON3SameFixed | NEON3SameUBit | NEON_SQSUB,
1491 NEON_USHL = NEON3SameFixed | NEON3SameUBit | NEON_SSHL,
1492 NEON_SQDMULH = NEON3SameFixed | 0x0000B000,
1493 NEON_SQRDMULH = NEON3SameFixed | 0x2000B000,
1494
1495 // NEON floating point instructions with three same-type operands.
1496 NEON3SameFPFixed = NEON3SameFixed | 0x0000C000,
1497 NEON3SameFPFMask = NEON3SameFMask | 0x0000C000,
1498 NEON3SameFPMask = NEON3SameMask | 0x00800000,
1499 NEON_FADD = NEON3SameFixed | 0x0000D000,
1500 NEON_FSUB = NEON3SameFixed | 0x0080D000,
1501 NEON_FMUL = NEON3SameFixed | 0x2000D800,
1502 NEON_FDIV = NEON3SameFixed | 0x2000F800,
1503 NEON_FMAX = NEON3SameFixed | 0x0000F000,
1504 NEON_FMAXNM = NEON3SameFixed | 0x0000C000,
1505 NEON_FMAXP = NEON3SameFixed | 0x2000F000,
1506 NEON_FMAXNMP = NEON3SameFixed | 0x2000C000,
1507 NEON_FMIN = NEON3SameFixed | 0x0080F000,
1508 NEON_FMINNM = NEON3SameFixed | 0x0080C000,
1509 NEON_FMINP = NEON3SameFixed | 0x2080F000,
1510 NEON_FMINNMP = NEON3SameFixed | 0x2080C000,
1511 NEON_FMLA = NEON3SameFixed | 0x0000C800,
1512 NEON_FMLS = NEON3SameFixed | 0x0080C800,
1513 NEON_FMULX = NEON3SameFixed | 0x0000D800,
1514 NEON_FRECPS = NEON3SameFixed | 0x0000F800,
1515 NEON_FRSQRTS = NEON3SameFixed | 0x0080F800,
1516 NEON_FABD = NEON3SameFixed | 0x2080D000,
1517 NEON_FADDP = NEON3SameFixed | 0x2000D000,
1518 NEON_FCMEQ = NEON3SameFixed | 0x0000E000,
1519 NEON_FCMGE = NEON3SameFixed | 0x2000E000,
1520 NEON_FCMGT = NEON3SameFixed | 0x2080E000,
1521 NEON_FACGE = NEON3SameFixed | 0x2000E800,
1522 NEON_FACGT = NEON3SameFixed | 0x2080E800,
1523
1524 // NEON logical instructions with three same-type operands.
1525 NEON3SameLogicalFixed = NEON3SameFixed | 0x00001800,
1526 NEON3SameLogicalFMask = NEON3SameFMask | 0x0000F800,
1527 NEON3SameLogicalMask = 0xBFE0FC00,
1528 NEON3SameLogicalFormatMask = NEON_Q,
1529 NEON_AND = NEON3SameLogicalFixed | 0x00000000,
1530 NEON_ORR = NEON3SameLogicalFixed | 0x00A00000,
1531 NEON_ORN = NEON3SameLogicalFixed | 0x00C00000,
1532 NEON_EOR = NEON3SameLogicalFixed | 0x20000000,
1533 NEON_BIC = NEON3SameLogicalFixed | 0x00400000,
1534 NEON_BIF = NEON3SameLogicalFixed | 0x20C00000,
1535 NEON_BIT = NEON3SameLogicalFixed | 0x20800000,
1536 NEON_BSL = NEON3SameLogicalFixed | 0x20400000
1537 };
1538
1539 // NEON instructions with three different-type operands.
1540 enum NEON3DifferentOp {
1541 NEON3DifferentFixed = 0x0E200000,
1542 NEON3DifferentFMask = 0x9F200C00,
1543 NEON3DifferentMask = 0xFF20FC00,
1544 NEON_ADDHN = NEON3DifferentFixed | 0x00004000,
1545 NEON_ADDHN2 = NEON_ADDHN | NEON_Q,
1546 NEON_PMULL = NEON3DifferentFixed | 0x0000E000,
1547 NEON_PMULL2 = NEON_PMULL | NEON_Q,
1548 NEON_RADDHN = NEON3DifferentFixed | 0x20004000,
1549 NEON_RADDHN2 = NEON_RADDHN | NEON_Q,
1550 NEON_RSUBHN = NEON3DifferentFixed | 0x20006000,
1551 NEON_RSUBHN2 = NEON_RSUBHN | NEON_Q,
1552 NEON_SABAL = NEON3DifferentFixed | 0x00005000,
1553 NEON_SABAL2 = NEON_SABAL | NEON_Q,
1554 NEON_SABDL = NEON3DifferentFixed | 0x00007000,
1555 NEON_SABDL2 = NEON_SABDL | NEON_Q,
1556 NEON_SADDL = NEON3DifferentFixed | 0x00000000,
1557 NEON_SADDL2 = NEON_SADDL | NEON_Q,
1558 NEON_SADDW = NEON3DifferentFixed | 0x00001000,
1559 NEON_SADDW2 = NEON_SADDW | NEON_Q,
1560 NEON_SMLAL = NEON3DifferentFixed | 0x00008000,
1561 NEON_SMLAL2 = NEON_SMLAL | NEON_Q,
1562 NEON_SMLSL = NEON3DifferentFixed | 0x0000A000,
1563 NEON_SMLSL2 = NEON_SMLSL | NEON_Q,
1564 NEON_SMULL = NEON3DifferentFixed | 0x0000C000,
1565 NEON_SMULL2 = NEON_SMULL | NEON_Q,
1566 NEON_SSUBL = NEON3DifferentFixed | 0x00002000,
1567 NEON_SSUBL2 = NEON_SSUBL | NEON_Q,
1568 NEON_SSUBW = NEON3DifferentFixed | 0x00003000,
1569 NEON_SSUBW2 = NEON_SSUBW | NEON_Q,
1570 NEON_SQDMLAL = NEON3DifferentFixed | 0x00009000,
1571 NEON_SQDMLAL2 = NEON_SQDMLAL | NEON_Q,
1572 NEON_SQDMLSL = NEON3DifferentFixed | 0x0000B000,
1573 NEON_SQDMLSL2 = NEON_SQDMLSL | NEON_Q,
1574 NEON_SQDMULL = NEON3DifferentFixed | 0x0000D000,
1575 NEON_SQDMULL2 = NEON_SQDMULL | NEON_Q,
1576 NEON_SUBHN = NEON3DifferentFixed | 0x00006000,
1577 NEON_SUBHN2 = NEON_SUBHN | NEON_Q,
1578 NEON_UABAL = NEON_SABAL | NEON3SameUBit,
1579 NEON_UABAL2 = NEON_UABAL | NEON_Q,
1580 NEON_UABDL = NEON_SABDL | NEON3SameUBit,
1581 NEON_UABDL2 = NEON_UABDL | NEON_Q,
1582 NEON_UADDL = NEON_SADDL | NEON3SameUBit,
1583 NEON_UADDL2 = NEON_UADDL | NEON_Q,
1584 NEON_UADDW = NEON_SADDW | NEON3SameUBit,
1585 NEON_UADDW2 = NEON_UADDW | NEON_Q,
1586 NEON_UMLAL = NEON_SMLAL | NEON3SameUBit,
1587 NEON_UMLAL2 = NEON_UMLAL | NEON_Q,
1588 NEON_UMLSL = NEON_SMLSL | NEON3SameUBit,
1589 NEON_UMLSL2 = NEON_UMLSL | NEON_Q,
1590 NEON_UMULL = NEON_SMULL | NEON3SameUBit,
1591 NEON_UMULL2 = NEON_UMULL | NEON_Q,
1592 NEON_USUBL = NEON_SSUBL | NEON3SameUBit,
1593 NEON_USUBL2 = NEON_USUBL | NEON_Q,
1594 NEON_USUBW = NEON_SSUBW | NEON3SameUBit,
1595 NEON_USUBW2 = NEON_USUBW | NEON_Q
1596 };
1597
1598 // NEON instructions operating across vectors.
1599 enum NEONAcrossLanesOp {
1600 NEONAcrossLanesFixed = 0x0E300800,
1601 NEONAcrossLanesFMask = 0x9F3E0C00,
1602 NEONAcrossLanesMask = 0xBF3FFC00,
1603 NEON_ADDV = NEONAcrossLanesFixed | 0x0001B000,
1604 NEON_SADDLV = NEONAcrossLanesFixed | 0x00003000,
1605 NEON_UADDLV = NEONAcrossLanesFixed | 0x20003000,
1606 NEON_SMAXV = NEONAcrossLanesFixed | 0x0000A000,
1607 NEON_SMINV = NEONAcrossLanesFixed | 0x0001A000,
1608 NEON_UMAXV = NEONAcrossLanesFixed | 0x2000A000,
1609 NEON_UMINV = NEONAcrossLanesFixed | 0x2001A000,
1610
1611 // NEON floating point across instructions.
1612 NEONAcrossLanesFPFixed = NEONAcrossLanesFixed | 0x0000C000,
1613 NEONAcrossLanesFPFMask = NEONAcrossLanesFMask | 0x0000C000,
1614 NEONAcrossLanesFPMask = NEONAcrossLanesMask | 0x00800000,
1615
1616 NEON_FMAXV = NEONAcrossLanesFPFixed | 0x2000F000,
1617 NEON_FMINV = NEONAcrossLanesFPFixed | 0x2080F000,
1618 NEON_FMAXNMV = NEONAcrossLanesFPFixed | 0x2000C000,
1619 NEON_FMINNMV = NEONAcrossLanesFPFixed | 0x2080C000
1620 };
1621
1622 // NEON instructions with indexed element operand.
1623 enum NEONByIndexedElementOp {
1624 NEONByIndexedElementFixed = 0x0F000000,
1625 NEONByIndexedElementFMask = 0x9F000400,
1626 NEONByIndexedElementMask = 0xBF00F400,
1627 NEON_MUL_byelement = NEONByIndexedElementFixed | 0x00008000,
1628 NEON_MLA_byelement = NEONByIndexedElementFixed | 0x20000000,
1629 NEON_MLS_byelement = NEONByIndexedElementFixed | 0x20004000,
1630 NEON_SMULL_byelement = NEONByIndexedElementFixed | 0x0000A000,
1631 NEON_SMLAL_byelement = NEONByIndexedElementFixed | 0x00002000,
1632 NEON_SMLSL_byelement = NEONByIndexedElementFixed | 0x00006000,
1633 NEON_UMULL_byelement = NEONByIndexedElementFixed | 0x2000A000,
1634 NEON_UMLAL_byelement = NEONByIndexedElementFixed | 0x20002000,
1635 NEON_UMLSL_byelement = NEONByIndexedElementFixed | 0x20006000,
1636 NEON_SQDMULL_byelement = NEONByIndexedElementFixed | 0x0000B000,
1637 NEON_SQDMLAL_byelement = NEONByIndexedElementFixed | 0x00003000,
1638 NEON_SQDMLSL_byelement = NEONByIndexedElementFixed | 0x00007000,
1639 NEON_SQDMULH_byelement = NEONByIndexedElementFixed | 0x0000C000,
1640 NEON_SQRDMULH_byelement = NEONByIndexedElementFixed | 0x0000D000,
1641
1642 // Floating point instructions.
1643 NEONByIndexedElementFPFixed = NEONByIndexedElementFixed | 0x00800000,
1644 NEONByIndexedElementFPMask = NEONByIndexedElementMask | 0x00800000,
1645 NEON_FMLA_byelement = NEONByIndexedElementFPFixed | 0x00001000,
1646 NEON_FMLS_byelement = NEONByIndexedElementFPFixed | 0x00005000,
1647 NEON_FMUL_byelement = NEONByIndexedElementFPFixed | 0x00009000,
1648 NEON_FMULX_byelement = NEONByIndexedElementFPFixed | 0x20009000
1649 };
1650
1651 // NEON modified immediate.
1652 enum NEONModifiedImmediateOp {
1653 NEONModifiedImmediateFixed = 0x0F000400,
1654 NEONModifiedImmediateFMask = 0x9FF80400,
1655 NEONModifiedImmediateOpBit = 0x20000000,
1656 NEONModifiedImmediate_MOVI = NEONModifiedImmediateFixed | 0x00000000,
1657 NEONModifiedImmediate_MVNI = NEONModifiedImmediateFixed | 0x20000000,
1658 NEONModifiedImmediate_ORR = NEONModifiedImmediateFixed | 0x00001000,
1659 NEONModifiedImmediate_BIC = NEONModifiedImmediateFixed | 0x20001000
1660 };
1661
1662 // NEON extract.
1663 enum NEONExtractOp {
1664 NEONExtractFixed = 0x2E000000,
1665 NEONExtractFMask = 0xBF208400,
1666 NEONExtractMask = 0xBFE08400,
1667 NEON_EXT = NEONExtractFixed | 0x00000000
1668 };
1669
1670 enum NEONLoadStoreMultiOp {
1671 NEONLoadStoreMultiL = 0x00400000,
1672 NEONLoadStoreMulti1_1v = 0x00007000,
1673 NEONLoadStoreMulti1_2v = 0x0000A000,
1674 NEONLoadStoreMulti1_3v = 0x00006000,
1675 NEONLoadStoreMulti1_4v = 0x00002000,
1676 NEONLoadStoreMulti2 = 0x00008000,
1677 NEONLoadStoreMulti3 = 0x00004000,
1678 NEONLoadStoreMulti4 = 0x00000000
1679 };
1680
1681 // NEON load/store multiple structures.
1682 enum NEONLoadStoreMultiStructOp {
1683 NEONLoadStoreMultiStructFixed = 0x0C000000,
1684 NEONLoadStoreMultiStructFMask = 0xBFBF0000,
1685 NEONLoadStoreMultiStructMask = 0xBFFFF000,
1686 NEONLoadStoreMultiStructStore = NEONLoadStoreMultiStructFixed,
1687 NEONLoadStoreMultiStructLoad =
1688 NEONLoadStoreMultiStructFixed | NEONLoadStoreMultiL,
1689 NEON_LD1_1v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_1v,
1690 NEON_LD1_2v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_2v,
1691 NEON_LD1_3v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_3v,
1692 NEON_LD1_4v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_4v,
1693 NEON_LD2 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti2,
1694 NEON_LD3 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti3,
1695 NEON_LD4 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti4,
1696 NEON_ST1_1v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_1v,
1697 NEON_ST1_2v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_2v,
1698 NEON_ST1_3v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_3v,
1699 NEON_ST1_4v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_4v,
1700 NEON_ST2 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti2,
1701 NEON_ST3 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti3,
1702 NEON_ST4 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti4
1703 };
1704
1705 // NEON load/store multiple structures with post-index addressing.
1706 enum NEONLoadStoreMultiStructPostIndexOp {
1707 NEONLoadStoreMultiStructPostIndexFixed = 0x0C800000,
1708 NEONLoadStoreMultiStructPostIndexFMask = 0xBFA00000,
1709 NEONLoadStoreMultiStructPostIndexMask = 0xBFE0F000,
1710 NEONLoadStoreMultiStructPostIndex = 0x00800000,
1711 NEON_LD1_1v_post = NEON_LD1_1v | NEONLoadStoreMultiStructPostIndex,
1712 NEON_LD1_2v_post = NEON_LD1_2v | NEONLoadStoreMultiStructPostIndex,
1713 NEON_LD1_3v_post = NEON_LD1_3v | NEONLoadStoreMultiStructPostIndex,
1714 NEON_LD1_4v_post = NEON_LD1_4v | NEONLoadStoreMultiStructPostIndex,
1715 NEON_LD2_post = NEON_LD2 | NEONLoadStoreMultiStructPostIndex,
1716 NEON_LD3_post = NEON_LD3 | NEONLoadStoreMultiStructPostIndex,
1717 NEON_LD4_post = NEON_LD4 | NEONLoadStoreMultiStructPostIndex,
1718 NEON_ST1_1v_post = NEON_ST1_1v | NEONLoadStoreMultiStructPostIndex,
1719 NEON_ST1_2v_post = NEON_ST1_2v | NEONLoadStoreMultiStructPostIndex,
1720 NEON_ST1_3v_post = NEON_ST1_3v | NEONLoadStoreMultiStructPostIndex,
1721 NEON_ST1_4v_post = NEON_ST1_4v | NEONLoadStoreMultiStructPostIndex,
1722 NEON_ST2_post = NEON_ST2 | NEONLoadStoreMultiStructPostIndex,
1723 NEON_ST3_post = NEON_ST3 | NEONLoadStoreMultiStructPostIndex,
1724 NEON_ST4_post = NEON_ST4 | NEONLoadStoreMultiStructPostIndex
1725 };
1726
1727 enum NEONLoadStoreSingleOp {
1728 NEONLoadStoreSingle1 = 0x00000000,
1729 NEONLoadStoreSingle2 = 0x00200000,
1730 NEONLoadStoreSingle3 = 0x00002000,
1731 NEONLoadStoreSingle4 = 0x00202000,
1732 NEONLoadStoreSingleL = 0x00400000,
1733 NEONLoadStoreSingle_b = 0x00000000,
1734 NEONLoadStoreSingle_h = 0x00004000,
1735 NEONLoadStoreSingle_s = 0x00008000,
1736 NEONLoadStoreSingle_d = 0x00008400,
1737 NEONLoadStoreSingleAllLanes = 0x0000C000,
1738 NEONLoadStoreSingleLenMask = 0x00202000
1739 };
1740
1741 // NEON load/store single structure.
1742 enum NEONLoadStoreSingleStructOp {
1743 NEONLoadStoreSingleStructFixed = 0x0D000000,
1744 NEONLoadStoreSingleStructFMask = 0xBF9F0000,
1745 NEONLoadStoreSingleStructMask = 0xBFFFE000,
1746 NEONLoadStoreSingleStructStore = NEONLoadStoreSingleStructFixed,
1747 NEONLoadStoreSingleStructLoad =
1748 NEONLoadStoreSingleStructFixed | NEONLoadStoreSingleL,
1749 NEONLoadStoreSingleStructLoad1 =
1750 NEONLoadStoreSingle1 | NEONLoadStoreSingleStructLoad,
1751 NEONLoadStoreSingleStructLoad2 =
1752 NEONLoadStoreSingle2 | NEONLoadStoreSingleStructLoad,
1753 NEONLoadStoreSingleStructLoad3 =
1754 NEONLoadStoreSingle3 | NEONLoadStoreSingleStructLoad,
1755 NEONLoadStoreSingleStructLoad4 =
1756 NEONLoadStoreSingle4 | NEONLoadStoreSingleStructLoad,
1757 NEONLoadStoreSingleStructStore1 =
1758 NEONLoadStoreSingle1 | NEONLoadStoreSingleStructFixed,
1759 NEONLoadStoreSingleStructStore2 =
1760 NEONLoadStoreSingle2 | NEONLoadStoreSingleStructFixed,
1761 NEONLoadStoreSingleStructStore3 =
1762 NEONLoadStoreSingle3 | NEONLoadStoreSingleStructFixed,
1763 NEONLoadStoreSingleStructStore4 =
1764 NEONLoadStoreSingle4 | NEONLoadStoreSingleStructFixed,
1765 NEON_LD1_b = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_b,
1766 NEON_LD1_h = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_h,
1767 NEON_LD1_s = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_s,
1768 NEON_LD1_d = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_d,
1769 NEON_LD1R = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingleAllLanes,
1770 NEON_ST1_b = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_b,
1771 NEON_ST1_h = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_h,
1772 NEON_ST1_s = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_s,
1773 NEON_ST1_d = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_d,
1774
1775 NEON_LD2_b = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_b,
1776 NEON_LD2_h = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_h,
1777 NEON_LD2_s = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_s,
1778 NEON_LD2_d = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_d,
1779 NEON_LD2R = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingleAllLanes,
1780 NEON_ST2_b = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_b,
1781 NEON_ST2_h = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_h,
1782 NEON_ST2_s = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_s,
1783 NEON_ST2_d = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_d,
1784
1785 NEON_LD3_b = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_b,
1786 NEON_LD3_h = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_h,
1787 NEON_LD3_s = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_s,
1788 NEON_LD3_d = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_d,
1789 NEON_LD3R = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingleAllLanes,
1790 NEON_ST3_b = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_b,
1791 NEON_ST3_h = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_h,
1792 NEON_ST3_s = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_s,
1793 NEON_ST3_d = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_d,
1794
1795 NEON_LD4_b = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_b,
1796 NEON_LD4_h = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_h,
1797 NEON_LD4_s = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_s,
1798 NEON_LD4_d = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_d,
1799 NEON_LD4R = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingleAllLanes,
1800 NEON_ST4_b = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_b,
1801 NEON_ST4_h = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_h,
1802 NEON_ST4_s = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_s,
1803 NEON_ST4_d = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_d
1804 };
1805
1806 // NEON load/store single structure with post-index addressing.
1807 enum NEONLoadStoreSingleStructPostIndexOp {
1808 NEONLoadStoreSingleStructPostIndexFixed = 0x0D800000,
1809 NEONLoadStoreSingleStructPostIndexFMask = 0xBF800000,
1810 NEONLoadStoreSingleStructPostIndexMask = 0xBFE0E000,
1811 NEONLoadStoreSingleStructPostIndex = 0x00800000,
1812 NEON_LD1_b_post = NEON_LD1_b | NEONLoadStoreSingleStructPostIndex,
1813 NEON_LD1_h_post = NEON_LD1_h | NEONLoadStoreSingleStructPostIndex,
1814 NEON_LD1_s_post = NEON_LD1_s | NEONLoadStoreSingleStructPostIndex,
1815 NEON_LD1_d_post = NEON_LD1_d | NEONLoadStoreSingleStructPostIndex,
1816 NEON_LD1R_post = NEON_LD1R | NEONLoadStoreSingleStructPostIndex,
1817 NEON_ST1_b_post = NEON_ST1_b | NEONLoadStoreSingleStructPostIndex,
1818 NEON_ST1_h_post = NEON_ST1_h | NEONLoadStoreSingleStructPostIndex,
1819 NEON_ST1_s_post = NEON_ST1_s | NEONLoadStoreSingleStructPostIndex,
1820 NEON_ST1_d_post = NEON_ST1_d | NEONLoadStoreSingleStructPostIndex,
1821
1822 NEON_LD2_b_post = NEON_LD2_b | NEONLoadStoreSingleStructPostIndex,
1823 NEON_LD2_h_post = NEON_LD2_h | NEONLoadStoreSingleStructPostIndex,
1824 NEON_LD2_s_post = NEON_LD2_s | NEONLoadStoreSingleStructPostIndex,
1825 NEON_LD2_d_post = NEON_LD2_d | NEONLoadStoreSingleStructPostIndex,
1826 NEON_LD2R_post = NEON_LD2R | NEONLoadStoreSingleStructPostIndex,
1827 NEON_ST2_b_post = NEON_ST2_b | NEONLoadStoreSingleStructPostIndex,
1828 NEON_ST2_h_post = NEON_ST2_h | NEONLoadStoreSingleStructPostIndex,
1829 NEON_ST2_s_post = NEON_ST2_s | NEONLoadStoreSingleStructPostIndex,
1830 NEON_ST2_d_post = NEON_ST2_d | NEONLoadStoreSingleStructPostIndex,
1831
1832 NEON_LD3_b_post = NEON_LD3_b | NEONLoadStoreSingleStructPostIndex,
1833 NEON_LD3_h_post = NEON_LD3_h | NEONLoadStoreSingleStructPostIndex,
1834 NEON_LD3_s_post = NEON_LD3_s | NEONLoadStoreSingleStructPostIndex,
1835 NEON_LD3_d_post = NEON_LD3_d | NEONLoadStoreSingleStructPostIndex,
1836 NEON_LD3R_post = NEON_LD3R | NEONLoadStoreSingleStructPostIndex,
1837 NEON_ST3_b_post = NEON_ST3_b | NEONLoadStoreSingleStructPostIndex,
1838 NEON_ST3_h_post = NEON_ST3_h | NEONLoadStoreSingleStructPostIndex,
1839 NEON_ST3_s_post = NEON_ST3_s | NEONLoadStoreSingleStructPostIndex,
1840 NEON_ST3_d_post = NEON_ST3_d | NEONLoadStoreSingleStructPostIndex,
1841
1842 NEON_LD4_b_post = NEON_LD4_b | NEONLoadStoreSingleStructPostIndex,
1843 NEON_LD4_h_post = NEON_LD4_h | NEONLoadStoreSingleStructPostIndex,
1844 NEON_LD4_s_post = NEON_LD4_s | NEONLoadStoreSingleStructPostIndex,
1845 NEON_LD4_d_post = NEON_LD4_d | NEONLoadStoreSingleStructPostIndex,
1846 NEON_LD4R_post = NEON_LD4R | NEONLoadStoreSingleStructPostIndex,
1847 NEON_ST4_b_post = NEON_ST4_b | NEONLoadStoreSingleStructPostIndex,
1848 NEON_ST4_h_post = NEON_ST4_h | NEONLoadStoreSingleStructPostIndex,
1849 NEON_ST4_s_post = NEON_ST4_s | NEONLoadStoreSingleStructPostIndex,
1850 NEON_ST4_d_post = NEON_ST4_d | NEONLoadStoreSingleStructPostIndex
1851 };
1852
1853 // NEON register copy.
1854 enum NEONCopyOp {
1855 NEONCopyFixed = 0x0E000400,
1856 NEONCopyFMask = 0x9FE08400,
1857 NEONCopyMask = 0x3FE08400,
1858 NEONCopyInsElementMask = NEONCopyMask | 0x40000000,
1859 NEONCopyInsGeneralMask = NEONCopyMask | 0x40007800,
1860 NEONCopyDupElementMask = NEONCopyMask | 0x20007800,
1861 NEONCopyDupGeneralMask = NEONCopyDupElementMask,
1862 NEONCopyUmovMask = NEONCopyMask | 0x20007800,
1863 NEONCopySmovMask = NEONCopyMask | 0x20007800,
1864 NEON_INS_ELEMENT = NEONCopyFixed | 0x60000000,
1865 NEON_INS_GENERAL = NEONCopyFixed | 0x40001800,
1866 NEON_DUP_ELEMENT = NEONCopyFixed | 0x00000000,
1867 NEON_DUP_GENERAL = NEONCopyFixed | 0x00000800,
1868 NEON_SMOV = NEONCopyFixed | 0x00002800,
1869 NEON_UMOV = NEONCopyFixed | 0x00003800
1870 };
1871
1872 // NEON scalar instructions with indexed element operand.
1873 enum NEONScalarByIndexedElementOp {
1874 NEONScalarByIndexedElementFixed = 0x5F000000,
1875 NEONScalarByIndexedElementFMask = 0xDF000400,
1876 NEONScalarByIndexedElementMask = 0xFF00F400,
1877 NEON_SQDMLAL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMLAL_byelement,
1878 NEON_SQDMLSL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMLSL_byelement,
1879 NEON_SQDMULL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMULL_byelement,
1880 NEON_SQDMULH_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMULH_byelement,
1881 NEON_SQRDMULH_byelement_scalar =
1882 NEON_Q | NEONScalar | NEON_SQRDMULH_byelement,
1883
1884 // Floating point instructions.
1885 NEONScalarByIndexedElementFPFixed =
1886 NEONScalarByIndexedElementFixed | 0x00800000,
1887 NEONScalarByIndexedElementFPMask =
1888 NEONScalarByIndexedElementMask | 0x00800000,
1889 NEON_FMLA_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLA_byelement,
1890 NEON_FMLS_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLS_byelement,
1891 NEON_FMUL_byelement_scalar = NEON_Q | NEONScalar | NEON_FMUL_byelement,
1892 NEON_FMULX_byelement_scalar = NEON_Q | NEONScalar | NEON_FMULX_byelement
1893 };
1894
1895 // NEON shift immediate.
1896 enum NEONShiftImmediateOp {
1897 NEONShiftImmediateFixed = 0x0F000400,
1898 NEONShiftImmediateFMask = 0x9F800400,
1899 NEONShiftImmediateMask = 0xBF80FC00,
1900 NEONShiftImmediateUBit = 0x20000000,
1901 NEON_SHL = NEONShiftImmediateFixed | 0x00005000,
1902 NEON_SSHLL = NEONShiftImmediateFixed | 0x0000A000,
1903 NEON_USHLL = NEONShiftImmediateFixed | 0x2000A000,
1904 NEON_SLI = NEONShiftImmediateFixed | 0x20005000,
1905 NEON_SRI = NEONShiftImmediateFixed | 0x20004000,
1906 NEON_SHRN = NEONShiftImmediateFixed | 0x00008000,
1907 NEON_RSHRN = NEONShiftImmediateFixed | 0x00008800,
1908 NEON_UQSHRN = NEONShiftImmediateFixed | 0x20009000,
1909 NEON_UQRSHRN = NEONShiftImmediateFixed | 0x20009800,
1910 NEON_SQSHRN = NEONShiftImmediateFixed | 0x00009000,
1911 NEON_SQRSHRN = NEONShiftImmediateFixed | 0x00009800,
1912 NEON_SQSHRUN = NEONShiftImmediateFixed | 0x20008000,
1913 NEON_SQRSHRUN = NEONShiftImmediateFixed | 0x20008800,
1914 NEON_SSHR = NEONShiftImmediateFixed | 0x00000000,
1915 NEON_SRSHR = NEONShiftImmediateFixed | 0x00002000,
1916 NEON_USHR = NEONShiftImmediateFixed | 0x20000000,
1917 NEON_URSHR = NEONShiftImmediateFixed | 0x20002000,
1918 NEON_SSRA = NEONShiftImmediateFixed | 0x00001000,
1919 NEON_SRSRA = NEONShiftImmediateFixed | 0x00003000,
1920 NEON_USRA = NEONShiftImmediateFixed | 0x20001000,
1921 NEON_URSRA = NEONShiftImmediateFixed | 0x20003000,
1922 NEON_SQSHLU = NEONShiftImmediateFixed | 0x20006000,
1923 NEON_SCVTF_imm = NEONShiftImmediateFixed | 0x0000E000,
1924 NEON_UCVTF_imm = NEONShiftImmediateFixed | 0x2000E000,
1925 NEON_FCVTZS_imm = NEONShiftImmediateFixed | 0x0000F800,
1926 NEON_FCVTZU_imm = NEONShiftImmediateFixed | 0x2000F800,
1927 NEON_SQSHL_imm = NEONShiftImmediateFixed | 0x00007000,
1928 NEON_UQSHL_imm = NEONShiftImmediateFixed | 0x20007000
1929 };
1930
1931 // NEON scalar register copy.
1932 enum NEONScalarCopyOp {
1933 NEONScalarCopyFixed = 0x5E000400,
1934 NEONScalarCopyFMask = 0xDFE08400,
1935 NEONScalarCopyMask = 0xFFE0FC00,
1936 NEON_DUP_ELEMENT_scalar = NEON_Q | NEONScalar | NEON_DUP_ELEMENT
1937 };
1938
1939 // NEON scalar pairwise instructions.
1940 enum NEONScalarPairwiseOp {
1941 NEONScalarPairwiseFixed = 0x5E300800,
1942 NEONScalarPairwiseFMask = 0xDF3E0C00,
1943 NEONScalarPairwiseMask = 0xFFB1F800,
1944 NEON_ADDP_scalar = NEONScalarPairwiseFixed | 0x0081B000,
1945 NEON_FMAXNMP_scalar = NEONScalarPairwiseFixed | 0x2000C000,
1946 NEON_FMINNMP_scalar = NEONScalarPairwiseFixed | 0x2080C000,
1947 NEON_FADDP_scalar = NEONScalarPairwiseFixed | 0x2000D000,
1948 NEON_FMAXP_scalar = NEONScalarPairwiseFixed | 0x2000F000,
1949 NEON_FMINP_scalar = NEONScalarPairwiseFixed | 0x2080F000
1950 };
1951
1952 // NEON scalar shift immediate.
1953 enum NEONScalarShiftImmediateOp {
1954 NEONScalarShiftImmediateFixed = 0x5F000400,
1955 NEONScalarShiftImmediateFMask = 0xDF800400,
1956 NEONScalarShiftImmediateMask = 0xFF80FC00,
1957 NEON_SHL_scalar = NEON_Q | NEONScalar | NEON_SHL,
1958 NEON_SLI_scalar = NEON_Q | NEONScalar | NEON_SLI,
1959 NEON_SRI_scalar = NEON_Q | NEONScalar | NEON_SRI,
1960 NEON_SSHR_scalar = NEON_Q | NEONScalar | NEON_SSHR,
1961 NEON_USHR_scalar = NEON_Q | NEONScalar | NEON_USHR,
1962 NEON_SRSHR_scalar = NEON_Q | NEONScalar | NEON_SRSHR,
1963 NEON_URSHR_scalar = NEON_Q | NEONScalar | NEON_URSHR,
1964 NEON_SSRA_scalar = NEON_Q | NEONScalar | NEON_SSRA,
1965 NEON_USRA_scalar = NEON_Q | NEONScalar | NEON_USRA,
1966 NEON_SRSRA_scalar = NEON_Q | NEONScalar | NEON_SRSRA,
1967 NEON_URSRA_scalar = NEON_Q | NEONScalar | NEON_URSRA,
1968 NEON_UQSHRN_scalar = NEON_Q | NEONScalar | NEON_UQSHRN,
1969 NEON_UQRSHRN_scalar = NEON_Q | NEONScalar | NEON_UQRSHRN,
1970 NEON_SQSHRN_scalar = NEON_Q | NEONScalar | NEON_SQSHRN,
1971 NEON_SQRSHRN_scalar = NEON_Q | NEONScalar | NEON_SQRSHRN,
1972 NEON_SQSHRUN_scalar = NEON_Q | NEONScalar | NEON_SQSHRUN,
1973 NEON_SQRSHRUN_scalar = NEON_Q | NEONScalar | NEON_SQRSHRUN,
1974 NEON_SQSHLU_scalar = NEON_Q | NEONScalar | NEON_SQSHLU,
1975 NEON_SQSHL_imm_scalar = NEON_Q | NEONScalar | NEON_SQSHL_imm,
1976 NEON_UQSHL_imm_scalar = NEON_Q | NEONScalar | NEON_UQSHL_imm,
1977 NEON_SCVTF_imm_scalar = NEON_Q | NEONScalar | NEON_SCVTF_imm,
1978 NEON_UCVTF_imm_scalar = NEON_Q | NEONScalar | NEON_UCVTF_imm,
1979 NEON_FCVTZS_imm_scalar = NEON_Q | NEONScalar | NEON_FCVTZS_imm,
1980 NEON_FCVTZU_imm_scalar = NEON_Q | NEONScalar | NEON_FCVTZU_imm
1981 };
1982
1983 // NEON table.
1984 enum NEONTableOp {
1985 NEONTableFixed = 0x0E000000,
1986 NEONTableFMask = 0xBF208C00,
1987 NEONTableExt = 0x00001000,
1988 NEONTableMask = 0xBF20FC00,
1989 NEON_TBL_1v = NEONTableFixed | 0x00000000,
1990 NEON_TBL_2v = NEONTableFixed | 0x00002000,
1991 NEON_TBL_3v = NEONTableFixed | 0x00004000,
1992 NEON_TBL_4v = NEONTableFixed | 0x00006000,
1993 NEON_TBX_1v = NEON_TBL_1v | NEONTableExt,
1994 NEON_TBX_2v = NEON_TBL_2v | NEONTableExt,
1995 NEON_TBX_3v = NEON_TBL_3v | NEONTableExt,
1996 NEON_TBX_4v = NEON_TBL_4v | NEONTableExt
1997 };
1998
1999 // NEON perm.
2000 enum NEONPermOp {
2001 NEONPermFixed = 0x0E000800,
2002 NEONPermFMask = 0xBF208C00,
2003 NEONPermMask = 0x3F20FC00,
2004 NEON_UZP1 = NEONPermFixed | 0x00001000,
2005 NEON_TRN1 = NEONPermFixed | 0x00002000,
2006 NEON_ZIP1 = NEONPermFixed | 0x00003000,
2007 NEON_UZP2 = NEONPermFixed | 0x00005000,
2008 NEON_TRN2 = NEONPermFixed | 0x00006000,
2009 NEON_ZIP2 = NEONPermFixed | 0x00007000
2010 };
2011
2012 // NEON scalar instructions with two register operands.
2013 enum NEONScalar2RegMiscOp {
2014 NEONScalar2RegMiscFixed = 0x5E200800,
2015 NEONScalar2RegMiscFMask = 0xDF3E0C00,
2016 NEONScalar2RegMiscMask = NEON_Q | NEONScalar | NEON2RegMiscMask,
2017 NEON_CMGT_zero_scalar = NEON_Q | NEONScalar | NEON_CMGT_zero,
2018 NEON_CMEQ_zero_scalar = NEON_Q | NEONScalar | NEON_CMEQ_zero,
2019 NEON_CMLT_zero_scalar = NEON_Q | NEONScalar | NEON_CMLT_zero,
2020 NEON_CMGE_zero_scalar = NEON_Q | NEONScalar | NEON_CMGE_zero,
2021 NEON_CMLE_zero_scalar = NEON_Q | NEONScalar | NEON_CMLE_zero,
2022 NEON_ABS_scalar = NEON_Q | NEONScalar | NEON_ABS,
2023 NEON_SQABS_scalar = NEON_Q | NEONScalar | NEON_SQABS,
2024 NEON_NEG_scalar = NEON_Q | NEONScalar | NEON_NEG,
2025 NEON_SQNEG_scalar = NEON_Q | NEONScalar | NEON_SQNEG,
2026 NEON_SQXTN_scalar = NEON_Q | NEONScalar | NEON_SQXTN,
2027 NEON_UQXTN_scalar = NEON_Q | NEONScalar | NEON_UQXTN,
2028 NEON_SQXTUN_scalar = NEON_Q | NEONScalar | NEON_SQXTUN,
2029 NEON_SUQADD_scalar = NEON_Q | NEONScalar | NEON_SUQADD,
2030 NEON_USQADD_scalar = NEON_Q | NEONScalar | NEON_USQADD,
2031
2032 NEONScalar2RegMiscOpcode = NEON2RegMiscOpcode,
2033 NEON_NEG_scalar_opcode = NEON_NEG_scalar & NEONScalar2RegMiscOpcode,
2034
2035 NEONScalar2RegMiscFPMask = NEONScalar2RegMiscMask | 0x00800000,
2036 NEON_FRSQRTE_scalar = NEON_Q | NEONScalar | NEON_FRSQRTE,
2037 NEON_FRECPE_scalar = NEON_Q | NEONScalar | NEON_FRECPE,
2038 NEON_SCVTF_scalar = NEON_Q | NEONScalar | NEON_SCVTF,
2039 NEON_UCVTF_scalar = NEON_Q | NEONScalar | NEON_UCVTF,
2040 NEON_FCMGT_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGT_zero,
2041 NEON_FCMEQ_zero_scalar = NEON_Q | NEONScalar | NEON_FCMEQ_zero,
2042 NEON_FCMLT_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLT_zero,
2043 NEON_FCMGE_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGE_zero,
2044 NEON_FCMLE_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLE_zero,
2045 NEON_FRECPX_scalar = NEONScalar2RegMiscFixed | 0x0081F000,
2046 NEON_FCVTNS_scalar = NEON_Q | NEONScalar | NEON_FCVTNS,
2047 NEON_FCVTNU_scalar = NEON_Q | NEONScalar | NEON_FCVTNU,
2048 NEON_FCVTPS_scalar = NEON_Q | NEONScalar | NEON_FCVTPS,
2049 NEON_FCVTPU_scalar = NEON_Q | NEONScalar | NEON_FCVTPU,
2050 NEON_FCVTMS_scalar = NEON_Q | NEONScalar | NEON_FCVTMS,
2051 NEON_FCVTMU_scalar = NEON_Q | NEONScalar | NEON_FCVTMU,
2052 NEON_FCVTZS_scalar = NEON_Q | NEONScalar | NEON_FCVTZS,
2053 NEON_FCVTZU_scalar = NEON_Q | NEONScalar | NEON_FCVTZU,
2054 NEON_FCVTAS_scalar = NEON_Q | NEONScalar | NEON_FCVTAS,
2055 NEON_FCVTAU_scalar = NEON_Q | NEONScalar | NEON_FCVTAU,
2056 NEON_FCVTXN_scalar = NEON_Q | NEONScalar | NEON_FCVTXN
2057 };
2058
2059 // NEON scalar instructions with three same-type operands.
2060 enum NEONScalar3SameOp {
2061 NEONScalar3SameFixed = 0x5E200400,
2062 NEONScalar3SameFMask = 0xDF200400,
2063 NEONScalar3SameMask = 0xFF20FC00,
2064 NEON_ADD_scalar = NEON_Q | NEONScalar | NEON_ADD,
2065 NEON_CMEQ_scalar = NEON_Q | NEONScalar | NEON_CMEQ,
2066 NEON_CMGE_scalar = NEON_Q | NEONScalar | NEON_CMGE,
2067 NEON_CMGT_scalar = NEON_Q | NEONScalar | NEON_CMGT,
2068 NEON_CMHI_scalar = NEON_Q | NEONScalar | NEON_CMHI,
2069 NEON_CMHS_scalar = NEON_Q | NEONScalar | NEON_CMHS,
2070 NEON_CMTST_scalar = NEON_Q | NEONScalar | NEON_CMTST,
2071 NEON_SUB_scalar = NEON_Q | NEONScalar | NEON_SUB,
2072 NEON_UQADD_scalar = NEON_Q | NEONScalar | NEON_UQADD,
2073 NEON_SQADD_scalar = NEON_Q | NEONScalar | NEON_SQADD,
2074 NEON_UQSUB_scalar = NEON_Q | NEONScalar | NEON_UQSUB,
2075 NEON_SQSUB_scalar = NEON_Q | NEONScalar | NEON_SQSUB,
2076 NEON_USHL_scalar = NEON_Q | NEONScalar | NEON_USHL,
2077 NEON_SSHL_scalar = NEON_Q | NEONScalar | NEON_SSHL,
2078 NEON_UQSHL_scalar = NEON_Q | NEONScalar | NEON_UQSHL,
2079 NEON_SQSHL_scalar = NEON_Q | NEONScalar | NEON_SQSHL,
2080 NEON_URSHL_scalar = NEON_Q | NEONScalar | NEON_URSHL,
2081 NEON_SRSHL_scalar = NEON_Q | NEONScalar | NEON_SRSHL,
2082 NEON_UQRSHL_scalar = NEON_Q | NEONScalar | NEON_UQRSHL,
2083 NEON_SQRSHL_scalar = NEON_Q | NEONScalar | NEON_SQRSHL,
2084 NEON_SQDMULH_scalar = NEON_Q | NEONScalar | NEON_SQDMULH,
2085 NEON_SQRDMULH_scalar = NEON_Q | NEONScalar | NEON_SQRDMULH,
2086
2087 // NEON floating point scalar instructions with three same-type operands.
2088 NEONScalar3SameFPFixed = NEONScalar3SameFixed | 0x0000C000,
2089 NEONScalar3SameFPFMask = NEONScalar3SameFMask | 0x0000C000,
2090 NEONScalar3SameFPMask = NEONScalar3SameMask | 0x00800000,
2091 NEON_FACGE_scalar = NEON_Q | NEONScalar | NEON_FACGE,
2092 NEON_FACGT_scalar = NEON_Q | NEONScalar | NEON_FACGT,
2093 NEON_FCMEQ_scalar = NEON_Q | NEONScalar | NEON_FCMEQ,
2094 NEON_FCMGE_scalar = NEON_Q | NEONScalar | NEON_FCMGE,
2095 NEON_FCMGT_scalar = NEON_Q | NEONScalar | NEON_FCMGT,
2096 NEON_FMULX_scalar = NEON_Q | NEONScalar | NEON_FMULX,
2097 NEON_FRECPS_scalar = NEON_Q | NEONScalar | NEON_FRECPS,
2098 NEON_FRSQRTS_scalar = NEON_Q | NEONScalar | NEON_FRSQRTS,
2099 NEON_FABD_scalar = NEON_Q | NEONScalar | NEON_FABD
2100 };
2101
2102 // NEON scalar instructions with three different-type operands.
2103 enum NEONScalar3DiffOp {
2104 NEONScalar3DiffFixed = 0x5E200000,
2105 NEONScalar3DiffFMask = 0xDF200C00,
2106 NEONScalar3DiffMask = NEON_Q | NEONScalar | NEON3DifferentMask,
2107 NEON_SQDMLAL_scalar = NEON_Q | NEONScalar | NEON_SQDMLAL,
2108 NEON_SQDMLSL_scalar = NEON_Q | NEONScalar | NEON_SQDMLSL,
2109 NEON_SQDMULL_scalar = NEON_Q | NEONScalar | NEON_SQDMULL
2110 };
2111
1251 // Unimplemented and unallocated instructions. These are defined to make fixed 2112 // Unimplemented and unallocated instructions. These are defined to make fixed
1252 // bit assertion easier. 2113 // bit assertion easier.
1253 enum UnimplementedOp { 2114 enum UnimplementedOp {
1254 UnimplementedFixed = 0x00000000, 2115 UnimplementedFixed = 0x00000000,
1255 UnimplementedFMask = 0x00000000 2116 UnimplementedFMask = 0x00000000
1256 }; 2117 };
1257 2118
1258 enum UnallocatedOp { 2119 enum UnallocatedOp {
1259 UnallocatedFixed = 0x00000000, 2120 UnallocatedFixed = 0x00000000,
1260 UnallocatedFMask = 0x00000000 2121 UnallocatedFMask = 0x00000000
1261 }; 2122 };
1262 2123
1263 } // namespace internal 2124 } // namespace internal
1264 } // namespace v8 2125 } // namespace v8
1265 2126
1266 #endif // V8_ARM64_CONSTANTS_ARM64_H_ 2127 #endif // V8_ARM64_CONSTANTS_ARM64_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/decoder-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698