1 //=- AArch64SchedThunderX2T99.td - Cavium ThunderX T99 ---*- tablegen -*-=//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file defines the scheduling model for Cavium ThunderX2T99
11 // Based on Broadcom Vulcan.
13 //===----------------------------------------------------------------------===//
15 //===----------------------------------------------------------------------===//
16 // 2. Pipeline Description.
18 def ThunderX2T99Model : SchedMachineModel {
19 let IssueWidth = 4; // 4 micro-ops dispatched at a time.
20 let MicroOpBufferSize = 180; // 180 entries in micro-op re-order buffer.
21 let LoadLatency = 4; // Optimistic load latency.
22 let MispredictPenalty = 12; // Extra cycles for mispredicted branch.
23 // Determined via a mix of micro-arch details and experimentation.
24 let LoopMicroOpBufferSize = 128;
25 let PostRAScheduler = 1; // Using PostRA sched.
26 let CompleteModel = 1;
28 list<Predicate> UnsupportedFeatures = SVEUnsupported.F;
30 // FIXME: Remove when all errors have been fixed.
31 let FullInstRWOverlapCheck = 0;
34 let SchedModel = ThunderX2T99Model in {
36 // Define the issue ports.
38 // Port 0: ALU, FP/SIMD.
39 def THX2T99P0 : ProcResource<1>;
41 // Port 1: ALU, FP/SIMD, integer mul/div.
42 def THX2T99P1 : ProcResource<1>;
44 // Port 2: ALU, Branch.
45 def THX2T99P2 : ProcResource<1>;
47 // Port 3: Store data.
48 def THX2T99P3 : ProcResource<1>;
50 // Port 4: Load/store.
51 def THX2T99P4 : ProcResource<1>;
53 // Port 5: Load/store.
54 def THX2T99P5 : ProcResource<1>;
56 // Define groups for the functional units on each issue port. Each group
57 // created will be used by a WriteRes later on.
59 // NOTE: Some groups only contain one member. This is a way to create names for
60 // the various functional units that share a single issue port. For example,
61 // "THX2T99I1" for ALU ops on port 1 and "THX2T99F1" for FP ops on port 1.
63 // Integer divide and multiply micro-ops only on port 1.
64 def THX2T99I1 : ProcResGroup<[THX2T99P1]>;
66 // Branch micro-ops only on port 2.
67 def THX2T99I2 : ProcResGroup<[THX2T99P2]>;
69 // ALU micro-ops on ports 0, 1, and 2.
70 def THX2T99I012 : ProcResGroup<[THX2T99P0, THX2T99P1, THX2T99P2]>;
72 // Crypto FP/SIMD micro-ops only on port 1.
73 def THX2T99F1 : ProcResGroup<[THX2T99P1]>;
75 // FP/SIMD micro-ops on ports 0 and 1.
76 def THX2T99F01 : ProcResGroup<[THX2T99P0, THX2T99P1]>;
78 // Store data micro-ops only on port 3.
79 def THX2T99SD : ProcResGroup<[THX2T99P3]>;
81 // Load/store micro-ops on ports 4 and 5.
82 def THX2T99LS01 : ProcResGroup<[THX2T99P4, THX2T99P5]>;
84 // 60 entry unified scheduler.
85 def THX2T99Any : ProcResGroup<[THX2T99P0, THX2T99P1, THX2T99P2,
86 THX2T99P3, THX2T99P4, THX2T99P5]> {
90 // Define commonly used write types for InstRW specializations.
91 // All definitions follow the format: THX2T99Write_<NumCycles>Cyc_<Resources>.
94 def THX2T99Write_3Cyc_I1 : SchedWriteRes<[THX2T99I1]> {
100 def THX2T99Write_1Cyc_I2 : SchedWriteRes<[THX2T99I2]> {
106 def THX2T99Write_4Cyc_I1 : SchedWriteRes<[THX2T99I1]> {
112 def THX2T99Write_23Cyc_I1 : SchedWriteRes<[THX2T99I1]> {
114 let ResourceCycles = [13, 23];
119 def THX2T99Write_39Cyc_I1 : SchedWriteRes<[THX2T99I1]> {
121 let ResourceCycles = [13, 39];
125 // 1 cycle on I0, I1, or I2.
126 def THX2T99Write_1Cyc_I012 : SchedWriteRes<[THX2T99I012]> {
131 // 2 cycles on I0, I1, or I2.
132 def THX2T99Write_2Cyc_I012 : SchedWriteRes<[THX2T99I012]> {
137 // 4 cycles on I0, I1, or I2.
138 def THX2T99Write_4Cyc_I012 : SchedWriteRes<[THX2T99I012]> {
143 // 5 cycles on I0, I1, or I2.
144 def THX2T99Write_5Cyc_I012 : SchedWriteRes<[THX2T99I012]> {
150 def THX2T99Write_5Cyc_F1 : SchedWriteRes<[THX2T99F1]> {
156 def THX2T99Write_7Cyc_F1 : SchedWriteRes<[THX2T99F1]> {
161 // 4 cycles on F0 or F1.
162 def THX2T99Write_4Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
167 // 5 cycles on F0 or F1.
168 def THX2T99Write_5Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
173 // 6 cycles on F0 or F1.
174 def THX2T99Write_6Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
179 // 7 cycles on F0 or F1.
180 def THX2T99Write_7Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
185 // 8 cycles on F0 or F1.
186 def THX2T99Write_8Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
191 // 10 cycles on F0 or F1.
192 def THX2T99Write_10Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
197 // 16 cycles on F0 or F1.
198 def THX2T99Write_16Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
201 let ResourceCycles = [8];
204 // 23 cycles on F0 or F1.
205 def THX2T99Write_23Cyc_F01 : SchedWriteRes<[THX2T99F01]> {
208 let ResourceCycles = [11];
211 // 1 cycles on LS0 or LS1.
212 def THX2T99Write_1Cyc_LS01 : SchedWriteRes<[THX2T99LS01]> {
216 // 1 cycles on LS0 or LS1 and I0, I1, or I2.
217 def THX2T99Write_1Cyc_LS01_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
222 // 1 cycles on LS0 or LS1 and 2 of I0, I1, or I2.
223 def THX2T99Write_1Cyc_LS01_I012_I012 :
224 SchedWriteRes<[THX2T99LS01, THX2T99I012, THX2T99I012]> {
229 // 2 cycles on LS0 or LS1.
230 def THX2T99Write_2Cyc_LS01 : SchedWriteRes<[THX2T99LS01]> {
235 // 4 cycles on LS0 or LS1.
236 def THX2T99Write_4Cyc_LS01 : SchedWriteRes<[THX2T99LS01]> {
241 // 5 cycles on LS0 or LS1.
242 def THX2T99Write_5Cyc_LS01 : SchedWriteRes<[THX2T99LS01]> {
247 // 6 cycles on LS0 or LS1.
248 def THX2T99Write_6Cyc_LS01 : SchedWriteRes<[THX2T99LS01]> {
253 // 4 cycles on LS0 or LS1 and I0, I1, or I2.
254 def THX2T99Write_4Cyc_LS01_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
259 // 4 cycles on LS0 or LS1 and 2 of I0, I1, or I2.
260 def THX2T99Write_4Cyc_LS01_I012_I012 :
261 SchedWriteRes<[THX2T99LS01, THX2T99I012, THX2T99I012]> {
266 // 5 cycles on LS0 or LS1 and I0, I1, or I2.
267 def THX2T99Write_5Cyc_LS01_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
272 // 5 cycles on LS0 or LS1 and 2 of I0, I1, or I2.
273 def THX2T99Write_5Cyc_LS01_I012_I012 :
274 SchedWriteRes<[THX2T99LS01, THX2T99I012, THX2T99I012]> {
279 // 6 cycles on LS0 or LS1 and I0, I1, or I2.
280 def THX2T99Write_6Cyc_LS01_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
285 // 6 cycles on LS0 or LS1 and 2 of I0, I1, or I2.
286 def THX2T99Write_6Cyc_LS01_I012_I012 :
287 SchedWriteRes<[THX2T99LS01, THX2T99I012, THX2T99I012]> {
292 // 1 cycles on LS0 or LS1 and F0 or F1.
293 def THX2T99Write_1Cyc_LS01_F01 : SchedWriteRes<[THX2T99LS01, THX2T99F01]> {
298 // 5 cycles on LS0 or LS1 and F0 or F1.
299 def THX2T99Write_5Cyc_LS01_F01 : SchedWriteRes<[THX2T99LS01, THX2T99F01]> {
304 // 6 cycles on LS0 or LS1 and F0 or F1.
305 def THX2T99Write_6Cyc_LS01_F01 : SchedWriteRes<[THX2T99LS01, THX2T99F01]> {
310 // 7 cycles on LS0 or LS1 and F0 or F1.
311 def THX2T99Write_7Cyc_LS01_F01 : SchedWriteRes<[THX2T99LS01, THX2T99F01]> {
316 // 8 cycles on LS0 or LS1 and F0 or F1.
317 def THX2T99Write_8Cyc_LS01_F01 : SchedWriteRes<[THX2T99LS01, THX2T99F01]> {
322 // 8 cycles on LS0 or LS1 and I0, I1, or I2.
323 def THX2T99Write_8Cyc_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
328 // 12 cycles on LS0 or LS1 and I0, I1, or I2.
329 def THX2T99Write_12Cyc_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
334 // 16 cycles on LS0 or LS1 and I0, I1, or I2.
335 def THX2T99Write_16Cyc_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
340 // 24 cycles on LS0 or LS1 and I0, I1, or I2.
341 def THX2T99Write_24Cyc_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
343 let NumMicroOps = 12;
346 // 32 cycles on LS0 or LS1 and I0, I1, or I2.
347 def THX2T99Write_32Cyc_I012 : SchedWriteRes<[THX2T99LS01, THX2T99I012]> {
349 let NumMicroOps = 16;
352 // Define commonly used read types.
354 // No forwarding is provided for these types.
355 def : ReadAdvance<ReadI, 0>;
356 def : ReadAdvance<ReadISReg, 0>;
357 def : ReadAdvance<ReadIEReg, 0>;
358 def : ReadAdvance<ReadIM, 0>;
359 def : ReadAdvance<ReadIMA, 0>;
360 def : ReadAdvance<ReadID, 0>;
361 def : ReadAdvance<ReadExtrHi, 0>;
362 def : ReadAdvance<ReadAdrBase, 0>;
363 def : ReadAdvance<ReadVLD, 0>;
365 //===----------------------------------------------------------------------===//
366 // 3. Instruction Tables.
369 // 3.1 Branch Instructions
373 // Branch and link, immed
374 // Compare and branch
375 def : WriteRes<WriteBr, [THX2T99I2]> {
381 // Branch and link, register != LR
382 // Branch and link, register = LR
383 def : WriteRes<WriteBrReg, [THX2T99I2]> {
388 def : WriteRes<WriteSys, []> { let Latency = 1; }
389 def : WriteRes<WriteBarrier, []> { let Latency = 1; }
390 def : WriteRes<WriteHint, []> { let Latency = 1; }
392 def : WriteRes<WriteAtomic, []> {
400 def : InstRW<[THX2T99Write_1Cyc_I2], (instrs B, BL, BR, BLR)>;
401 def : InstRW<[THX2T99Write_1Cyc_I2], (instrs RET)>;
402 def : InstRW<[THX2T99Write_1Cyc_I2], (instregex "^B..$")>;
403 def : InstRW<[THX2T99Write_1Cyc_I2],
404 (instregex "^CBZ", "^CBNZ", "^TBZ", "^TBNZ")>;
407 // 3.2 Arithmetic and Logical Instructions
408 // 3.3 Move and Shift Instructions
413 // Conditional compare
414 // Conditional select
415 // Address generation
416 def : WriteRes<WriteI, [THX2T99I012]> {
418 let ResourceCycles = [1];
422 def : InstRW<[WriteI],
423 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?",
424 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)",
426 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)",
427 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)",
428 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)",
429 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r",
430 "SBCS(W|X)r", "CCMN(W|X)(i|r)",
431 "CCMP(W|X)(i|r)", "CSEL(W|X)r",
432 "CSINC(W|X)r", "CSINV(W|X)r",
435 def : InstRW<[WriteI], (instrs COPY)>;
437 // ALU, extend and/or shift
438 def : WriteRes<WriteISReg, [THX2T99I012]> {
440 let ResourceCycles = [2];
444 def : InstRW<[WriteISReg],
445 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?",
446 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)",
448 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)",
449 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)",
450 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)",
451 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r",
452 "SBCS(W|X)r", "CCMN(W|X)(i|r)",
453 "CCMP(W|X)(i|r)", "CSEL(W|X)r",
454 "CSINC(W|X)r", "CSINV(W|X)r",
457 def : WriteRes<WriteIEReg, [THX2T99I012]> {
459 let ResourceCycles = [1];
463 def : InstRW<[WriteIEReg],
464 (instregex "ADD?(W|X)r(i|r|s|x)", "ADDS?(W|X)r(i|r|s|x)(64)?",
465 "AND?(W|X)r(i|r|s|x)", "ANDS?(W|X)r(i|r|s|x)",
467 "BIC?(W|X)r(i|r|s|x)", "BICS?(W|X)r(i|r|s|x)",
468 "EON?(W|X)r(i|r|s|x)", "ORN?(W|X)r(i|r|s|x)",
469 "ORR?(W|X)r(i|r|s|x)", "SUB?(W|X)r(i|r|s|x)",
470 "SUBS?(W|X)r(i|r|s|x)", "SBC(W|X)r",
471 "SBCS(W|X)r", "CCMN(W|X)(i|r)",
472 "CCMP(W|X)(i|r)", "CSEL(W|X)r",
473 "CSINC(W|X)r", "CSINV(W|X)r",
477 def : WriteRes<WriteImm, [THX2T99I012]> {
482 def : InstRW<[THX2T99Write_1Cyc_I012],
483 (instrs MOVKWi, MOVKXi, MOVNWi, MOVNXi, MOVZWi, MOVZXi)>;
485 def : InstRW<[THX2T99Write_1Cyc_I012],
486 (instrs ASRVWr, ASRVXr, LSLVWr, LSLVXr, RORVWr, RORVXr)>;
489 def : WriteRes<WriteIS, [THX2T99I012]> {
495 // 3.4 Divide and Multiply Instructions
499 // Latency range of 13-23/13-39.
500 def : WriteRes<WriteID32, [THX2T99I1]> {
502 let ResourceCycles = [39];
507 def : WriteRes<WriteID64, [THX2T99I1]> {
509 let ResourceCycles = [23];
513 // Multiply accumulate, W-form
514 def : WriteRes<WriteIM32, [THX2T99I012]> {
519 // Multiply accumulate, X-form
520 def : WriteRes<WriteIM64, [THX2T99I012]> {
525 //def : InstRW<[WriteIM32, ReadIM, ReadIM, ReadIMA, THX2T99Write_5Cyc_I012],
526 // (instrs MADDWrrr, MSUBWrrr)>;
527 def : InstRW<[WriteIM32], (instrs MADDWrrr, MSUBWrrr)>;
528 def : InstRW<[WriteIM32], (instrs MADDXrrr, MSUBXrrr)>;
529 def : InstRW<[THX2T99Write_5Cyc_I012],
530 (instregex "(S|U)(MADDL|MSUBL)rrr")>;
532 def : InstRW<[WriteID32], (instrs SDIVWr, UDIVWr)>;
533 def : InstRW<[WriteID64], (instrs SDIVXr, UDIVXr)>;
535 // Bitfield extract, two reg
536 def : WriteRes<WriteExtr, [THX2T99I012]> {
542 def : InstRW<[THX2T99Write_4Cyc_I1], (instrs SMULHrr, UMULHrr)>;
544 // Miscellaneous Data-Processing Instructions
546 def : InstRW<[THX2T99Write_1Cyc_I012], (instrs EXTRWrri, EXTRXrri)>;
548 // Bitifield move - basic
549 def : InstRW<[THX2T99Write_1Cyc_I012],
550 (instrs SBFMWri, SBFMXri, UBFMWri, UBFMXri)>;
552 // Bitfield move, insert
553 def : InstRW<[THX2T99Write_1Cyc_I012], (instregex "^BFM")>;
554 def : InstRW<[THX2T99Write_1Cyc_I012], (instregex "(S|U)?BFM.*")>;
557 def : InstRW<[THX2T99Write_3Cyc_I1], (instregex "^CLS(W|X)r$",
561 def : InstRW<[THX2T99Write_1Cyc_I012], (instrs RBITWr, RBITXr)>;
563 // Cryptography Extensions
564 def : InstRW<[THX2T99Write_5Cyc_F1], (instregex "^AES[DE]")>;
565 def : InstRW<[THX2T99Write_5Cyc_F1], (instregex "^AESI?MC")>;
566 def : InstRW<[THX2T99Write_5Cyc_F1], (instregex "^PMULL")>;
567 def : InstRW<[THX2T99Write_7Cyc_F1], (instregex "^SHA1SU0")>;
568 def : InstRW<[THX2T99Write_7Cyc_F1], (instregex "^SHA1(H|SU1)")>;
569 def : InstRW<[THX2T99Write_7Cyc_F1], (instregex "^SHA1[CMP]")>;
570 def : InstRW<[THX2T99Write_7Cyc_F1], (instregex "^SHA256SU0")>;
571 def : InstRW<[THX2T99Write_7Cyc_F1], (instregex "^SHA256(H|H2|SU1)")>;
574 // def : InstRW<[THX2T99Write_4Cyc_I1], (instregex "^CRC32", "^CRC32C")>;
575 def : InstRW<[THX2T99Write_4Cyc_I1],
576 (instrs CRC32Brr, CRC32Hrr, CRC32Wrr, CRC32Xrr)>;
578 def : InstRW<[THX2T99Write_4Cyc_I1],
579 (instrs CRC32CBrr, CRC32CHrr, CRC32CWrr, CRC32CXrr)>;
581 // Reverse bits/bytes
582 // NOTE: Handled by WriteI.
585 // 3.6 Load Instructions
586 // 3.10 FP Load Instructions
589 // Load register, literal
590 // Load register, unscaled immed
591 // Load register, immed unprivileged
592 // Load register, unsigned immed
593 def : WriteRes<WriteLD, [THX2T99LS01]> {
598 // Load register, immed post-index
599 // NOTE: Handled by WriteLD, WriteI.
600 // Load register, immed pre-index
601 // NOTE: Handled by WriteLD, WriteAdr.
602 def : WriteRes<WriteAdr, [THX2T99I012]> {
607 // Load pair, immed offset, normal
608 // Load pair, immed offset, signed words, base != SP
609 // Load pair, immed offset signed words, base = SP
610 // LDP only breaks into *one* LS micro-op. Thus
611 // the resources are handled by WriteLD.
612 def : WriteRes<WriteLDHi, []> {
617 // Load register offset, basic
618 // Load register, register offset, scale by 4/8
619 // Load register, register offset, scale by 2
620 // Load register offset, extend
621 // Load register, register offset, extend, scale by 4/8
622 // Load register, register offset, extend, scale by 2
623 def THX2T99WriteLDIdx : SchedWriteVariant<[
624 SchedVar<ScaledIdxPred, [THX2T99Write_6Cyc_LS01_I012_I012]>,
625 SchedVar<NoSchedPred, [THX2T99Write_5Cyc_LS01_I012]>]>;
626 def : SchedAlias<WriteLDIdx, THX2T99WriteLDIdx>;
628 def THX2T99ReadAdrBase : SchedReadVariant<[
629 SchedVar<ScaledIdxPred, [ReadDefault]>,
630 SchedVar<NoSchedPred, [ReadDefault]>]>;
631 def : SchedAlias<ReadAdrBase, THX2T99ReadAdrBase>;
633 // Load pair, immed pre-index, normal
634 // Load pair, immed pre-index, signed words
635 // Load pair, immed post-index, normal
636 // Load pair, immed post-index, signed words
637 // NOTE: Handled by WriteLD, WriteLDHi, WriteAdr.
639 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDNPDi)>;
640 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDNPQi)>;
641 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDNPSi)>;
642 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDNPWi)>;
643 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDNPXi)>;
645 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPDi)>;
646 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPQi)>;
647 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPSi)>;
648 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPSWi)>;
649 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPWi)>;
650 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi], (instrs LDPXi)>;
652 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRBui)>;
653 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRDui)>;
654 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRHui)>;
655 def : InstRW<[THX2T99Write_5Cyc_LS01], (instrs LDRQui)>;
656 def : InstRW<[THX2T99Write_5Cyc_LS01], (instrs LDRSui)>;
658 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRDl)>;
659 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRQl)>;
660 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRWl)>;
661 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDRXl)>;
663 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRBi)>;
664 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRHi)>;
665 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRWi)>;
666 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRXi)>;
668 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRSBWi)>;
669 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRSBXi)>;
670 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRSHWi)>;
671 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRSHXi)>;
672 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDTRSWi)>;
674 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
676 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
678 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
680 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
682 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
685 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRBpre)>;
686 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRDpre)>;
687 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRHpre)>;
688 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRQpre)>;
689 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRSpre)>;
690 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRWpre)>;
691 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteAdr], (instrs LDRXpre)>;
693 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSBWpre)>;
694 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSBXpre)>;
695 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSBWpost)>;
696 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSBXpost)>;
698 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSHWpre)>;
699 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSHXpre)>;
700 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSHWpost)>;
701 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRSHXpost)>;
703 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRBBpre)>;
704 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRBBpost)>;
706 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRHHpre)>;
707 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, WriteAdr], (instrs LDRHHpost)>;
709 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
711 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
713 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
715 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
717 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteLDHi, WriteAdr],
720 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRBpost)>;
721 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRDpost)>;
722 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRHpost)>;
723 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRQpost)>;
724 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRSpost)>;
725 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRWpost)>;
726 def : InstRW<[THX2T99Write_5Cyc_LS01_I012, WriteI], (instrs LDRXpost)>;
728 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
730 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
732 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
734 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
736 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
739 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRBpre)>;
740 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRDpre)>;
741 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRHpre)>;
742 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRQpre)>;
743 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRSpre)>;
744 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRWpre)>;
745 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteAdr], (instrs LDRXpre)>;
747 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
749 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
751 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
753 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
755 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteLDHi, WriteAdr],
758 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRBpost)>;
759 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRDpost)>;
760 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRHpost)>;
761 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRQpost)>;
762 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRSpost)>;
763 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRWpost)>;
764 def : InstRW<[THX2T99Write_5Cyc_LS01_I012_I012, WriteI], (instrs LDRXpost)>;
766 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRBroW)>;
767 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRDroW)>;
768 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRHroW)>;
769 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRHHroW)>;
770 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRQroW)>;
771 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSroW)>;
772 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSHWroW)>;
773 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSHXroW)>;
774 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRWroW)>;
775 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRXroW)>;
777 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRBroX)>;
778 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRDroX)>;
779 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRHHroX)>;
780 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRHroX)>;
781 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRQroX)>;
782 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSroX)>;
783 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSHWroX)>;
784 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRSHXroX)>;
785 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRWroX)>;
786 def : InstRW<[THX2T99Write_4Cyc_LS01_I012, ReadAdrBase], (instrs LDRXroX)>;
788 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
790 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
792 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
794 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
796 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
798 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
800 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
802 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
804 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
806 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
808 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
810 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
812 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
814 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
816 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
818 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
820 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
822 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
824 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
826 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
828 def : InstRW<[THX2T99Write_4Cyc_LS01_I012_I012, ReadAdrBase],
831 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURBi)>;
832 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURBBi)>;
833 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURDi)>;
834 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURHi)>;
835 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURHHi)>;
836 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURQi)>;
837 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSi)>;
838 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURXi)>;
839 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSBWi)>;
840 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSBXi)>;
841 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSHWi)>;
842 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSHXi)>;
843 def : InstRW<[THX2T99Write_4Cyc_LS01], (instrs LDURSWi)>;
848 def : InstRW<[THX2T99Write_6Cyc_LS01_I012], (instrs PRFMl)>;
849 def : InstRW<[THX2T99Write_6Cyc_LS01_I012], (instrs PRFUMi)>;
850 def : InstRW<[THX2T99Write_6Cyc_LS01_I012], (instrs PRFMui)>;
851 def : InstRW<[THX2T99Write_6Cyc_LS01_I012], (instrs PRFMroW)>;
852 def : InstRW<[THX2T99Write_6Cyc_LS01_I012], (instrs PRFMroX)>;
855 // 3.7 Store Instructions
856 // 3.11 FP Store Instructions
859 // Store register, unscaled immed
860 // Store register, immed unprivileged
861 // Store register, unsigned immed
862 def : WriteRes<WriteST, [THX2T99LS01, THX2T99SD]> {
867 // Store register, immed post-index
868 // NOTE: Handled by WriteAdr, WriteST, ReadAdrBase
870 // Store register, immed pre-index
871 // NOTE: Handled by WriteAdr, WriteST
873 // Store register, register offset, basic
874 // Store register, register offset, scaled by 4/8
875 // Store register, register offset, scaled by 2
876 // Store register, register offset, extend
877 // Store register, register offset, extend, scale by 4/8
878 // Store register, register offset, extend, scale by 1
879 def : WriteRes<WriteSTIdx, [THX2T99LS01, THX2T99SD, THX2T99I012]> {
884 // Store pair, immed offset, W-form
885 // Store pair, immed offset, X-form
886 def : WriteRes<WriteSTP, [THX2T99LS01, THX2T99SD]> {
891 // Store pair, immed post-index, W-form
892 // Store pair, immed post-index, X-form
893 // Store pair, immed pre-index, W-form
894 // Store pair, immed pre-index, X-form
895 // NOTE: Handled by WriteAdr, WriteSTP.
897 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURBi)>;
898 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURBBi)>;
899 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURDi)>;
900 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURHi)>;
901 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURHHi)>;
902 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURQi)>;
903 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURSi)>;
904 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURWi)>;
905 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STURXi)>;
907 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01], (instrs STTRBi)>;
908 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01], (instrs STTRHi)>;
909 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01], (instrs STTRWi)>;
910 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01], (instrs STTRXi)>;
912 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STNPDi)>;
913 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STNPQi)>;
914 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STNPXi)>;
915 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STNPWi)>;
917 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STPDi)>;
918 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STPQi)>;
919 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STPXi)>;
920 def : InstRW<[THX2T99Write_1Cyc_LS01], (instrs STPWi)>;
922 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRBui)>;
923 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRBui)>;
924 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRDui)>;
925 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRDui)>;
926 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRHui)>;
927 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRHui)>;
928 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRQui)>;
929 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRQui)>;
930 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRXui)>;
931 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRXui)>;
932 def : InstRW<[THX2T99Write_1Cyc_LS01_I012_I012], (instrs STRWui)>;
933 def : InstRW<[THX2T99Write_1Cyc_LS01_I012], (instrs STRWui)>;
935 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
936 (instrs STPDpre, STPDpost)>;
937 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
938 (instrs STPDpre, STPDpost)>;
939 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
940 (instrs STPDpre, STPDpost)>;
941 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
942 (instrs STPDpre, STPDpost)>;
943 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
944 (instrs STPQpre, STPQpost)>;
945 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
946 (instrs STPQpre, STPQpost)>;
947 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
948 (instrs STPQpre, STPQpost)>;
949 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
950 (instrs STPQpre, STPQpost)>;
951 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
952 (instrs STPSpre, STPSpost)>;
953 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
954 (instrs STPSpre, STPSpost)>;
955 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
956 (instrs STPSpre, STPSpost)>;
957 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
958 (instrs STPSpre, STPSpost)>;
959 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
960 (instrs STPWpre, STPWpost)>;
961 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
962 (instrs STPWpre, STPWpost)>;
963 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
964 (instrs STPWpre, STPWpost)>;
965 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
966 (instrs STPWpre, STPWpost)>;
967 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
968 (instrs STPXpre, STPXpost)>;
969 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
970 (instrs STPXpre, STPXpost)>;
971 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
972 (instrs STPXpre, STPXpost)>;
973 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
974 (instrs STPXpre, STPXpost)>;
976 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
977 (instrs STRBpre, STRBpost)>;
978 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
979 (instrs STRBpre, STRBpost)>;
980 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
981 (instrs STRBpre, STRBpost)>;
982 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
983 (instrs STRBpre, STRBpost)>;
984 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
985 (instrs STRBBpre, STRBBpost)>;
986 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
987 (instrs STRBBpre, STRBBpost)>;
988 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
989 (instrs STRBBpre, STRBBpost)>;
990 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
991 (instrs STRBBpre, STRBBpost)>;
992 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
993 (instrs STRDpre, STRDpost)>;
994 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
995 (instrs STRDpre, STRDpost)>;
996 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
997 (instrs STRDpre, STRDpost)>;
998 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
999 (instrs STRDpre, STRDpost)>;
1000 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1001 (instrs STRHpre, STRHpost)>;
1002 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1003 (instrs STRHpre, STRHpost)>;
1004 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1005 (instrs STRHpre, STRHpost)>;
1006 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1007 (instrs STRHpre, STRHpost)>;
1008 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1009 (instrs STRHHpre, STRHHpost)>;
1010 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1011 (instrs STRHHpre, STRHHpost)>;
1012 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1013 (instrs STRHHpre, STRHHpost)>;
1014 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1015 (instrs STRHHpre, STRHHpost)>;
1016 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1017 (instrs STRQpre, STRQpost)>;
1018 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1019 (instrs STRQpre, STRQpost)>;
1020 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1021 (instrs STRQpre, STRQpost)>;
1022 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1023 (instrs STRQpre, STRQpost)>;
1024 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1025 (instrs STRSpre, STRSpost)>;
1026 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1027 (instrs STRSpre, STRSpost)>;
1028 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1029 (instrs STRSpre, STRSpost)>;
1030 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1031 (instrs STRSpre, STRSpost)>;
1032 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1033 (instrs STRWpre, STRWpost)>;
1034 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1035 (instrs STRWpre, STRWpost)>;
1036 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1037 (instrs STRWpre, STRWpost)>;
1038 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1039 (instrs STRWpre, STRWpost)>;
1040 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012],
1041 (instrs STRXpre, STRXpost)>;
1042 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1043 (instrs STRXpre, STRXpost)>;
1044 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012],
1045 (instrs STRXpre, STRXpost)>;
1046 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1047 (instrs STRXpre, STRXpost)>;
1049 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1050 (instrs STRBroW, STRBroX)>;
1051 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1052 (instrs STRBroW, STRBroX)>;
1053 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1054 (instrs STRBBroW, STRBBroX)>;
1055 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1056 (instrs STRBBroW, STRBBroX)>;
1057 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1058 (instrs STRDroW, STRDroX)>;
1059 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1060 (instrs STRDroW, STRDroX)>;
1061 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1062 (instrs STRHroW, STRHroX)>;
1063 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1064 (instrs STRHroW, STRHroX)>;
1065 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1066 (instrs STRHHroW, STRHHroX)>;
1067 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1068 (instrs STRHHroW, STRHHroX)>;
1069 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1070 (instrs STRQroW, STRQroX)>;
1071 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1072 (instrs STRQroW, STRQroX)>;
1073 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1074 (instrs STRSroW, STRSroX)>;
1075 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1076 (instrs STRSroW, STRSroX)>;
1077 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1078 (instrs STRWroW, STRWroX)>;
1079 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1080 (instrs STRWroW, STRWroX)>;
1081 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012, ReadAdrBase],
1082 (instrs STRXroW, STRXroX)>;
1083 def : InstRW<[WriteAdr, THX2T99Write_1Cyc_LS01_I012_I012, ReadAdrBase],
1084 (instrs STRXroW, STRXroX)>;
1087 // 3.8 FP Data Processing Instructions
1090 // FP absolute value
1093 def : WriteRes<WriteF, [THX2T99F01]> {
1095 let NumMicroOps = 2;
1099 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "^FADD", "^FSUB")>;
1102 def : WriteRes<WriteFCmp, [THX2T99F01]> {
1104 let NumMicroOps = 2;
1107 // FP Mul, Div, Sqrt
1108 def : WriteRes<WriteFDiv, [THX2T99F01]> {
1110 let ResourceCycles = [19];
1113 def THX2T99XWriteFDiv : SchedWriteRes<[THX2T99F01]> {
1115 let ResourceCycles = [8];
1116 let NumMicroOps = 4;
1119 def THX2T99XWriteFDivSP : SchedWriteRes<[THX2T99F01]> {
1121 let ResourceCycles = [8];
1122 let NumMicroOps = 4;
1125 def THX2T99XWriteFDivDP : SchedWriteRes<[THX2T99F01]> {
1127 let ResourceCycles = [12];
1128 let NumMicroOps = 4;
1131 def THX2T99XWriteFSqrtSP : SchedWriteRes<[THX2T99F01]> {
1133 let ResourceCycles = [8];
1134 let NumMicroOps = 4;
1137 def THX2T99XWriteFSqrtDP : SchedWriteRes<[THX2T99F01]> {
1139 let ResourceCycles = [12];
1140 let NumMicroOps = 4;
1143 // FP divide, S-form
1144 // FP square root, S-form
1145 def : InstRW<[THX2T99XWriteFDivSP], (instrs FDIVSrr)>;
1146 def : InstRW<[THX2T99XWriteFSqrtSP], (instrs FSQRTSr)>;
1147 def : InstRW<[THX2T99XWriteFDivSP], (instregex "^FDIVv.*32$")>;
1148 def : InstRW<[THX2T99XWriteFSqrtSP], (instregex "^.*SQRT.*32$")>;
1149 def : InstRW<[THX2T99Write_16Cyc_F01], (instregex "^FDIVSrr", "^FSQRTSr")>;
1151 // FP divide, D-form
1152 // FP square root, D-form
1153 def : InstRW<[THX2T99XWriteFDivDP], (instrs FDIVDrr)>;
1154 def : InstRW<[THX2T99XWriteFSqrtDP], (instrs FSQRTDr)>;
1155 def : InstRW<[THX2T99XWriteFDivDP], (instregex "^FDIVv.*64$")>;
1156 def : InstRW<[THX2T99XWriteFSqrtDP], (instregex "^.*SQRT.*64$")>;
1157 def : InstRW<[THX2T99Write_23Cyc_F01], (instregex "^FDIVDrr", "^FSQRTDr")>;
1160 // FP multiply accumulate
1161 def : WriteRes<WriteFMul, [THX2T99F01]> {
1163 let ResourceCycles = [2];
1164 let NumMicroOps = 3;
1167 def THX2T99XWriteFMul : SchedWriteRes<[THX2T99F01]> {
1169 let ResourceCycles = [2];
1170 let NumMicroOps = 3;
1173 def THX2T99XWriteFMulAcc : SchedWriteRes<[THX2T99F01]> {
1175 let ResourceCycles = [2];
1176 let NumMicroOps = 3;
1179 def : InstRW<[THX2T99XWriteFMul], (instregex "^FMUL", "^FNMUL")>;
1180 def : InstRW<[THX2T99XWriteFMulAcc],
1181 (instregex "^FMADD", "^FMSUB", "^FNMADD", "^FNMSUB")>;
1183 // FP round to integral
1184 def : InstRW<[THX2T99Write_7Cyc_F01],
1185 (instregex "^FRINT(A|I|M|N|P|X|Z)(Sr|Dr)")>;
1188 def : InstRW<[THX2T99Write_4Cyc_F01], (instregex "^FCSEL")>;
1191 // 3.9 FP Miscellaneous Instructions
1194 // FP convert, from vec to vec reg
1195 // FP convert, from gen to vec reg
1196 // FP convert, from vec to gen reg
1197 def : WriteRes<WriteFCvt, [THX2T99F01]> {
1199 let NumMicroOps = 3;
1203 // FP move, register
1204 def : WriteRes<WriteFImm, [THX2T99F01]> {
1206 let NumMicroOps = 2;
1209 // FP transfer, from gen to vec reg
1210 // FP transfer, from vec to gen reg
1211 def : WriteRes<WriteFCopy, [THX2T99F01]> {
1213 let NumMicroOps = 2;
1216 def : InstRW<[THX2T99Write_5Cyc_F01], (instrs FMOVXDHighr, FMOVDXHighr)>;
1219 // 3.12 ASIMD Integer Instructions
1222 // ASIMD absolute diff, D-form
1223 // ASIMD absolute diff, Q-form
1224 // ASIMD absolute diff accum, D-form
1225 // ASIMD absolute diff accum, Q-form
1226 // ASIMD absolute diff accum long
1227 // ASIMD absolute diff long
1228 // ASIMD arith, basic
1229 // ASIMD arith, complex
1231 // ASIMD logical (AND, BIC, EOR)
1232 // ASIMD max/min, basic
1233 // ASIMD max/min, reduce, 4H/4S
1234 // ASIMD max/min, reduce, 8B/8H
1235 // ASIMD max/min, reduce, 16B
1236 // ASIMD multiply, D-form
1237 // ASIMD multiply, Q-form
1238 // ASIMD multiply accumulate long
1239 // ASIMD multiply accumulate saturating long
1240 // ASIMD multiply long
1241 // ASIMD pairwise add and accumulate
1242 // ASIMD shift accumulate
1243 // ASIMD shift by immed, basic
1244 // ASIMD shift by immed and insert, basic, D-form
1245 // ASIMD shift by immed and insert, basic, Q-form
1246 // ASIMD shift by immed, complex
1247 // ASIMD shift by register, basic, D-form
1248 // ASIMD shift by register, basic, Q-form
1249 // ASIMD shift by register, complex, D-form
1250 // ASIMD shift by register, complex, Q-form
1251 def : WriteRes<WriteV, [THX2T99F01]> {
1253 let NumMicroOps = 4;
1254 let ResourceCycles = [4];
1257 // ASIMD arith, reduce, 4H/4S
1258 // ASIMD arith, reduce, 8B/8H
1259 // ASIMD arith, reduce, 16B
1261 // ASIMD logical (MVN (alias for NOT), ORN, ORR)
1262 def : InstRW<[THX2T99Write_5Cyc_F01],
1263 (instregex "^ANDv", "^BICv", "^EORv", "^ORRv", "^ORNv", "^NOTv")>;
1265 // ASIMD arith, reduce
1266 def : InstRW<[THX2T99Write_10Cyc_F01],
1267 (instregex "^ADDVv", "^SADDLVv", "^UADDLVv")>;
1269 // ASIMD polynomial (8x8) multiply long
1270 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^(S|U|SQD)MULL")>;
1271 def : InstRW<[THX2T99Write_7Cyc_F01],
1272 (instregex "(S|U|SQD)(MLAL|MLSL|MULL)v.*")>;
1273 def : InstRW<[THX2T99Write_5Cyc_F1], (instregex "^PMULL(v8i8|v16i8)")>;
1274 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^PMULL(v1i64|v2i64)")>;
1276 // ASIMD absolute diff accum, D-form
1277 def : InstRW<[THX2T99Write_7Cyc_F01],
1278 (instregex "^[SU]ABA(v8i8|v4i16|v2i32)$")>;
1279 // ASIMD absolute diff accum, Q-form
1280 def : InstRW<[THX2T99Write_7Cyc_F01],
1281 (instregex "^[SU]ABA(v16i8|v8i16|v4i32)$")>;
1282 // ASIMD absolute diff accum long
1283 def : InstRW<[THX2T99Write_7Cyc_F01],
1284 (instregex "^[SU]ABAL")>;
1285 // ASIMD arith, reduce, 4H/4S
1286 def : InstRW<[THX2T99Write_5Cyc_F01],
1287 (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>;
1288 // ASIMD arith, reduce, 8B
1289 def : InstRW<[THX2T99Write_5Cyc_F01],
1290 (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>;
1291 // ASIMD arith, reduce, 16B/16H
1292 def : InstRW<[THX2T99Write_10Cyc_F01],
1293 (instregex "^[SU]?ADDL?Vv16i8v$")>;
1294 // ASIMD max/min, reduce, 4H/4S
1295 def : InstRW<[THX2T99Write_10Cyc_F01],
1296 (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>;
1297 // ASIMD max/min, reduce, 8B/8H
1298 def : InstRW<[THX2T99Write_7Cyc_F01],
1299 (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>;
1300 // ASIMD max/min, reduce, 16B/16H
1301 def : InstRW<[THX2T99Write_10Cyc_F01],
1302 (instregex "^[SU](MIN|MAX)Vv16i8v$")>;
1303 // ASIMD multiply, D-form
1304 def : InstRW<[THX2T99Write_7Cyc_F01],
1305 (instregex "^(P?MUL|SQR?DMULH)" #
1306 "(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)" #
1308 // ASIMD multiply, Q-form
1309 def : InstRW<[THX2T99Write_7Cyc_F01],
1310 (instregex "^(P?MUL|SQR?DMULH)(v16i8|v8i16|v4i32)(_indexed)?$")>;
1311 // ASIMD multiply accumulate, D-form
1312 def : InstRW<[THX2T99Write_7Cyc_F01],
1313 (instregex "^ML[AS](v8i8|v4i16|v2i32)(_indexed)?$")>;
1314 // ASIMD multiply accumulate, Q-form
1315 def : InstRW<[THX2T99Write_7Cyc_F01],
1316 (instregex "^ML[AS](v16i8|v8i16|v4i32)(_indexed)?$")>;
1317 // ASIMD shift accumulate
1318 def : InstRW<[THX2T99Write_7Cyc_F01],
1319 (instregex "SRSRAv","SSRAv","URSRAv","USRAv")>;
1321 // ASIMD shift by immed, basic
1322 def : InstRW<[THX2T99Write_7Cyc_F01],
1323 (instregex "RSHRNv","SHRNv", "SQRSHRNv","SQRSHRUNv",
1324 "SQSHRNv","SQSHRUNv", "UQRSHRNv",
1325 "UQSHRNv","SQXTNv","SQXTUNv","UQXTNv")>;
1326 // ASIMD shift by immed, complex
1327 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^[SU]?(Q|R){1,2}SHR")>;
1328 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^SQSHLU")>;
1329 // ASIMD shift by register, basic, Q-form
1330 def : InstRW<[THX2T99Write_7Cyc_F01],
1331 (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>;
1332 // ASIMD shift by register, complex, D-form
1333 def : InstRW<[THX2T99Write_7Cyc_F01],
1334 (instregex "^[SU][QR]{1,2}SHL" #
1335 "(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>;
1336 // ASIMD shift by register, complex, Q-form
1337 def : InstRW<[THX2T99Write_7Cyc_F01],
1338 (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>;
1341 def : InstRW<[THX2T99Write_7Cyc_F01],
1342 (instregex "(ADD|SUB)(v8i8|v4i16|v2i32|v1i64)")>;
1343 def : InstRW<[THX2T99Write_7Cyc_F01],
1344 (instregex "(ADD|SUB)(v16i8|v8i16|v4i32|v2i64)")>;
1345 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "(ADD|SUB)HNv.*")>;
1346 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "(RADD|RSUB)HNv.*")>;
1347 def : InstRW<[THX2T99Write_7Cyc_F01],
1348 (instregex "^SQADD", "^SQNEG", "^SQSUB", "^SRHADD",
1349 "^SUQADD", "^UQADD", "^UQSUB", "^URHADD", "^USQADD")>;
1350 def : InstRW<[THX2T99Write_7Cyc_F01],
1351 (instregex "ADDP(v16i8|v8i16|v4i32|v2i64)")>;
1352 def : InstRW<[THX2T99Write_5Cyc_F01],
1353 (instregex "((AND|ORN|EOR|EON)S?(Xr[rsi]|v16i8|v8i16|v4i32)|" #
1354 "(ORR|BIC)S?(Xr[rs]|v16i8|v8i16|v4i32))")>;
1355 def : InstRW<[THX2T99Write_5Cyc_F01],
1356 (instregex "(CLS|CLZ|CNT)(v4i32|v8i16|v16i8)")>;
1357 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^SADALP","^UADALP")>;
1358 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^SADDLPv","^UADDLPv")>;
1359 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^SADDLV","^UADDLV")>;
1360 def : InstRW<[THX2T99Write_7Cyc_F01],
1361 (instregex "^ADDVv","^SMAXVv","^UMAXVv","^SMINVv","^UMINVv")>;
1362 def : InstRW<[THX2T99Write_7Cyc_F01],
1363 (instregex "^SABAv","^UABAv","^SABALv","^UABALv")>;
1364 def : InstRW<[THX2T99Write_7Cyc_F01],
1365 (instregex "^SQADDv","^SQSUBv","^UQADDv","^UQSUBv")>;
1366 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^SUQADDv","^USQADDv")>;
1367 def : InstRW<[THX2T99Write_7Cyc_F01],
1368 (instregex "^ADDHNv","^RADDHNv", "^RSUBHNv",
1369 "^SQABS", "^SQADD", "^SQNEG", "^SQSUB",
1370 "^SRHADD", "^SUBHNv", "^SUQADD",
1371 "^UQADD", "^UQSUB", "^URHADD", "^USQADD")>;
1372 def : InstRW<[THX2T99Write_7Cyc_F01],
1373 (instregex "^CMEQv","^CMGEv","^CMGTv",
1374 "^CMLEv","^CMLTv", "^CMHIv","^CMHSv")>;
1375 def : InstRW<[THX2T99Write_7Cyc_F01],
1376 (instregex "^SMAXv","^SMINv","^UMAXv","^UMINv",
1377 "^SMAXPv","^SMINPv","^UMAXPv","^UMINPv")>;
1378 def : InstRW<[THX2T99Write_7Cyc_F01],
1379 (instregex "^SABDv","^UABDv", "^SABDLv","^UABDLv")>;
1382 // 3.13 ASIMD Floating-point Instructions
1385 // ASIMD FP absolute value
1386 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FABSv")>;
1388 // ASIMD FP arith, normal, D-form
1389 // ASIMD FP arith, normal, Q-form
1390 def : InstRW<[THX2T99Write_6Cyc_F01],
1391 (instregex "^FABDv", "^FADDv", "^FSUBv")>;
1393 // ASIMD FP arith,pairwise, D-form
1394 // ASIMD FP arith, pairwise, Q-form
1395 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "^FADDPv")>;
1397 // ASIMD FP compare, D-form
1398 // ASIMD FP compare, Q-form
1399 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FACGEv", "^FACGTv")>;
1400 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FCMEQv", "^FCMGEv",
1401 "^FCMGTv", "^FCMLEv",
1404 // ASIMD FP round, D-form
1405 def : InstRW<[THX2T99Write_7Cyc_F01],
1406 (instregex "^FRINT[AIMNPXZ](v2f32)")>;
1407 // ASIMD FP round, Q-form
1408 def : InstRW<[THX2T99Write_7Cyc_F01],
1409 (instregex "^FRINT[AIMNPXZ](v4f32|v2f64)")>;
1411 // ASIMD FP convert, long
1412 // ASIMD FP convert, narrow
1413 // ASIMD FP convert, other, D-form
1414 // ASIMD FP convert, other, Q-form
1415 // NOTE: Handled by WriteV.
1417 // ASIMD FP convert, long and narrow
1418 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^FCVT(L|N|XN)v")>;
1419 // ASIMD FP convert, other, D-form
1420 def : InstRW<[THX2T99Write_7Cyc_F01],
1421 (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v2f32|v1i32|v2i32|v1i64)")>;
1422 // ASIMD FP convert, other, Q-form
1423 def : InstRW<[THX2T99Write_7Cyc_F01],
1424 (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v4f32|v2f64|v4i32|v2i64)")>;
1426 // ASIMD FP divide, D-form, F32
1427 def : InstRW<[THX2T99Write_16Cyc_F01], (instrs FDIVv2f32)>;
1428 def : InstRW<[THX2T99Write_16Cyc_F01], (instregex "FDIVv2f32")>;
1430 // ASIMD FP divide, Q-form, F32
1431 def : InstRW<[THX2T99Write_16Cyc_F01], (instrs FDIVv4f32)>;
1432 def : InstRW<[THX2T99Write_16Cyc_F01], (instregex "FDIVv4f32")>;
1434 // ASIMD FP divide, Q-form, F64
1435 def : InstRW<[THX2T99Write_23Cyc_F01], (instrs FDIVv2f64)>;
1436 def : InstRW<[THX2T99Write_23Cyc_F01], (instregex "FDIVv2f64")>;
1438 // ASIMD FP max/min, normal, D-form
1439 // ASIMD FP max/min, normal, Q-form
1440 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FMAXv", "^FMAXNMv",
1441 "^FMINv", "^FMINNMv")>;
1443 // ASIMD FP max/min, pairwise, D-form
1444 // ASIMD FP max/min, pairwise, Q-form
1445 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FMAXPv", "^FMAXNMPv",
1446 "^FMINPv", "^FMINNMPv")>;
1448 // ASIMD FP max/min, reduce
1449 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FMAXVv", "^FMAXNMVv",
1450 "^FMINVv", "^FMINNMVv")>;
1452 // ASIMD FP multiply, D-form, FZ
1453 // ASIMD FP multiply, D-form, no FZ
1454 // ASIMD FP multiply, Q-form, FZ
1455 // ASIMD FP multiply, Q-form, no FZ
1456 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "^FMULv", "^FMULXv")>;
1457 def : InstRW<[THX2T99Write_6Cyc_F01],
1458 (instregex "^FMULX?(v2f32|v1i32|v2i32|v1i64|32|64)")>;
1459 def : InstRW<[THX2T99Write_6Cyc_F01],
1460 (instregex "^FMULX?(v4f32|v2f64|v4i32|v2i64)")>;
1462 // ASIMD FP multiply accumulate, Dform, FZ
1463 // ASIMD FP multiply accumulate, Dform, no FZ
1464 // ASIMD FP multiply accumulate, Qform, FZ
1465 // ASIMD FP multiply accumulate, Qform, no FZ
1466 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "^FMLAv", "^FMLSv")>;
1467 def : InstRW<[THX2T99Write_6Cyc_F01],
1468 (instregex "^FML[AS](v2f32|v1i32|v2i32|v1i64)")>;
1469 def : InstRW<[THX2T99Write_6Cyc_F01],
1470 (instregex "^FML[AS](v4f32|v2f64|v4i32|v2i64)")>;
1473 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FNEGv")>;
1476 // 3.14 ASIMD Miscellaneous Instructions
1479 // ASIMD bit reverse
1480 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^RBITv")>;
1482 // ASIMD bitwise insert, D-form
1483 // ASIMD bitwise insert, Q-form
1484 def : InstRW<[THX2T99Write_5Cyc_F01],
1485 (instregex "^BIFv", "^BITv", "^BSLv")>;
1487 // ASIMD count, D-form
1488 // ASIMD count, Q-form
1489 def : InstRW<[THX2T99Write_5Cyc_F01],
1490 (instregex "^CLSv", "^CLZv", "^CNTv")>;
1492 // ASIMD duplicate, gen reg
1493 // ASIMD duplicate, element
1494 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^DUPv")>;
1495 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^CPY")>;
1496 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^DUPv.+gpr")>;
1499 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^EXTv")>;
1501 // ASIMD extract narrow
1502 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^XTNv")>;
1504 // ASIMD extract narrow, saturating
1505 def : InstRW<[THX2T99Write_7Cyc_F01],
1506 (instregex "^SQXTNv", "^SQXTUNv", "^UQXTNv")>;
1508 // ASIMD insert, element to element
1509 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^INSv")>;
1511 // ASIMD transfer, element to gen reg
1512 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^[SU]MOVv")>;
1514 // ASIMD move, integer immed
1515 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^MOVIv")>;
1517 // ASIMD move, FP immed
1518 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^FMOVv")>;
1520 // ASIMD table lookup, D-form
1521 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v8i8One")>;
1522 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v8i8Two")>;
1523 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v8i8Three")>;
1524 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v8i8Four")>;
1526 // ASIMD table lookup, Q-form
1527 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v16i8One")>;
1528 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v16i8Two")>;
1529 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v16i8Three")>;
1530 def : InstRW<[THX2T99Write_7Cyc_F01], (instregex "^TB[LX]v16i8Four")>;
1533 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^TRN1", "^TRN2")>;
1536 def : InstRW<[THX2T99Write_5Cyc_F01],
1537 (instregex "^UZP1", "^UZP2", "^ZIP1", "^ZIP2")>;
1539 // ASIMD reciprocal estimate, D-form
1540 // ASIMD reciprocal estimate, Q-form
1541 def : InstRW<[THX2T99Write_5Cyc_F01],
1542 (instregex "^FRECPEv", "^FRECPXv", "^URECPEv",
1543 "^FRSQRTEv", "^URSQRTEv")>;
1545 // ASIMD reciprocal step, D-form, FZ
1546 // ASIMD reciprocal step, D-form, no FZ
1547 // ASIMD reciprocal step, Q-form, FZ
1548 // ASIMD reciprocal step, Q-form, no FZ
1549 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "^FRECPSv", "^FRSQRTSv")>;
1552 def : InstRW<[THX2T99Write_5Cyc_F01],
1553 (instregex "^REV16v", "^REV32v", "^REV64v")>;
1555 // ASIMD table lookup, D-form
1556 // ASIMD table lookup, Q-form
1557 def : InstRW<[THX2T99Write_8Cyc_F01], (instregex "^TBLv", "^TBXv")>;
1559 // ASIMD transfer, element to word or word
1560 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^[SU]MOVv")>;
1562 // ASIMD transfer, element to gen reg
1563 def : InstRW<[THX2T99Write_6Cyc_F01], (instregex "(S|U)MOVv.*")>;
1565 // ASIMD transfer gen reg to element
1566 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^INSv")>;
1569 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^TRN1v", "^TRN2v",
1570 "^UZP1v", "^UZP2v")>;
1573 def : InstRW<[THX2T99Write_5Cyc_F01], (instregex "^ZIP1v", "^ZIP2v")>;
1576 // 3.15 ASIMD Load Instructions
1579 // ASIMD load, 1 element, multiple, 1 reg, D-form
1580 // ASIMD load, 1 element, multiple, 1 reg, Q-form
1581 def : InstRW<[THX2T99Write_4Cyc_LS01],
1582 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1583 def : InstRW<[THX2T99Write_4Cyc_LS01, WriteAdr],
1584 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1586 // ASIMD load, 1 element, multiple, 2 reg, D-form
1587 // ASIMD load, 1 element, multiple, 2 reg, Q-form
1588 def : InstRW<[THX2T99Write_4Cyc_LS01],
1589 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1590 def : InstRW<[THX2T99Write_4Cyc_LS01, WriteAdr],
1591 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1593 // ASIMD load, 1 element, multiple, 3 reg, D-form
1594 // ASIMD load, 1 element, multiple, 3 reg, Q-form
1595 def : InstRW<[THX2T99Write_5Cyc_LS01],
1596 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1597 def : InstRW<[THX2T99Write_5Cyc_LS01, WriteAdr],
1598 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1600 // ASIMD load, 1 element, multiple, 4 reg, D-form
1601 // ASIMD load, 1 element, multiple, 4 reg, Q-form
1602 def : InstRW<[THX2T99Write_6Cyc_LS01],
1603 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1604 def : InstRW<[THX2T99Write_6Cyc_LS01, WriteAdr],
1605 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1607 // ASIMD load, 1 element, one lane, B/H/S
1608 // ASIMD load, 1 element, one lane, D
1609 def : InstRW<[THX2T99Write_5Cyc_LS01_F01], (instregex "^LD1i(8|16|32|64)$")>;
1610 def : InstRW<[THX2T99Write_5Cyc_LS01_F01, WriteAdr],
1611 (instregex "^LD1i(8|16|32|64)_POST$")>;
1613 // ASIMD load, 1 element, all lanes, D-form, B/H/S
1614 // ASIMD load, 1 element, all lanes, D-form, D
1615 // ASIMD load, 1 element, all lanes, Q-form
1616 def : InstRW<[THX2T99Write_5Cyc_LS01_F01],
1617 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1618 def : InstRW<[THX2T99Write_5Cyc_LS01_F01, WriteAdr],
1619 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1621 // ASIMD load, 2 element, multiple, D-form, B/H/S
1622 // ASIMD load, 2 element, multiple, Q-form, D
1623 def : InstRW<[THX2T99Write_5Cyc_LS01_F01],
1624 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
1625 def : InstRW<[THX2T99Write_5Cyc_LS01_F01, WriteAdr],
1626 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1628 // ASIMD load, 2 element, one lane, B/H
1629 // ASIMD load, 2 element, one lane, S
1630 // ASIMD load, 2 element, one lane, D
1631 def : InstRW<[THX2T99Write_5Cyc_LS01_F01], (instregex "^LD2i(8|16|32|64)$")>;
1632 def : InstRW<[THX2T99Write_5Cyc_LS01_F01, WriteAdr],
1633 (instregex "^LD2i(8|16|32|64)_POST$")>;
1635 // ASIMD load, 2 element, all lanes, D-form, B/H/S
1636 // ASIMD load, 2 element, all lanes, D-form, D
1637 // ASIMD load, 2 element, all lanes, Q-form
1638 def : InstRW<[THX2T99Write_5Cyc_LS01_F01],
1639 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1640 def : InstRW<[THX2T99Write_5Cyc_LS01_F01, WriteAdr],
1641 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1643 // ASIMD load, 3 element, multiple, D-form, B/H/S
1644 // ASIMD load, 3 element, multiple, Q-form, B/H/S
1645 // ASIMD load, 3 element, multiple, Q-form, D
1646 def : InstRW<[THX2T99Write_8Cyc_LS01_F01],
1647 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
1648 def : InstRW<[THX2T99Write_8Cyc_LS01_F01, WriteAdr],
1649 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1651 // ASIMD load, 3 element, one lone, B/H
1652 // ASIMD load, 3 element, one lane, S
1653 // ASIMD load, 3 element, one lane, D
1654 def : InstRW<[THX2T99Write_7Cyc_LS01_F01], (instregex "^LD3i(8|16|32|64)$")>;
1655 def : InstRW<[THX2T99Write_7Cyc_LS01_F01, WriteAdr],
1656 (instregex "^LD3i(8|16|32|64)_POST$")>;
1658 // ASIMD load, 3 element, all lanes, D-form, B/H/S
1659 // ASIMD load, 3 element, all lanes, D-form, D
1660 // ASIMD load, 3 element, all lanes, Q-form, B/H/S
1661 // ASIMD load, 3 element, all lanes, Q-form, D
1662 def : InstRW<[THX2T99Write_7Cyc_LS01_F01],
1663 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1664 def : InstRW<[THX2T99Write_7Cyc_LS01_F01, WriteAdr],
1665 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1667 // ASIMD load, 4 element, multiple, D-form, B/H/S
1668 // ASIMD load, 4 element, multiple, Q-form, B/H/S
1669 // ASIMD load, 4 element, multiple, Q-form, D
1670 def : InstRW<[THX2T99Write_8Cyc_LS01_F01],
1671 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
1672 def : InstRW<[THX2T99Write_8Cyc_LS01_F01, WriteAdr],
1673 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1675 // ASIMD load, 4 element, one lane, B/H
1676 // ASIMD load, 4 element, one lane, S
1677 // ASIMD load, 4 element, one lane, D
1678 def : InstRW<[THX2T99Write_6Cyc_LS01_F01], (instregex "^LD4i(8|16|32|64)$")>;
1679 def : InstRW<[THX2T99Write_6Cyc_LS01_F01, WriteAdr],
1680 (instregex "^LD4i(8|16|32|64)_POST$")>;
1682 // ASIMD load, 4 element, all lanes, D-form, B/H/S
1683 // ASIMD load, 4 element, all lanes, D-form, D
1684 // ASIMD load, 4 element, all lanes, Q-form, B/H/S
1685 // ASIMD load, 4 element, all lanes, Q-form, D
1686 def : InstRW<[THX2T99Write_6Cyc_LS01_F01],
1687 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1688 def : InstRW<[THX2T99Write_6Cyc_LS01_F01, WriteAdr],
1689 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1692 // 3.16 ASIMD Store Instructions
1695 // ASIMD store, 1 element, multiple, 1 reg, D-form
1696 // ASIMD store, 1 element, multiple, 1 reg, Q-form
1697 def : InstRW<[THX2T99Write_1Cyc_LS01],
1698 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1699 def : InstRW<[THX2T99Write_1Cyc_LS01, WriteAdr],
1700 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1702 // ASIMD store, 1 element, multiple, 2 reg, D-form
1703 // ASIMD store, 1 element, multiple, 2 reg, Q-form
1704 def : InstRW<[THX2T99Write_1Cyc_LS01],
1705 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1706 def : InstRW<[THX2T99Write_1Cyc_LS01, WriteAdr],
1707 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1709 // ASIMD store, 1 element, multiple, 3 reg, D-form
1710 // ASIMD store, 1 element, multiple, 3 reg, Q-form
1711 def : InstRW<[THX2T99Write_1Cyc_LS01],
1712 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1713 def : InstRW<[THX2T99Write_1Cyc_LS01, WriteAdr],
1714 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1716 // ASIMD store, 1 element, multiple, 4 reg, D-form
1717 // ASIMD store, 1 element, multiple, 4 reg, Q-form
1718 def : InstRW<[THX2T99Write_1Cyc_LS01],
1719 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
1720 def : InstRW<[THX2T99Write_1Cyc_LS01, WriteAdr],
1721 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
1723 // ASIMD store, 1 element, one lane, B/H/S
1724 // ASIMD store, 1 element, one lane, D
1725 def : InstRW<[THX2T99Write_1Cyc_LS01_F01],
1726 (instregex "^ST1i(8|16|32|64)$")>;
1727 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1728 (instregex "^ST1i(8|16|32|64)_POST$")>;
1730 // ASIMD store, 2 element, multiple, D-form, B/H/S
1731 // ASIMD store, 2 element, multiple, Q-form, B/H/S
1732 // ASIMD store, 2 element, multiple, Q-form, D
1733 def : InstRW<[THX2T99Write_1Cyc_LS01_F01],
1734 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
1735 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1736 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1738 // ASIMD store, 2 element, one lane, B/H/S
1739 // ASIMD store, 2 element, one lane, D
1740 def : InstRW<[THX2T99Write_1Cyc_LS01_F01],
1741 (instregex "^ST2i(8|16|32|64)$")>;
1742 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1743 (instregex "^ST2i(8|16|32|64)_POST$")>;
1745 // ASIMD store, 3 element, multiple, D-form, B/H/S
1746 // ASIMD store, 3 element, multiple, Q-form, B/H/S
1747 // ASIMD store, 3 element, multiple, Q-form, D
1748 def : InstRW<[THX2T99Write_1Cyc_LS01_F01],
1749 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
1750 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1751 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1753 // ASIMD store, 3 element, one lane, B/H
1754 // ASIMD store, 3 element, one lane, S
1755 // ASIMD store, 3 element, one lane, D
1756 def : InstRW<[THX2T99Write_1Cyc_LS01_F01], (instregex "^ST3i(8|16|32|64)$")>;
1757 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1758 (instregex "^ST3i(8|16|32|64)_POST$")>;
1760 // ASIMD store, 4 element, multiple, D-form, B/H/S
1761 // ASIMD store, 4 element, multiple, Q-form, B/H/S
1762 // ASIMD store, 4 element, multiple, Q-form, D
1763 def : InstRW<[THX2T99Write_1Cyc_LS01_F01],
1764 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
1765 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1766 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
1768 // ASIMD store, 4 element, one lane, B/H
1769 // ASIMD store, 4 element, one lane, S
1770 // ASIMD store, 4 element, one lane, D
1771 def : InstRW<[THX2T99Write_1Cyc_LS01_F01], (instregex "^ST4i(8|16|32|64)$")>;
1772 def : InstRW<[THX2T99Write_1Cyc_LS01_F01, WriteAdr],
1773 (instregex "^ST4i(8|16|32|64)_POST$")>;
1775 // V8.1a Atomics (LSE)
1776 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1777 (instrs CASB, CASH, CASW, CASX)>;
1779 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1780 (instrs CASAB, CASAH, CASAW, CASAX)>;
1782 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1783 (instrs CASLB, CASLH, CASLW, CASLX)>;
1785 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1786 (instrs CASALB, CASALH, CASALW, CASALX)>;
1788 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1789 (instrs LDLARB, LDLARH, LDLARW, LDLARX)>;
1791 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1792 (instrs LDADDB, LDADDH, LDADDW, LDADDX)>;
1794 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1795 (instrs LDADDAB, LDADDAH, LDADDAW, LDADDAX)>;
1797 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1798 (instrs LDADDLB, LDADDLH, LDADDLW, LDADDLX)>;
1800 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1801 (instrs LDADDALB, LDADDALH, LDADDALW, LDADDALX)>;
1803 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1804 (instrs LDCLRB, LDCLRH, LDCLRW, LDCLRX)>;
1806 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1807 (instrs LDCLRAB, LDCLRAH, LDCLRAW, LDCLRAX)>;
1809 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1810 (instrs LDCLRLB, LDCLRLH, LDCLRLW, LDCLRLX)>;
1812 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1813 (instrs LDCLRALB, LDCLRALH, LDCLRALW, LDCLRALX)>;
1815 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1816 (instrs LDEORB, LDEORH, LDEORW, LDEORX)>;
1818 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1819 (instrs LDEORAB, LDEORAH, LDEORAW, LDEORAX)>;
1821 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1822 (instrs LDEORLB, LDEORLH, LDEORLW, LDEORLX)>;
1824 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1825 (instrs LDEORALB, LDEORALH, LDEORALW, LDEORALX)>;
1827 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1828 (instrs LDSETB, LDSETH, LDSETW, LDSETX)>;
1830 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1831 (instrs LDSETAB, LDSETAH, LDSETAW, LDSETAX)>;
1833 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1834 (instrs LDSETLB, LDSETLH, LDSETLW, LDSETLX)>;
1836 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1837 (instrs LDSETALB, LDSETALH, LDSETALW, LDSETALX)>;
1839 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1840 (instrs LDSMAXB, LDSMAXH, LDSMAXW, LDSMAXX,
1841 LDSMAXAB, LDSMAXAH, LDSMAXAW, LDSMAXAX,
1842 LDSMAXLB, LDSMAXLH, LDSMAXLW, LDSMAXLX,
1843 LDSMAXALB, LDSMAXALH, LDSMAXALW, LDSMAXALX)>;
1845 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1846 (instrs LDSMINB, LDSMINH, LDSMINW, LDSMINX,
1847 LDSMINAB, LDSMINAH, LDSMINAW, LDSMINAX,
1848 LDSMINLB, LDSMINLH, LDSMINLW, LDSMINLX,
1849 LDSMINALB, LDSMINALH, LDSMINALW, LDSMINALX)>;
1851 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1852 (instrs LDUMAXB, LDUMAXH, LDUMAXW, LDUMAXX,
1853 LDUMAXAB, LDUMAXAH, LDUMAXAW, LDUMAXAX,
1854 LDUMAXLB, LDUMAXLH, LDUMAXLW, LDUMAXLX,
1855 LDUMAXALB, LDUMAXALH, LDUMAXALW, LDUMAXALX)>;
1857 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1858 (instrs LDUMINB, LDUMINH, LDUMINW, LDUMINX,
1859 LDUMINAB, LDUMINAH, LDUMINAW, LDUMINAX,
1860 LDUMINLB, LDUMINLH, LDUMINLW, LDUMINLX,
1861 LDUMINALB, LDUMINALH, LDUMINALW, LDUMINALX)>;
1863 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1864 (instrs SWPB, SWPH, SWPW, SWPX)>;
1866 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1867 (instrs SWPAB, SWPAH, SWPAW, SWPAX)>;
1869 def : InstRW<[THX2T99Write_12Cyc_I012, WriteAtomic],
1870 (instrs SWPLB, SWPLH, SWPLW, SWPLX)>;
1872 def : InstRW<[THX2T99Write_16Cyc_I012, WriteAtomic],
1873 (instrs SWPALB, SWPALH, SWPALW, SWPALX)>;
1875 def : InstRW<[THX2T99Write_8Cyc_I012, WriteAtomic],
1876 (instrs STLLRB, STLLRH, STLLRW, STLLRX)>;
1878 } // SchedModel = ThunderX2T99Model