1 //=- AArch64SchedVulcan.td - Vulcan Scheduling Defs ----------*- tablegen -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // This file defines the machine model for Broadcom Vulcan to support
12 // instruction scheduling and other instruction cost heuristics.
14 //===----------------------------------------------------------------------===//
16 //===----------------------------------------------------------------------===//
17 // 2. Pipeline Description.
19 def VulcanModel : SchedMachineModel {
20 let IssueWidth = 4; // 4 micro-ops dispatched at a time.
21 let MicroOpBufferSize = 180; // 180 entries in micro-op re-order buffer.
22 let LoadLatency = 4; // Optimistic load latency.
23 let MispredictPenalty = 12; // Extra cycles for mispredicted branch.
24 // Determined via a mix of micro-arch details and experimentation.
25 let LoopMicroOpBufferSize = 32;
26 let PostRAScheduler = 1; // Using PostRA sched.
27 let CompleteModel = 1;
30 // Define the issue ports.
32 // Port 0: ALU, FP/SIMD.
33 def VulcanP0 : ProcResource<1>;
35 // Port 1: ALU, FP/SIMD, integer mul/div.
36 def VulcanP1 : ProcResource<1>;
38 // Port 2: ALU, Branch.
39 def VulcanP2 : ProcResource<1>;
41 // Port 3: Store data.
42 def VulcanP3 : ProcResource<1>;
44 // Port 4: Load/store.
45 def VulcanP4 : ProcResource<1>;
47 // Port 5: Load/store.
48 def VulcanP5 : ProcResource<1>;
50 let SchedModel = VulcanModel in {
52 // Define groups for the functional units on each issue port. Each group
53 // created will be used by a WriteRes later on.
55 // NOTE: Some groups only contain one member. This is a way to create names for
56 // the various functional units that share a single issue port. For example,
57 // "VulcanI1" for ALU ops on port 1 and "VulcanF1" for FP ops on port 1.
59 // Integer divide and multiply micro-ops only on port 1.
60 def VulcanI1 : ProcResGroup<[VulcanP1]>;
62 // Branch micro-ops only on port 2.
63 def VulcanI2 : ProcResGroup<[VulcanP2]>;
65 // ALU micro-ops on ports 0, 1, and 2.
66 def VulcanI012 : ProcResGroup<[VulcanP0, VulcanP1, VulcanP2]>;
68 // Crypto FP/SIMD micro-ops only on port 1.
69 def VulcanF1 : ProcResGroup<[VulcanP1]>;
71 // FP/SIMD micro-ops on ports 0 and 1.
72 def VulcanF01 : ProcResGroup<[VulcanP0, VulcanP1]>;
74 // Store data micro-ops only on port 3.
75 def VulcanSD : ProcResGroup<[VulcanP3]>;
77 // Load/store micro-ops on ports 4 and 5.
78 def VulcanLS01 : ProcResGroup<[VulcanP4, VulcanP5]>;
80 // 60 entry unified scheduler.
81 def VulcanAny : ProcResGroup<[VulcanP0, VulcanP1, VulcanP2,
82 VulcanP3, VulcanP4, VulcanP5]> {
86 // Define commonly used write types for InstRW specializations.
87 // All definitions follow the format: VulcanWrite_<NumCycles>Cyc_<Resources>.
90 def VulcanWrite_3Cyc_I1 : SchedWriteRes<[VulcanI1]> { let Latency = 3; }
93 def VulcanWrite_4Cyc_I1 : SchedWriteRes<[VulcanI1]> { let Latency = 4; }
95 // 1 cycle on I0, I1, or I2.
96 def VulcanWrite_1Cyc_I012 : SchedWriteRes<[VulcanI012]> { let Latency = 1; }
99 def VulcanWrite_5Cyc_F1 : SchedWriteRes<[VulcanF1]> { let Latency = 5; }
102 def VulcanWrite_7Cyc_F1 : SchedWriteRes<[VulcanF1]> { let Latency = 7; }
104 // 4 cycles on F0 or F1.
105 def VulcanWrite_4Cyc_F01 : SchedWriteRes<[VulcanF01]> { let Latency = 4; }
107 // 5 cycles on F0 or F1.
108 def VulcanWrite_5Cyc_F01 : SchedWriteRes<[VulcanF01]> { let Latency = 5; }
110 // 6 cycles on F0 or F1.
111 def VulcanWrite_6Cyc_F01 : SchedWriteRes<[VulcanF01]> { let Latency = 6; }
113 // 7 cycles on F0 or F1.
114 def VulcanWrite_7Cyc_F01 : SchedWriteRes<[VulcanF01]> { let Latency = 7; }
116 // 8 cycles on F0 or F1.
117 def VulcanWrite_8Cyc_F01 : SchedWriteRes<[VulcanF01]> { let Latency = 8; }
119 // 16 cycles on F0 or F1.
120 def VulcanWrite_16Cyc_F01 : SchedWriteRes<[VulcanF01]> {
122 let ResourceCycles = [8];
125 // 23 cycles on F0 or F1.
126 def VulcanWrite_23Cyc_F01 : SchedWriteRes<[VulcanF01]> {
128 let ResourceCycles = [11];
131 // 1 cycles on LS0 or LS1.
132 def VulcanWrite_1Cyc_LS01 : SchedWriteRes<[VulcanLS01]> { let Latency = 1; }
134 // 4 cycles on LS0 or LS1.
135 def VulcanWrite_4Cyc_LS01 : SchedWriteRes<[VulcanLS01]> { let Latency = 4; }
137 // 5 cycles on LS0 or LS1.
138 def VulcanWrite_5Cyc_LS01 : SchedWriteRes<[VulcanLS01]> { let Latency = 5; }
140 // 6 cycles on LS0 or LS1.
141 def VulcanWrite_6Cyc_LS01 : SchedWriteRes<[VulcanLS01]> { let Latency = 6; }
143 // 5 cycles on LS0 or LS1 and I0, I1, or I2.
144 def VulcanWrite_5Cyc_LS01_I012 : SchedWriteRes<[VulcanLS01, VulcanI012]> {
149 // 5 cycles on LS0 or LS1 and 2 of I0, I1, or I2.
150 def VulcanWrite_6Cyc_LS01_I012_I012 :
151 SchedWriteRes<[VulcanLS01, VulcanI012, VulcanI012]> {
156 // 1 cycles on LS0 or LS1 and F0 or F1.
157 def VulcanWrite_1Cyc_LS01_F01 : SchedWriteRes<[VulcanLS01, VulcanF01]> {
162 // 5 cycles on LS0 or LS1 and F0 or F1.
163 def VulcanWrite_5Cyc_LS01_F01 : SchedWriteRes<[VulcanLS01, VulcanF01]> {
168 // 6 cycles on LS0 or LS1 and F0 or F1.
169 def VulcanWrite_6Cyc_LS01_F01 : SchedWriteRes<[VulcanLS01, VulcanF01]> {
174 // 7 cycles on LS0 or LS1 and F0 or F1.
175 def VulcanWrite_7Cyc_LS01_F01 : SchedWriteRes<[VulcanLS01, VulcanF01]> {
180 // 8 cycles on LS0 or LS1 and F0 or F1.
181 def VulcanWrite_8Cyc_LS01_F01 : SchedWriteRes<[VulcanLS01, VulcanF01]> {
186 // Define commonly used read types.
188 // No forwarding is provided for these types.
189 def : ReadAdvance<ReadI, 0>;
190 def : ReadAdvance<ReadISReg, 0>;
191 def : ReadAdvance<ReadIEReg, 0>;
192 def : ReadAdvance<ReadIM, 0>;
193 def : ReadAdvance<ReadIMA, 0>;
194 def : ReadAdvance<ReadID, 0>;
195 def : ReadAdvance<ReadExtrHi, 0>;
196 def : ReadAdvance<ReadAdrBase, 0>;
197 def : ReadAdvance<ReadVLD, 0>;
202 //===----------------------------------------------------------------------===//
203 // 3. Instruction Tables.
205 let SchedModel = VulcanModel in {
208 // 3.1 Branch Instructions
212 // Branch and link, immed
213 // Compare and branch
214 def : WriteRes<WriteBr, [VulcanI2]> { let Latency = 1; }
216 def : WriteRes<WriteSys, []> { let Latency = 1; }
217 def : WriteRes<WriteBarrier, []> { let Latency = 1; }
218 def : WriteRes<WriteHint, []> { let Latency = 1; }
220 def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
223 // Branch and link, register != LR
224 // Branch and link, register = LR
225 def : WriteRes<WriteBrReg, [VulcanI2]> { let Latency = 1; }
228 // 3.2 Arithmetic and Logical Instructions
229 // 3.3 Move and Shift Instructions
233 // Conditional compare
234 // Conditional select
235 // Address generation
236 def : WriteRes<WriteI, [VulcanI012]> { let Latency = 1; }
237 def : InstRW<[WriteI], (instrs COPY)>;
239 // ALU, extend and/or shift
240 def : WriteRes<WriteISReg, [VulcanI012]> {
242 let ResourceCycles = [2];
245 def : WriteRes<WriteIEReg, [VulcanI012]> {
247 let ResourceCycles = [2];
251 def : WriteRes<WriteImm, [VulcanI012]> { let Latency = 1; }
254 def : WriteRes<WriteIS, [VulcanI012]> { let Latency = 1; }
257 // 3.4 Divide and Multiply Instructions
261 // Latency range of 13-23. Take the average.
262 def : WriteRes<WriteID32, [VulcanI1]> {
264 let ResourceCycles = [18];
268 // Latency range of 13-39. Take the average.
269 def : WriteRes<WriteID64, [VulcanI1]> {
271 let ResourceCycles = [26];
274 // Multiply accumulate, W-form
275 def : WriteRes<WriteIM32, [VulcanI012]> { let Latency = 5; }
277 // Multiply accumulate, X-form
278 def : WriteRes<WriteIM64, [VulcanI012]> { let Latency = 5; }
280 // Bitfield extract, two reg
281 def : WriteRes<WriteExtr, [VulcanI012]> { let Latency = 1; }
283 // Bitfield move, basic
284 // Bitfield move, insert
285 // NOTE: Handled by WriteIS.
288 def : InstRW<[VulcanWrite_3Cyc_I1], (instregex "^CLS(W|X)r$",
291 // Reverse bits/bytes
292 // NOTE: Handled by WriteI.
295 // 3.6 Load Instructions
296 // 3.10 FP Load Instructions
299 // Load register, literal
300 // Load register, unscaled immed
301 // Load register, immed unprivileged
302 // Load register, unsigned immed
303 def : WriteRes<WriteLD, [VulcanLS01]> { let Latency = 4; }
305 // Load register, immed post-index
306 // NOTE: Handled by WriteLD, WriteI.
307 // Load register, immed pre-index
308 // NOTE: Handled by WriteLD, WriteAdr.
309 def : WriteRes<WriteAdr, [VulcanI012]> { let Latency = 1; }
311 // Load register offset, basic
312 // Load register, register offset, scale by 4/8
313 // Load register, register offset, scale by 2
314 // Load register offset, extend
315 // Load register, register offset, extend, scale by 4/8
316 // Load register, register offset, extend, scale by 2
317 def VulcanWriteLDIdx : SchedWriteVariant<[
318 SchedVar<ScaledIdxPred, [VulcanWrite_6Cyc_LS01_I012_I012]>,
319 SchedVar<NoSchedPred, [VulcanWrite_5Cyc_LS01_I012]>]>;
320 def : SchedAlias<WriteLDIdx, VulcanWriteLDIdx>;
322 def VulcanReadAdrBase : SchedReadVariant<[
323 SchedVar<ScaledIdxPred, [ReadDefault]>,
324 SchedVar<NoSchedPred, [ReadDefault]>]>;
325 def : SchedAlias<ReadAdrBase, VulcanReadAdrBase>;
327 // Load pair, immed offset, normal
328 // Load pair, immed offset, signed words, base != SP
329 // Load pair, immed offset signed words, base = SP
330 // LDP only breaks into *one* LS micro-op. Thus
331 // the resources are handling by WriteLD.
332 def : WriteRes<WriteLDHi, []> {
336 // Load pair, immed pre-index, normal
337 // Load pair, immed pre-index, signed words
338 // Load pair, immed post-index, normal
339 // Load pair, immed post-index, signed words
340 // NOTE: Handled by WriteLD, WriteLDHi, WriteAdr.
343 // 3.7 Store Instructions
344 // 3.11 FP Store Instructions
347 // Store register, unscaled immed
348 // Store register, immed unprivileged
349 // Store register, unsigned immed
350 def : WriteRes<WriteST, [VulcanLS01, VulcanSD]> {
355 // Store register, immed post-index
356 // NOTE: Handled by WriteAdr, WriteST, ReadAdrBase
358 // Store register, immed pre-index
359 // NOTE: Handled by WriteAdr, WriteST
361 // Store register, register offset, basic
362 // Store register, register offset, scaled by 4/8
363 // Store register, register offset, scaled by 2
364 // Store register, register offset, extend
365 // Store register, register offset, extend, scale by 4/8
366 // Store register, register offset, extend, scale by 1
367 def : WriteRes<WriteSTIdx, [VulcanLS01, VulcanSD, VulcanI012]> {
372 // Store pair, immed offset, W-form
373 // Store pair, immed offset, X-form
374 def : WriteRes<WriteSTP, [VulcanLS01, VulcanSD]> {
379 // Store pair, immed post-index, W-form
380 // Store pair, immed post-index, X-form
381 // Store pair, immed pre-index, W-form
382 // Store pair, immed pre-index, X-form
383 // NOTE: Handled by WriteAdr, WriteSTP.
386 // 3.8 FP Data Processing Instructions
392 def : WriteRes<WriteF, [VulcanF01]> { let Latency = 5; }
395 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FADD", "^FSUB")>;
398 def : WriteRes<WriteFCmp, [VulcanF01]> { let Latency = 5; }
401 // FP square root, S-form
402 def : WriteRes<WriteFDiv, [VulcanF01]> {
404 let ResourceCycles = [8];
408 // FP square root, D-form
409 def : InstRW<[VulcanWrite_23Cyc_F01], (instrs FDIVDrr, FSQRTDr)>;
412 // FP multiply accumulate
413 def : WriteRes<WriteFMul, [VulcanF01]> { let Latency = 6; }
415 // FP round to integral
416 def : InstRW<[VulcanWrite_7Cyc_F01],
417 (instregex "^FRINT(A|I|M|N|P|X|Z)(Sr|Dr)")>;
420 def : InstRW<[VulcanWrite_4Cyc_F01], (instregex "^FCSEL")>;
423 // 3.9 FP Miscellaneous Instructions
426 // FP convert, from vec to vec reg
427 // FP convert, from gen to vec reg
428 // FP convert, from vec to gen reg
429 def : WriteRes<WriteFCvt, [VulcanF01]> { let Latency = 7; }
433 def : WriteRes<WriteFImm, [VulcanF01]> { let Latency = 4; }
435 // FP transfer, from gen to vec reg
436 // FP transfer, from vec to gen reg
437 def : WriteRes<WriteFCopy, [VulcanF01]> { let Latency = 4; }
438 def : InstRW<[VulcanWrite_5Cyc_F01], (instrs FMOVXDHighr, FMOVDXHighr)>;
441 // 3.12 ASIMD Integer Instructions
444 // ASIMD absolute diff, D-form
445 // ASIMD absolute diff, Q-form
446 // ASIMD absolute diff accum, D-form
447 // ASIMD absolute diff accum, Q-form
448 // ASIMD absolute diff accum long
449 // ASIMD absolute diff long
450 // ASIMD arith, basic
451 // ASIMD arith, complex
453 // ASIMD logical (AND, BIC, EOR)
454 // ASIMD max/min, basic
455 // ASIMD max/min, reduce, 4H/4S
456 // ASIMD max/min, reduce, 8B/8H
457 // ASIMD max/min, reduce, 16B
458 // ASIMD multiply, D-form
459 // ASIMD multiply, Q-form
460 // ASIMD multiply accumulate long
461 // ASIMD multiply accumulate saturating long
462 // ASIMD multiply long
463 // ASIMD pairwise add and accumulate
464 // ASIMD shift accumulate
465 // ASIMD shift by immed, basic
466 // ASIMD shift by immed and insert, basic, D-form
467 // ASIMD shift by immed and insert, basic, Q-form
468 // ASIMD shift by immed, complex
469 // ASIMD shift by register, basic, D-form
470 // ASIMD shift by register, basic, Q-form
471 // ASIMD shift by register, complex, D-form
472 // ASIMD shift by register, complex, Q-form
473 def : WriteRes<WriteV, [VulcanF01]> { let Latency = 7; }
475 // ASIMD arith, reduce, 4H/4S
476 // ASIMD arith, reduce, 8B/8H
477 // ASIMD arith, reduce, 16B
478 def : InstRW<[VulcanWrite_5Cyc_F01],
479 (instregex "^ADDVv", "^SADDLVv", "^UADDLVv")>;
481 // ASIMD logical (MOV, MVN, ORN, ORR)
482 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^ORRv", "^ORNv", "^NOTv")>;
484 // ASIMD polynomial (8x8) multiply long
485 def : InstRW<[VulcanWrite_5Cyc_F01], (instrs PMULLv8i8, PMULLv16i8)>;
488 // 3.13 ASIMD Floating-point Instructions
491 // ASIMD FP absolute value
492 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FABSv")>;
494 // ASIMD FP arith, normal, D-form
495 // ASIMD FP arith, normal, Q-form
496 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FABDv", "^FADDv", "^FSUBv")>;
498 // ASIMD FP arith,pairwise, D-form
499 // ASIMD FP arith, pairwise, Q-form
500 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FADDPv")>;
502 // ASIMD FP compare, D-form
503 // ASIMD FP compare, Q-form
504 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FACGEv", "^FACGTv")>;
505 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FCMEQv", "^FCMGEv",
506 "^FCMGTv", "^FCMLEv",
509 // ASIMD FP convert, long
510 // ASIMD FP convert, narrow
511 // ASIMD FP convert, other, D-form
512 // ASIMD FP convert, other, Q-form
513 // NOTE: Handled by WriteV.
515 // ASIMD FP divide, D-form, F32
516 def : InstRW<[VulcanWrite_16Cyc_F01], (instrs FDIVv2f32)>;
518 // ASIMD FP divide, Q-form, F32
519 def : InstRW<[VulcanWrite_16Cyc_F01], (instrs FDIVv4f32)>;
521 // ASIMD FP divide, Q-form, F64
522 def : InstRW<[VulcanWrite_23Cyc_F01], (instrs FDIVv2f64)>;
524 // ASIMD FP max/min, normal, D-form
525 // ASIMD FP max/min, normal, Q-form
526 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FMAXv", "^FMAXNMv",
527 "^FMINv", "^FMINNMv")>;
529 // ASIMD FP max/min, pairwise, D-form
530 // ASIMD FP max/min, pairwise, Q-form
531 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FMAXPv", "^FMAXNMPv",
532 "^FMINPv", "^FMINNMPv")>;
534 // ASIMD FP max/min, reduce
535 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FMAXVv", "^FMAXNMVv",
536 "^FMINVv", "^FMINNMVv")>;
538 // ASIMD FP multiply, D-form, FZ
539 // ASIMD FP multiply, D-form, no FZ
540 // ASIMD FP multiply, Q-form, FZ
541 // ASIMD FP multiply, Q-form, no FZ
542 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FMULv", "^FMULXv")>;
544 // ASIMD FP multiply accumulate, Dform, FZ
545 // ASIMD FP multiply accumulate, Dform, no FZ
546 // ASIMD FP multiply accumulate, Qform, FZ
547 // ASIMD FP multiply accumulate, Qform, no FZ
548 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FMLAv", "^FMLSv")>;
551 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FNEGv")>;
553 // ASIMD FP round, D-form
554 // ASIMD FP round, Q-form
555 // NOTE: Handled by WriteV.
558 // 3.14 ASIMD Miscellaneous Instructions
562 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^RBITv")>;
564 // ASIMD bitwise insert, D-form
565 // ASIMD bitwise insert, Q-form
566 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^BIFv", "^BITv", "^BSLv")>;
568 // ASIMD count, D-form
569 // ASIMD count, Q-form
570 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^CLSv", "^CLZv", "^CNTv")>;
572 // ASIMD duplicate, gen reg
573 // ASIMD duplicate, element
574 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^DUPv")>;
577 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^EXTv")>;
579 // ASIMD extract narrow
580 // ASIMD extract narrow, saturating
581 // NOTE: Handled by WriteV.
583 // ASIMD insert, element to element
584 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^INSv")>;
586 // ASIMD move, integer immed
587 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^MOVIv", "^MOVIDv")>;
589 // ASIMD move, FP immed
590 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^FMOVv")>;
592 // ASIMD reciprocal estimate, D-form
593 // ASIMD reciprocal estimate, Q-form
594 def : InstRW<[VulcanWrite_5Cyc_F01],
595 (instregex "^FRECPEv", "^FRECPXv", "^URECPEv",
596 "^FRSQRTEv", "^URSQRTEv")>;
598 // ASIMD reciprocal step, D-form, FZ
599 // ASIMD reciprocal step, D-form, no FZ
600 // ASIMD reciprocal step, Q-form, FZ
601 // ASIMD reciprocal step, Q-form, no FZ
602 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^FRECPSv", "^FRSQRTSv")>;
605 def : InstRW<[VulcanWrite_5Cyc_F01],
606 (instregex "^REV16v", "^REV32v", "^REV64v")>;
608 // ASIMD table lookup, D-form
609 // ASIMD table lookup, Q-form
610 def : InstRW<[VulcanWrite_8Cyc_F01], (instregex "^TBLv", "^TBXv")>;
612 // ASIMD transfer, element to word or word
613 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^UMOVv")>;
615 // ASIMD transfer, element to gen reg
616 def : InstRW<[VulcanWrite_6Cyc_F01], (instregex "^SMOVv", "^UMOVv")>;
618 // ASIMD transfer gen reg to element
619 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^INSv")>;
622 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^TRN1v", "^TRN2v",
623 "^UZP1v", "^UZP2v")>;
626 def : InstRW<[VulcanWrite_5Cyc_F01], (instregex "^ZIP1v", "^ZIP2v")>;
629 // 3.15 ASIMD Load Instructions
632 // ASIMD load, 1 element, multiple, 1 reg, D-form
633 // ASIMD load, 1 element, multiple, 1 reg, Q-form
634 def : InstRW<[VulcanWrite_4Cyc_LS01],
635 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
636 def : InstRW<[VulcanWrite_4Cyc_LS01, WriteAdr],
637 (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
639 // ASIMD load, 1 element, multiple, 2 reg, D-form
640 // ASIMD load, 1 element, multiple, 2 reg, Q-form
641 def : InstRW<[VulcanWrite_4Cyc_LS01],
642 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
643 def : InstRW<[VulcanWrite_4Cyc_LS01, WriteAdr],
644 (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
646 // ASIMD load, 1 element, multiple, 3 reg, D-form
647 // ASIMD load, 1 element, multiple, 3 reg, Q-form
648 def : InstRW<[VulcanWrite_5Cyc_LS01],
649 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
650 def : InstRW<[VulcanWrite_5Cyc_LS01, WriteAdr],
651 (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
653 // ASIMD load, 1 element, multiple, 4 reg, D-form
654 // ASIMD load, 1 element, multiple, 4 reg, Q-form
655 def : InstRW<[VulcanWrite_6Cyc_LS01],
656 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
657 def : InstRW<[VulcanWrite_6Cyc_LS01, WriteAdr],
658 (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
660 // ASIMD load, 1 element, one lane, B/H/S
661 // ASIMD load, 1 element, one lane, D
662 def : InstRW<[VulcanWrite_5Cyc_LS01_F01], (instregex "^LD1i(8|16|32|64)$")>;
663 def : InstRW<[VulcanWrite_5Cyc_LS01_F01, WriteAdr],
664 (instregex "^LD1i(8|16|32|64)_POST$")>;
666 // ASIMD load, 1 element, all lanes, D-form, B/H/S
667 // ASIMD load, 1 element, all lanes, D-form, D
668 // ASIMD load, 1 element, all lanes, Q-form
669 def : InstRW<[VulcanWrite_5Cyc_LS01_F01],
670 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
671 def : InstRW<[VulcanWrite_5Cyc_LS01_F01, WriteAdr],
672 (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
674 // ASIMD load, 2 element, multiple, D-form, B/H/S
675 // ASIMD load, 2 element, multiple, Q-form, D
676 def : InstRW<[VulcanWrite_5Cyc_LS01_F01],
677 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
678 def : InstRW<[VulcanWrite_5Cyc_LS01_F01, WriteAdr],
679 (instregex "^LD2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
681 // ASIMD load, 2 element, one lane, B/H
682 // ASIMD load, 2 element, one lane, S
683 // ASIMD load, 2 element, one lane, D
684 def : InstRW<[VulcanWrite_5Cyc_LS01_F01], (instregex "^LD2i(8|16|32|64)$")>;
685 def : InstRW<[VulcanWrite_5Cyc_LS01_F01, WriteAdr],
686 (instregex "^LD2i(8|16|32|64)_POST$")>;
688 // ASIMD load, 2 element, all lanes, D-form, B/H/S
689 // ASIMD load, 2 element, all lanes, D-form, D
690 // ASIMD load, 2 element, all lanes, Q-form
691 def : InstRW<[VulcanWrite_5Cyc_LS01_F01],
692 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
693 def : InstRW<[VulcanWrite_5Cyc_LS01_F01, WriteAdr],
694 (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
696 // ASIMD load, 3 element, multiple, D-form, B/H/S
697 // ASIMD load, 3 element, multiple, Q-form, B/H/S
698 // ASIMD load, 3 element, multiple, Q-form, D
699 def : InstRW<[VulcanWrite_8Cyc_LS01_F01],
700 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
701 def : InstRW<[VulcanWrite_8Cyc_LS01_F01, WriteAdr],
702 (instregex "^LD3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
704 // ASIMD load, 3 element, one lone, B/H
705 // ASIMD load, 3 element, one lane, S
706 // ASIMD load, 3 element, one lane, D
707 def : InstRW<[VulcanWrite_7Cyc_LS01_F01], (instregex "^LD3i(8|16|32|64)$")>;
708 def : InstRW<[VulcanWrite_7Cyc_LS01_F01, WriteAdr],
709 (instregex "^LD3i(8|16|32|64)_POST$")>;
711 // ASIMD load, 3 element, all lanes, D-form, B/H/S
712 // ASIMD load, 3 element, all lanes, D-form, D
713 // ASIMD load, 3 element, all lanes, Q-form, B/H/S
714 // ASIMD load, 3 element, all lanes, Q-form, D
715 def : InstRW<[VulcanWrite_7Cyc_LS01_F01],
716 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
717 def : InstRW<[VulcanWrite_7Cyc_LS01_F01, WriteAdr],
718 (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
720 // ASIMD load, 4 element, multiple, D-form, B/H/S
721 // ASIMD load, 4 element, multiple, Q-form, B/H/S
722 // ASIMD load, 4 element, multiple, Q-form, D
723 def : InstRW<[VulcanWrite_8Cyc_LS01_F01],
724 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
725 def : InstRW<[VulcanWrite_8Cyc_LS01_F01, WriteAdr],
726 (instregex "^LD4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
728 // ASIMD load, 4 element, one lane, B/H
729 // ASIMD load, 4 element, one lane, S
730 // ASIMD load, 4 element, one lane, D
731 def : InstRW<[VulcanWrite_6Cyc_LS01_F01], (instregex "^LD4i(8|16|32|64)$")>;
732 def : InstRW<[VulcanWrite_6Cyc_LS01_F01, WriteAdr],
733 (instregex "^LD4i(8|16|32|64)_POST$")>;
735 // ASIMD load, 4 element, all lanes, D-form, B/H/S
736 // ASIMD load, 4 element, all lanes, D-form, D
737 // ASIMD load, 4 element, all lanes, Q-form, B/H/S
738 // ASIMD load, 4 element, all lanes, Q-form, D
739 def : InstRW<[VulcanWrite_6Cyc_LS01_F01],
740 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
741 def : InstRW<[VulcanWrite_6Cyc_LS01_F01, WriteAdr],
742 (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
745 // 3.16 ASIMD Store Instructions
748 // ASIMD store, 1 element, multiple, 1 reg, D-form
749 // ASIMD store, 1 element, multiple, 1 reg, Q-form
750 def : InstRW<[VulcanWrite_1Cyc_LS01],
751 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
752 def : InstRW<[VulcanWrite_1Cyc_LS01, WriteAdr],
753 (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
755 // ASIMD store, 1 element, multiple, 2 reg, D-form
756 // ASIMD store, 1 element, multiple, 2 reg, Q-form
757 def : InstRW<[VulcanWrite_1Cyc_LS01],
758 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
759 def : InstRW<[VulcanWrite_1Cyc_LS01, WriteAdr],
760 (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
762 // ASIMD store, 1 element, multiple, 3 reg, D-form
763 // ASIMD store, 1 element, multiple, 3 reg, Q-form
764 def : InstRW<[VulcanWrite_1Cyc_LS01],
765 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
766 def : InstRW<[VulcanWrite_1Cyc_LS01, WriteAdr],
767 (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
769 // ASIMD store, 1 element, multiple, 4 reg, D-form
770 // ASIMD store, 1 element, multiple, 4 reg, Q-form
771 def : InstRW<[VulcanWrite_1Cyc_LS01],
772 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
773 def : InstRW<[VulcanWrite_1Cyc_LS01, WriteAdr],
774 (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
776 // ASIMD store, 1 element, one lane, B/H/S
777 // ASIMD store, 1 element, one lane, D
778 def : InstRW<[VulcanWrite_1Cyc_LS01_F01],
779 (instregex "^ST1i(8|16|32|64)$")>;
780 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
781 (instregex "^ST1i(8|16|32|64)_POST$")>;
783 // ASIMD store, 2 element, multiple, D-form, B/H/S
784 // ASIMD store, 2 element, multiple, Q-form, B/H/S
785 // ASIMD store, 2 element, multiple, Q-form, D
786 def : InstRW<[VulcanWrite_1Cyc_LS01_F01],
787 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)$")>;
788 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
789 (instregex "^ST2Twov(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
791 // ASIMD store, 2 element, one lane, B/H/S
792 // ASIMD store, 2 element, one lane, D
793 def : InstRW<[VulcanWrite_1Cyc_LS01_F01],
794 (instregex "^ST2i(8|16|32|64)$")>;
795 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
796 (instregex "^ST2i(8|16|32|64)_POST$")>;
798 // ASIMD store, 3 element, multiple, D-form, B/H/S
799 // ASIMD store, 3 element, multiple, Q-form, B/H/S
800 // ASIMD store, 3 element, multiple, Q-form, D
801 def : InstRW<[VulcanWrite_1Cyc_LS01_F01],
802 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)$")>;
803 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
804 (instregex "^ST3Threev(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
806 // ASIMD store, 3 element, one lane, B/H
807 // ASIMD store, 3 element, one lane, S
808 // ASIMD store, 3 element, one lane, D
809 def : InstRW<[VulcanWrite_1Cyc_LS01_F01], (instregex "^ST3i(8|16|32|64)$")>;
810 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
811 (instregex "^ST3i(8|16|32|64)_POST$")>;
813 // ASIMD store, 4 element, multiple, D-form, B/H/S
814 // ASIMD store, 4 element, multiple, Q-form, B/H/S
815 // ASIMD store, 4 element, multiple, Q-form, D
816 def : InstRW<[VulcanWrite_1Cyc_LS01_F01],
817 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)$")>;
818 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
819 (instregex "^ST4Fourv(8b|4h|2s|16b|8h|4s|2d)_POST$")>;
821 // ASIMD store, 4 element, one lane, B/H
822 // ASIMD store, 4 element, one lane, S
823 // ASIMD store, 4 element, one lane, D
824 def : InstRW<[VulcanWrite_1Cyc_LS01_F01], (instregex "^ST4i(8|16|32|64)$")>;
825 def : InstRW<[VulcanWrite_1Cyc_LS01_F01, WriteAdr],
826 (instregex "^ST4i(8|16|32|64)_POST$")>;
829 // 3.17 Cryptography Extensions
833 def : InstRW<[VulcanWrite_5Cyc_F1], (instregex "^AES")>;
835 // Crypto polynomial (64x64) multiply long
836 def : InstRW<[VulcanWrite_5Cyc_F1], (instrs PMULLv1i64, PMULLv2i64)>;
838 // Crypto SHA1 xor ops
839 // Crypto SHA1 schedule acceleration ops
840 // Crypto SHA256 schedule acceleration op (1 u-op)
841 // Crypto SHA256 schedule acceleration op (2 u-ops)
842 // Crypto SHA256 hash acceleration ops
843 def : InstRW<[VulcanWrite_7Cyc_F1], (instregex "^SHA")>;
850 def : InstRW<[VulcanWrite_4Cyc_I1], (instregex "^CRC32")>;
852 } // SchedModel = VulcanModel