annotate lib/Target/ARM/ARMScheduleA57.td @ 134:3a76565eade5 LLVM5.0.1

update 5.0.1
author mir3636
date Sat, 17 Feb 2018 09:57:20 +0900
parents 803732b1fca8
children c2174574ed3a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 //=- ARMScheduleA57.td - ARM Cortex-A57 Scheduling Defs -----*- tablegen -*-=//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 // This file defines the machine model for ARM Cortex-A57 to support
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 // instruction scheduling and other instruction cost heuristics.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 // *** Common description and scheduling model parameters taken from AArch64 ***
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 // The Cortex-A57 is a traditional superscalar microprocessor with a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 // conservative 3-wide in-order stage for decode and dispatch. Combined with the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 // much wider out-of-order issue stage, this produced a need to carefully
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 // schedule micro-ops so that all three decoded each cycle are successfully
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 // issued as the reservation station(s) simply don't stay occupied for long.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 // Therefore, IssueWidth is set to the narrower of the two at three, while still
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 // modeling the machine as out-of-order.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 def IsCPSRDefinedPred : SchedPredicate<[{TII->isCPSRDefined(*MI)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 def IsCPSRDefinedAndPredicatedPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 SchedPredicate<[{TII->isCPSRDefined(*MI) && TII->isPredicated(*MI)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 // Cortex A57 rev. r1p0 or later (false = r0px)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 def IsR1P0AndLaterPred : SchedPredicate<[{false}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 // If Addrmode3 contains register offset (not immediate)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 def IsLdrAm3RegOffPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 SchedPredicate<[{!TII->isAddrMode3OpImm(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 // The same predicate with operand offset 2 and 3:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 def IsLdrAm3RegOffPredX2 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 SchedPredicate<[{!TII->isAddrMode3OpImm(*MI, 2)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 def IsLdrAm3RegOffPredX3 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 SchedPredicate<[{!TII->isAddrMode3OpImm(*MI, 3)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 // If Addrmode3 contains "minus register"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 def IsLdrAm3NegRegOffPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 SchedPredicate<[{TII->isAddrMode3OpMinusReg(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 // The same predicate with operand offset 2 and 3:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 def IsLdrAm3NegRegOffPredX2 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 SchedPredicate<[{TII->isAddrMode3OpMinusReg(*MI, 2)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 def IsLdrAm3NegRegOffPredX3 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 SchedPredicate<[{TII->isAddrMode3OpMinusReg(*MI, 3)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 // Load, scaled register offset, not plus LSL2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 def IsLdstsoScaledNotOptimalPredX0 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 SchedPredicate<[{TII->isLdstScaledRegNotPlusLsl2(*MI, 0)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 def IsLdstsoScaledNotOptimalPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 SchedPredicate<[{TII->isLdstScaledRegNotPlusLsl2(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 def IsLdstsoScaledNotOptimalPredX2 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 SchedPredicate<[{TII->isLdstScaledRegNotPlusLsl2(*MI, 2)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 // Load, scaled register offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 def IsLdstsoScaledPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60 SchedPredicate<[{TII->isLdstScaledReg(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 def IsLdstsoScaledPredX2 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62 SchedPredicate<[{TII->isLdstScaledReg(*MI, 2)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 def IsLdstsoMinusRegPredX0 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 SchedPredicate<[{TII->isLdstSoMinusReg(*MI, 0)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66 def IsLdstsoMinusRegPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67 SchedPredicate<[{TII->isLdstSoMinusReg(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 def IsLdstsoMinusRegPredX2 :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69 SchedPredicate<[{TII->isLdstSoMinusReg(*MI, 2)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 // Load, scaled register offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 def IsLdrAm2ScaledPred :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 SchedPredicate<[{TII->isAm2ScaledReg(*MI, 1)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75 // LDM, base reg in list
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76 def IsLdmBaseRegInList :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77 SchedPredicate<[{TII->isLDMBaseRegInList(*MI)}]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 class A57WriteLMOpsListType<list<SchedWriteRes> writes> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 list <SchedWriteRes> Writes = writes;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81 SchedMachineModel SchedModel = ?;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 // *** Common description and scheduling model parameters taken from AArch64 ***
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
85 // (AArch64SchedA57.td)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
86 def CortexA57Model : SchedMachineModel {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
87 let IssueWidth = 3; // 3-way decode and dispatch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
88 let MicroOpBufferSize = 128; // 128 micro-op re-order buffer
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
89 let LoadLatency = 4; // Optimistic load latency
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
90 let MispredictPenalty = 16; // Fetch + Decode/Rename/Dispatch + Branch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
91
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
92 // Enable partial & runtime unrolling.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
93 let LoopMicroOpBufferSize = 16;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
94 let CompleteModel = 1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
95 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
96
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
97 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
98 // Define each kind of processor resource and number available on Cortex-A57.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
99 // Cortex A-57 has 8 pipelines that each has its own 8-entry queue where
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
100 // micro-ops wait for their operands and then issue out-of-order.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
101
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
102 def A57UnitB : ProcResource<1>; // Type B micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
103 def A57UnitI : ProcResource<2>; // Type I micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
104 def A57UnitM : ProcResource<1>; // Type M micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
105 def A57UnitL : ProcResource<1>; // Type L micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
106 def A57UnitS : ProcResource<1>; // Type S micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
107
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
108 def A57UnitX : ProcResource<1>; // Type X micro-ops (F1)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
109 def A57UnitW : ProcResource<1>; // Type W micro-ops (F0)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
110
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
111 let SchedModel = CortexA57Model in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
112 def A57UnitV : ProcResGroup<[A57UnitX, A57UnitW]>; // Type V micro-ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
113 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
114
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
115 let SchedModel = CortexA57Model in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
116
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
117 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
118 // Define customized scheduler read/write types specific to the Cortex-A57.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
119
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
120 include "ARMScheduleA57WriteRes.td"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
122 // To have "CompleteModel = 1", support of pseudos and special instructions
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
123 def : InstRW<[WriteNoop], (instregex "(t)?BKPT$", "(t2)?CDP(2)?$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
124 "(t2)?CLREX$", "CONSTPOOL_ENTRY$", "COPY_STRUCT_BYVAL_I32$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
125 "(t2)?CPS[123]p$", "(t2)?DBG$", "(t2)?DMB$", "(t2)?DSB$", "ERET$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
126 "(t2|t)?HINT$", "(t)?HLT$", "(t2)?HVC$", "(t2)?ISB$", "ITasm$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
127 "(t2)?RFE(DA|DB|IA|IB)", "(t)?SETEND", "(t2)?SETPAN", "(t2)?SMC", "SPACE",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
128 "(t2)?SRS(DA|DB|IA|IB)", "SWP(B)?", "t?TRAP", "UDF$", "t2DCPS", "t2SG",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
129 "t2TT", "tCPS", "CMP_SWAP", "t?SVC", "t2IT", "CompilerBarrier")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
130
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
131 def : InstRW<[WriteNoop], (instregex "VMRS", "VMSR", "FMSTAT")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
132
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
133 // Specific memory instrs
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
134 def : InstRW<[WriteNoop, WriteNoop], (instregex "(t2)?LDA", "(t2)?LDC", "(t2)?STC",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
135 "(t2)?STL", "(t2)?LDREX", "(t2)?STREX", "MEMCPY")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
136
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
137 // coprocessor moves
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
138 def : InstRW<[WriteNoop, WriteNoop], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
139 "(t2)?MCR(2|R|R2)?$", "(t2)?MRC(2)?$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
140 "(t2)?MRRC(2)?$", "(t2)?MRS(banked|sys|_AR|_M|sys_AR)?$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
141 "(t2)?MSR(banked|i|_AR|_M)?$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
142
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
143 // Deprecated instructions
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
144 def : InstRW<[WriteNoop], (instregex "FLDM", "FSTM")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
145
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
146 // Pseudos
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
147 def : InstRW<[WriteNoop], (instregex "(t2)?ABS$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
148 "(t)?ADJCALLSTACKDOWN$", "(t)?ADJCALLSTACKUP$", "(t2|t)?Int_eh_sjlj",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
149 "tLDRpci_pic", "t2SUBS_PC_LR",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
150 "JUMPTABLE", "tInt_WIN_eh_sjlj_longjmp",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
151 "VLD(1|2)LN(d|q)(WB_fixed_|WB_register_)?Asm",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
152 "VLD(3|4)(DUP|LN)?(d|q)(WB_fixed_|WB_register_)?Asm",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
153 "VST(1|2)LN(d|q)(WB_fixed_|WB_register_)?Asm",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
154 "VST(3|4)(DUP|LN)?(d|q)(WB_fixed_|WB_register_)?Asm",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
155 "WIN__CHKSTK", "WIN__DBZCHK")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
156
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
157 // Miscellaneous
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
158 // -----------------------------------------------------------------------------
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
159
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
160 def : InstRW<[A57Write_1cyc_1I], (instrs COPY)>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
161
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
162 // --- 3.2 Branch Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
163 // B, BX, BL, BLX (imm, reg != LR, reg == LR), CBZ, CBNZ
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
164
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
165 def : InstRW<[A57Write_1cyc_1B], (instregex "(t2|t)?B$", "t?BX", "(t2|t)?Bcc$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
166 "t?TAILJMP(d|r)", "TCRETURN(d|r)i", "tBfar", "tCBN?Z")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
167 def : InstRW<[A57Write_1cyc_1B_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
168 (instregex "t?BL$", "BL_pred$", "t?BLXi", "t?TPsoft")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
169 def : InstRW<[A57Write_2cyc_1B_1I], (instregex "BLX", "tBLX(NS)?r")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
170 // Pseudos
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
171 def : InstRW<[A57Write_2cyc_1B_1I], (instregex "BCCi64", "BCCZi64")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
172 def : InstRW<[A57Write_3cyc_1B_1I], (instregex "BR_JTadd", "t?BR_JTr",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
173 "t2BR_JT", "t2BXJ", "(t2)?TB(B|H)(_JT)?$", "tBRIND")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
174 def : InstRW<[A57Write_6cyc_1B_1L], (instregex "BR_JTm")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
175
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
176 // --- 3.3 Arithmetic and Logical Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
177 // ADD{S}, ADC{S}, ADR, AND{S}, BIC{S}, CMN, CMP, EOR{S}, ORN{S}, ORR{S},
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
178 // RSB{S}, RSC{S}, SUB{S}, SBC{S}, TEQ, TST
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
179
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
180 def : InstRW<[A57Write_1cyc_1I], (instregex "tADDframe")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
181
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
182 // shift by register, conditional or unconditional
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
183 // TODO: according to the doc, conditional uses I0/I1, unconditional uses M
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
184 // Why more complex instruction uses more simple pipeline?
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
185 // May be an error in doc.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
186 def A57WriteALUsi : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
187 // lsl #2, lsl #1, or lsr #1.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
188 SchedVar<IsPredicatedPred, [A57Write_2cyc_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
189 SchedVar<NoSchedPred, [A57Write_2cyc_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
190 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
191 def A57WriteALUsr : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
192 SchedVar<IsPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
193 SchedVar<NoSchedPred, [A57Write_2cyc_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
194 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
195 def A57WriteALUSsr : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
196 SchedVar<IsPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
197 SchedVar<NoSchedPred, [A57Write_2cyc_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
198 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
199 def A57ReadALUsr : SchedReadVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
200 SchedVar<IsPredicatedPred, [ReadDefault]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
201 SchedVar<NoSchedPred, [ReadDefault]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
202 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
203 def : SchedAlias<WriteALUsi, A57WriteALUsi>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
204 def : SchedAlias<WriteALUsr, A57WriteALUsr>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
205 def : SchedAlias<WriteALUSsr, A57WriteALUSsr>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
206 def : SchedAlias<ReadALUsr, A57ReadALUsr>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
207
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
208 def A57WriteCMPsr : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
209 SchedVar<IsPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
210 SchedVar<NoSchedPred, [A57Write_2cyc_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
211 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
212 def : SchedAlias<WriteCMP, A57Write_1cyc_1I>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
213 def : SchedAlias<WriteCMPsi, A57Write_2cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
214 def : SchedAlias<WriteCMPsr, A57WriteCMPsr>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
215
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
216 // --- 3.4 Move and Shift Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
217 // Move, basic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
218 // MOV{S}, MOVW, MVN{S}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
219 def : InstRW<[A57Write_1cyc_1I], (instregex "MOV(r|i|i16|r_TC)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
220 "(t2)?MVN(CC)?(r|i)", "BMOVPCB_CALL", "BMOVPCRX_CALL",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
221 "MOVCC(r|i|i16|i32imm)", "tMOV", "tMVN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
222
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
223 // Move, shift by immed, setflags/no setflags
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
224 // (ASR, LSL, LSR, ROR, RRX)=MOVsi, MVN
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
225 // setflags = isCPSRDefined
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
226 def A57WriteMOVsi : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
227 SchedVar<IsCPSRDefinedPred, [A57Write_2cyc_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
228 SchedVar<NoSchedPred, [A57Write_1cyc_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
229 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
230 def : InstRW<[A57WriteMOVsi], (instregex "MOV(CC)?si", "MVNsi",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
231 "ASRi", "(t2|t)ASRri", "LSRi", "(t2|t)LSRri", "LSLi", "(t2|t)LSLri", "RORi",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
232 "(t2|t)RORri", "(t2)?RRX", "t2MOV", "tROR")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
233
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
234 // shift by register, conditional or unconditional, setflags/no setflags
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
235 def A57WriteMOVsr : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
236 SchedVar<IsCPSRDefinedAndPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
237 SchedVar<IsCPSRDefinedPred, [A57Write_2cyc_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
238 SchedVar<IsPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
239 SchedVar<NoSchedPred, [A57Write_1cyc_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
240 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
241 def : InstRW<[A57WriteMOVsr], (instregex "MOV(CC)?sr", "MVNsr", "t2MVNs",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
242 "ASRr", "(t2|t)ASRrr", "LSRr", "(t2|t)LSRrr", "LSLr", "(t2|t)?LSLrr", "RORr",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
243 "(t2|t)RORrr")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
244
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
245 // Move, top
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
246 // MOVT - A57Write_2cyc_1M for r0px, A57Write_1cyc_1I for r1p0 and later
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
247 def A57WriteMOVT : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
248 SchedVar<IsR1P0AndLaterPred, [A57Write_1cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
249 SchedVar<NoSchedPred, [A57Write_2cyc_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
250 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
251 def : InstRW<[A57WriteMOVT], (instregex "MOVTi16")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
252
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
253 def A57WriteI2pc :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
254 WriteSequence<[A57Write_1cyc_1I, A57Write_1cyc_1I, A57Write_1cyc_1I]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
255 def A57WriteI2ld :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
256 WriteSequence<[A57Write_1cyc_1I, A57Write_1cyc_1I, A57Write_4cyc_1L]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
257 def : InstRW< [A57WriteI2pc], (instregex "MOV_ga_pcrel")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
258 def : InstRW< [A57WriteI2ld], (instregex "MOV_ga_pcrel_ldr")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
259
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
260 // +2cyc for branch forms
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
261 def : InstRW<[A57Write_3cyc_1I], (instregex "MOVPC(LR|RX)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
262
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
263 // --- 3.5 Divide and Multiply Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
264 // Divide: SDIV, UDIV
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
265 // latency from documentration: 4 ­‐ 20, maximum taken
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
266 def : SchedAlias<WriteDIV, A57Write_20cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
267 // Multiply: tMul not bound to common WriteRes types
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
268 def : InstRW<[A57Write_3cyc_1M], (instregex "tMUL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
269 def : SchedAlias<WriteMUL16, A57Write_3cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
270 def : SchedAlias<WriteMUL32, A57Write_3cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
271 def : ReadAdvance<ReadMUL, 0>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
272
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
273 // Multiply accumulate: MLA, MLS, SMLABB, SMLABT, SMLATB, SMLATT, SMLAWB,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
274 // SMLAWT, SMLAD{X}, SMLSD{X}, SMMLA{R}, SMMLS{R}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
275 // Multiply-accumulate pipelines support late-forwarding of accumulate operands
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
276 // from similar μops, allowing a typical sequence of multiply-accumulate μops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
277 // to issue one every 1 cycle (sched advance = 2).
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
278 def A57WriteMLA : SchedWriteRes<[A57UnitM]> { let Latency = 3; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
279 def A57WriteMLAL : SchedWriteRes<[A57UnitM]> { let Latency = 4; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
280 def A57ReadMLA : SchedReadAdvance<2, [A57WriteMLA, A57WriteMLAL]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
281
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
282 def : SchedAlias<WriteMAC16, A57WriteMLA>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
283 def : SchedAlias<WriteMAC32, A57WriteMLA>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
284 def : SchedAlias<ReadMAC, A57ReadMLA>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
285
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
286 def : SchedAlias<WriteMAC64Lo, A57WriteMLAL>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
287 def : SchedAlias<WriteMAC64Hi, A57WriteMLAL>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
288
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
289 // Multiply long: SMULL, UMULL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
290 def : SchedAlias<WriteMUL64Lo, A57Write_4cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
291 def : SchedAlias<WriteMUL64Hi, A57Write_4cyc_1M>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
292
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
293 // --- 3.6 Saturating and Parallel Arithmetic Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
294 // Parallel arith
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
295 // SADD16, SADD8, SSUB16, SSUB8, UADD16, UADD8, USUB16, USUB8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
296 // Conditional GE-setting instructions require three extra μops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
297 // and two additional cycles to conditionally update the GE field.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
298 def A57WriteParArith : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
299 SchedVar<IsPredicatedPred, [A57Write_4cyc_1I_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
300 SchedVar<NoSchedPred, [A57Write_2cyc_1I_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
301 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
302 def : InstRW< [A57WriteParArith], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
303 "(t2)?SADD(16|8)", "(t2)?SSUB(16|8)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
304 "(t2)?UADD(16|8)", "(t2)?USUB(16|8)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
305
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
306 // Parallel arith with exchange: SASX, SSAX, UASX, USAX
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
307 def A57WriteParArithExch : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
308 SchedVar<IsPredicatedPred, [A57Write_5cyc_1I_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
309 SchedVar<NoSchedPred, [A57Write_3cyc_1I_1M]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
310 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
311 def : InstRW<[A57WriteParArithExch],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
312 (instregex "(t2)?SASX", "(t2)?SSAX", "(t2)?UASX", "(t2)?USAX")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
313
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
314 // Parallel halving arith
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
315 // SHADD16, SHADD8, SHSUB16, SHSUB8, UHADD16, UHADD8, UHSUB16, UHSUB8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
316 def : InstRW<[A57Write_2cyc_1M], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
317 "(t2)?SHADD(16|8)", "(t2)?SHSUB(16|8)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
318 "(t2)?UHADD(16|8)", "(t2)?UHSUB(16|8)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
319
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
320 // Parallel halving arith with exchange
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
321 // SHASX, SHSAX, UHASX, UHSAX
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
322 def : InstRW<[A57Write_3cyc_1I_1M], (instregex "(t2)?SHASX", "(t2)?SHSAX",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
323 "(t2)?UHASX", "(t2)?UHSAX")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
324
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
325 // Parallel saturating arith
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
326 // QADD16, QADD8, QSUB16, QSUB8, UQADD16, UQADD8, UQSUB16, UQSUB8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
327 def : InstRW<[A57Write_2cyc_1M], (instregex "QADD(16|8)", "QSUB(16|8)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
328 "UQADD(16|8)", "UQSUB(16|8)", "t2(U?)QADD", "t2(U?)QSUB")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
329
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
330 // Parallel saturating arith with exchange
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
331 // QASX, QSAX, UQASX, UQSAX
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
332 def : InstRW<[A57Write_3cyc_1I_1M], (instregex "(t2)?QASX", "(t2)?QSAX",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
333 "(t2)?UQASX", "(t2)?UQSAX")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
334
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
335 // Saturate: SSAT, SSAT16, USAT, USAT16
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
336 def : InstRW<[A57Write_2cyc_1M],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
337 (instregex "(t2)?SSAT(16)?", "(t2)?USAT(16)?")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
338
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
339 // Saturating arith: QADD, QSUB
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
340 def : InstRW<[A57Write_2cyc_1M], (instregex "QADD$", "QSUB$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
341
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
342 // Saturating doubling arith: QDADD, QDSUB
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
343 def : InstRW<[A57Write_3cyc_1I_1M], (instregex "(t2)?QDADD", "(t2)?QDSUB")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
344
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
345 // --- 3.7 Miscellaneous Data-Processing Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
346 // Bit field extract: SBFX, UBFX
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
347 def : InstRW<[A57Write_1cyc_1I], (instregex "(t2)?SBFX", "(t2)?UBFX")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
348
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
349 // Bit field insert/clear: BFI, BFC
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
350 def : InstRW<[A57Write_2cyc_1M], (instregex "(t2)?BFI", "(t2)?BFC")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
351
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
352 // Select bytes, conditional/unconditional
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
353 def A57WriteSEL : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
354 SchedVar<IsPredicatedPred, [A57Write_2cyc_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
355 SchedVar<NoSchedPred, [A57Write_1cyc_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
356 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
357 def : InstRW<[A57WriteSEL], (instregex "(t2)?SEL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
358
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
359 // Sign/zero extend, normal: SXTB, SXTH, UXTB, UXTH
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
360 def : InstRW<[A57Write_1cyc_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
361 (instregex "(t2|t)?SXT(B|H)$", "(t2|t)?UXT(B|H)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
362
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
363 // Sign/zero extend and add, normal: SXTAB, SXTAH, UXTAB, UXTAH
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
364 def : InstRW<[A57Write_2cyc_1M],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
365 (instregex "(t2)?SXTA(B|H)$", "(t2)?UXTA(B|H)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
366
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
367 // Sign/zero extend and add, parallel: SXTAB16, UXTAB16
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
368 def : InstRW<[A57Write_4cyc_1M], (instregex "(t2)?SXTAB16", "(t2)?UXTAB16")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
369
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
370 // Sum of absolute differences: USAD8, USADA8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
371 def : InstRW<[A57Write_3cyc_1M], (instregex "(t2)?USAD8", "(t2)?USADA8")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
372
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
373 // --- 3.8 Load Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
374
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
375 // Load, immed offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
376 // LDR and LDRB have LDRi12 and LDRBi12 forms for immediate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
377 def : InstRW<[A57Write_4cyc_1L], (instregex "LDRi12", "LDRBi12",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
378 "LDRcp", "(t2|t)?LDRConstPool", "LDRLIT_ga_(pcrel|abs)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
379 "PICLDR", "tLDR")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
380
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
381 def : InstRW<[A57Write_4cyc_1L],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
382 (instregex "t2LDRS?(B|H)?(pcrel|T|i8|i12|pci|pci_pic|s)?$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
383
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
384 // For "Load, register offset, minus" we need +1cyc, +1I
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
385 def A57WriteLdrAm3 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
386 SchedVar<IsLdrAm3NegRegOffPred, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
387 SchedVar<NoSchedPred, [A57Write_4cyc_1L]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
388 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
389 def : InstRW<[A57WriteLdrAm3], (instregex "LDR(H|SH|SB)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
390 def A57WriteLdrAm3X2 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
391 SchedVar<IsLdrAm3NegRegOffPredX2, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
392 SchedVar<NoSchedPred, [A57Write_4cyc_1L]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
393 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
394 def : InstRW<[A57WriteLdrAm3X2, A57WriteLdrAm3X2], (instregex "LDRD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
395 def : InstRW<[A57Write_4cyc_1L, A57Write_4cyc_1L], (instregex "t2LDRDi8")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
396
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
397 def A57WriteLdrAmLDSTSO : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
398 SchedVar<IsLdstsoScaledNotOptimalPred, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
399 SchedVar<IsLdstsoMinusRegPred, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
400 SchedVar<NoSchedPred, [A57Write_4cyc_1L]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
401 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
402 def : InstRW<[A57WriteLdrAmLDSTSO], (instregex "LDRrs", "LDRBrs")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
403
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
404 def A57WrBackOne : SchedWriteRes<[]> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
405 let Latency = 1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
406 let NumMicroOps = 0;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
407 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
408 def A57WrBackTwo : SchedWriteRes<[]> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
409 let Latency = 2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
410 let NumMicroOps = 0;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
411 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
412 def A57WrBackThree : SchedWriteRes<[]> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
413 let Latency = 3;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
414 let NumMicroOps = 0;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
415 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
416
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
417 // --- LDR pre-indexed ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
418 // Load, immed pre-indexed (4 cyc for load result, 1 cyc for Base update)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
419 def : InstRW<[A57Write_4cyc_1L_1I, A57WrBackOne], (instregex "LDR_PRE_IMM",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
420 "LDRB_PRE_IMM", "t2LDRB_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
421
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
422 // Load, register pre-indexed (4 cyc for load result, 2 cyc for Base update)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
423 // (5 cyc load result for not-lsl2 scaled)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
424 def A57WriteLdrAmLDSTSOPre : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
425 SchedVar<IsLdstsoScaledNotOptimalPredX2, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
426 SchedVar<NoSchedPred, [A57Write_4cyc_1L_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
427 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
428 def : InstRW<[A57WriteLdrAmLDSTSOPre, A57WrBackTwo],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
429 (instregex "LDR_PRE_REG", "LDRB_PRE_REG")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
430
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
431 def A57WriteLdrAm3PreWrBack : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
432 SchedVar<IsLdrAm3RegOffPredX2, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
433 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
434 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
435 def : InstRW<[A57Write_4cyc_1L, A57WriteLdrAm3PreWrBack],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
436 (instregex "LDR(H|SH|SB)_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
437 def : InstRW<[A57Write_4cyc_1L, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
438 (instregex "t2LDR(H|SH|SB)?_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
439
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
440 // LDRD pre-indexed: 5(2) cyc for reg, 4(1) cyc for imm.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
441 def A57WriteLdrDAm3Pre : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
442 SchedVar<IsLdrAm3RegOffPredX3, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
443 SchedVar<NoSchedPred, [A57Write_4cyc_1L_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
444 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
445 def A57WriteLdrDAm3PreWrBack : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
446 SchedVar<IsLdrAm3RegOffPredX3, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
447 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
448 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
449 def : InstRW<[A57WriteLdrDAm3Pre, A57WriteLdrDAm3Pre, A57WriteLdrDAm3PreWrBack],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
450 (instregex "LDRD_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
451 def : InstRW<[A57Write_4cyc_1L_1I, A57Write_4cyc_1L_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
452 (instregex "t2LDRD_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
453
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
454 // --- LDR post-indexed ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
455 def : InstRW<[A57Write_4cyc_1L_1I, A57WrBackOne], (instregex "LDR(T?)_POST_IMM",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
456 "LDRB(T?)_POST_IMM", "LDR(SB|H|SH)Ti", "t2LDRB_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
457
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
458 def A57WriteLdrAm3PostWrBack : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
459 SchedVar<IsLdrAm3RegOffPred, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
460 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
461 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
462 def : InstRW<[A57Write_4cyc_1L_1I, A57WriteLdrAm3PostWrBack],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
463 (instregex "LDR(H|SH|SB)_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
464 def : InstRW<[A57Write_4cyc_1L, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
465 (instregex "t2LDR(H|SH|SB)?_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
466
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
467 def : InstRW<[A57Write_4cyc_1L_1I, A57WrBackTwo], (instregex "LDR_POST_REG",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
468 "LDRB_POST_REG", "LDR(B?)T_POST$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
469
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
470 def A57WriteLdrTRegPost : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
471 SchedVar<IsLdrAm2ScaledPred, [A57Write_4cyc_1I_1L_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
472 SchedVar<NoSchedPred, [A57Write_4cyc_1L_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
473 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
474 def A57WriteLdrTRegPostWrBack : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
475 SchedVar<IsLdrAm2ScaledPred, [A57WrBackThree]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
476 SchedVar<NoSchedPred, [A57WrBackTwo]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
477 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
478 // 4(3) "I0/I1,L,M" for scaled register, otherwise 4(2) "I0/I1,L"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
479 def : InstRW<[A57WriteLdrTRegPost, A57WriteLdrTRegPostWrBack],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
480 (instregex "LDRT_POST_REG", "LDRBT_POST_REG")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
481
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
482 def : InstRW<[A57Write_4cyc_1L_1I, A57WrBackTwo], (instregex "LDR(SB|H|SH)Tr")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
483
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
484 def A57WriteLdrAm3PostWrBackX3 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
485 SchedVar<IsLdrAm3RegOffPredX3, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
486 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
487 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
488 // LDRD post-indexed: 4(2) cyc for reg, 4(1) cyc for imm.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
489 def : InstRW<[A57Write_4cyc_1L_1I, A57Write_4cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
490 A57WriteLdrAm3PostWrBackX3], (instregex "LDRD_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
491 def : InstRW<[A57Write_4cyc_1L_1I, A57Write_4cyc_1L_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
492 (instregex "t2LDRD_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
493
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
494 // --- Preload instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
495 // Preload, immed offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
496 def : InstRW<[A57Write_4cyc_1L], (instregex "(t2)?PLDi12", "(t2)?PLDWi12",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
497 "t2PLDW?(i8|pci|s)", "(t2)?PLI")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
498
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
499 // Preload, register offset,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
500 // 5cyc "I0/I1,L" for minus reg or scaled not plus lsl2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
501 // otherwise 4cyc "L"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
502 def A57WritePLD : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
503 SchedVar<IsLdstsoScaledNotOptimalPredX0, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
504 SchedVar<IsLdstsoMinusRegPredX0, [A57Write_5cyc_1I_1L]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
505 SchedVar<NoSchedPred, [A57Write_4cyc_1L]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
506 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
507 def : InstRW<[A57WritePLD], (instregex "PLDrs", "PLDWrs")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
508
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
509 // --- Load multiple instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
510 foreach NumAddr = 1-8 in {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
511 def A57LMAddrPred#NumAddr :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
512 SchedPredicate<"(TII->getLDMVariableDefsSize(*MI)+1)/2 == "#NumAddr>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
513 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
514
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
515 def A57LDMOpsListNoregin : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
516 [A57Write_3cyc_1L, A57Write_3cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
517 A57Write_4cyc_1L, A57Write_4cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
518 A57Write_5cyc_1L, A57Write_5cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
519 A57Write_6cyc_1L, A57Write_6cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
520 A57Write_7cyc_1L, A57Write_7cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
521 A57Write_8cyc_1L, A57Write_8cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
522 A57Write_9cyc_1L, A57Write_9cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
523 A57Write_10cyc_1L, A57Write_10cyc_1L]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
524 def A57WriteLDMnoreginlist : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
525 SchedVar<A57LMAddrPred1, A57LDMOpsListNoregin.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
526 SchedVar<A57LMAddrPred2, A57LDMOpsListNoregin.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
527 SchedVar<A57LMAddrPred3, A57LDMOpsListNoregin.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
528 SchedVar<A57LMAddrPred4, A57LDMOpsListNoregin.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
529 SchedVar<A57LMAddrPred5, A57LDMOpsListNoregin.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
530 SchedVar<A57LMAddrPred6, A57LDMOpsListNoregin.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
531 SchedVar<A57LMAddrPred7, A57LDMOpsListNoregin.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
532 SchedVar<A57LMAddrPred8, A57LDMOpsListNoregin.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
533 SchedVar<NoSchedPred, A57LDMOpsListNoregin.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
534 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
535
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
536 def A57LDMOpsListRegin : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
537 [A57Write_4cyc_1L_1I, A57Write_4cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
538 A57Write_5cyc_1L_1I, A57Write_5cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
539 A57Write_6cyc_1L_1I, A57Write_6cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
540 A57Write_7cyc_1L_1I, A57Write_7cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
541 A57Write_8cyc_1L_1I, A57Write_8cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
542 A57Write_9cyc_1L_1I, A57Write_9cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
543 A57Write_10cyc_1L_1I, A57Write_10cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
544 A57Write_11cyc_1L_1I, A57Write_11cyc_1L_1I]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
545 def A57WriteLDMreginlist : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
546 SchedVar<A57LMAddrPred1, A57LDMOpsListRegin.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
547 SchedVar<A57LMAddrPred2, A57LDMOpsListRegin.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
548 SchedVar<A57LMAddrPred3, A57LDMOpsListRegin.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
549 SchedVar<A57LMAddrPred4, A57LDMOpsListRegin.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
550 SchedVar<A57LMAddrPred5, A57LDMOpsListRegin.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
551 SchedVar<A57LMAddrPred6, A57LDMOpsListRegin.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
552 SchedVar<A57LMAddrPred7, A57LDMOpsListRegin.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
553 SchedVar<A57LMAddrPred8, A57LDMOpsListRegin.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
554 SchedVar<NoSchedPred, A57LDMOpsListRegin.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
555 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
556
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
557 def A57LDMOpsList_Upd : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
558 [A57WrBackOne,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
559 A57Write_3cyc_1L_1I, A57Write_3cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
560 A57Write_4cyc_1L_1I, A57Write_4cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
561 A57Write_5cyc_1L_1I, A57Write_5cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
562 A57Write_6cyc_1L_1I, A57Write_6cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
563 A57Write_7cyc_1L_1I, A57Write_7cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
564 A57Write_8cyc_1L_1I, A57Write_8cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
565 A57Write_9cyc_1L_1I, A57Write_9cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
566 A57Write_10cyc_1L_1I, A57Write_10cyc_1L_1I]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
567 def A57WriteLDM_Upd : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
568 SchedVar<A57LMAddrPred1, A57LDMOpsList_Upd.Writes[0-2]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
569 SchedVar<A57LMAddrPred2, A57LDMOpsList_Upd.Writes[0-4]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
570 SchedVar<A57LMAddrPred3, A57LDMOpsList_Upd.Writes[0-6]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
571 SchedVar<A57LMAddrPred4, A57LDMOpsList_Upd.Writes[0-8]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
572 SchedVar<A57LMAddrPred5, A57LDMOpsList_Upd.Writes[0-10]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
573 SchedVar<A57LMAddrPred6, A57LDMOpsList_Upd.Writes[0-12]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
574 SchedVar<A57LMAddrPred7, A57LDMOpsList_Upd.Writes[0-14]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
575 SchedVar<A57LMAddrPred8, A57LDMOpsList_Upd.Writes[0-16]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
576 SchedVar<NoSchedPred, A57LDMOpsList_Upd.Writes[0-16]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
577 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
578
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
579 def A57WriteLDM : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
580 SchedVar<IsLdmBaseRegInList, [A57WriteLDMreginlist]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
581 SchedVar<NoSchedPred, [A57WriteLDMnoreginlist]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
582 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
583
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
584 def : InstRW<[A57WriteLDM], (instregex "(t|t2|sys)?LDM(IA|DA|DB|IB)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
585
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
586 // TODO: no writeback latency defined in documentation (implemented as 1 cyc)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
587 def : InstRW<[A57WriteLDM_Upd],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
588 (instregex "(t|t2|sys)?LDM(IA_UPD|DA_UPD|DB_UPD|IB_UPD|IA_RET)", "tPOP")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
589
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
590 // --- 3.9 Store Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
591
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
592 // Store, immed offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
593 def : InstRW<[A57Write_1cyc_1S], (instregex "STRi12", "STRBi12", "PICSTR",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
594 "t2STR(B?)(T|i12|i8|s)", "t2STRDi8", "t2STRH(i12|i8|s)", "tSTR")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
595
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
596 // Store, register offset
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
597 // For minus or for not plus lsl2 scaled we need 3cyc "I0/I1, S",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
598 // otherwise 1cyc S.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
599 def A57WriteStrAmLDSTSO : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
600 SchedVar<IsLdstsoScaledNotOptimalPred, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
601 SchedVar<IsLdstsoMinusRegPred, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
602 SchedVar<NoSchedPred, [A57Write_1cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
603 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
604 def : InstRW<[A57WriteStrAmLDSTSO], (instregex "STRrs", "STRBrs")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
605
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
606 // STRH,STRD: 3cyc "I0/I1, S" for minus reg, 1cyc S for imm or for plus reg.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
607 def A57WriteStrAm3 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
608 SchedVar<IsLdrAm3NegRegOffPred, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
609 SchedVar<NoSchedPred, [A57Write_1cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
610 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
611 def : InstRW<[A57WriteStrAm3], (instregex "STRH$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
612 def A57WriteStrAm3X2 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
613 SchedVar<IsLdrAm3NegRegOffPredX2, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
614 SchedVar<NoSchedPred, [A57Write_1cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
615 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
616 def : InstRW<[A57WriteStrAm3X2], (instregex "STRD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
617
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
618 // Store, immed pre-indexed (1cyc "S, I0/I1", 1cyc writeback)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
619 def : InstRW<[A57WrBackOne, A57Write_1cyc_1S_1I], (instregex "STR_PRE_IMM",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
620 "STRB_PRE_IMM", "STR(B)?(r|i)_preidx", "(t2)?STRH_(preidx|PRE)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
621 "t2STR(B?)_(PRE|preidx)", "t2STRD_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
622
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
623 // Store, register pre-indexed:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
624 // 1(1) "S, I0/I1" for plus reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
625 // 3(2) "I0/I1, S" for minus reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
626 // 1(2) "S, M" for scaled plus lsl2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
627 // 3(2) "I0/I1, S" for other scaled
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
628 def A57WriteStrAmLDSTSOPre : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
629 SchedVar<IsLdstsoScaledNotOptimalPredX2, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
630 SchedVar<IsLdstsoMinusRegPredX2, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
631 SchedVar<IsLdstsoScaledPredX2, [A57Write_1cyc_1S_1M]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
632 SchedVar<NoSchedPred, [A57Write_1cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
633 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
634 def A57WriteStrAmLDSTSOPreWrBack : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
635 SchedVar<IsLdstsoScaledPredX2, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
636 SchedVar<IsLdstsoMinusRegPredX2, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
637 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
638 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
639 def : InstRW<[A57WriteStrAmLDSTSOPreWrBack, A57WriteStrAmLDSTSOPre],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
640 (instregex "STR_PRE_REG", "STRB_PRE_REG")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
641
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
642 // pre-indexed STRH/STRD (STRH_PRE, STRD_PRE)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
643 // 1(1) "S, I0/I1" for imm or reg plus
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
644 // 3(2) "I0/I1, S" for reg minus
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
645 def A57WriteStrAm3PreX2 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
646 SchedVar<IsLdrAm3NegRegOffPredX2, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
647 SchedVar<NoSchedPred, [A57Write_1cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
648 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
649 def A57WriteStrAm3PreWrBackX2 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
650 SchedVar<IsLdrAm3NegRegOffPredX2, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
651 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
652 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
653 def : InstRW<[A57WriteStrAm3PreWrBackX2, A57WriteStrAm3PreX2],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
654 (instregex "STRH_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
655
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
656 def A57WriteStrAm3PreX3 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
657 SchedVar<IsLdrAm3NegRegOffPredX3, [A57Write_3cyc_1I_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
658 SchedVar<NoSchedPred, [A57Write_1cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
659 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
660 def A57WriteStrAm3PreWrBackX3 : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
661 SchedVar<IsLdrAm3NegRegOffPredX3, [A57WrBackTwo]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
662 SchedVar<NoSchedPred, [A57WrBackOne]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
663 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
664 def : InstRW<[A57WriteStrAm3PreWrBackX3, A57WriteStrAm3PreX3],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
665 (instregex "STRD_PRE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
666
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
667 def : InstRW<[A57WrBackOne, A57Write_1cyc_1S_1I], (instregex "STR(T?)_POST_IMM",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
668 "STRB(T?)_POST_IMM", "t2STR(B?)_POST")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
669
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
670 // 1(2) "S, M" for STR/STRB register post-indexed (both scaled or not)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
671 def : InstRW<[A57WrBackTwo, A57Write_1cyc_1S_1M], (instregex "STR(T?)_POST_REG",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
672 "STRB(T?)_POST_REG", "STR(B?)T_POST$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
673
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
674 // post-indexed STRH/STRD(STRH_POST, STRD_POST), STRHTi, STRHTr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
675 // 1(1) "S, I0/I1" both for reg or imm
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
676 def : InstRW<[A57WrBackOne, A57Write_1cyc_1S_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
677 (instregex "(t2)?STR(H|D)_POST", "STRHT(i|r)", "t2STRHT")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
678
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
679 // --- Store multiple instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
680 // TODO: no writeback latency defined in documentation
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
681 def A57WriteSTM : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
682 SchedVar<A57LMAddrPred1, [A57Write_1cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
683 SchedVar<A57LMAddrPred2, [A57Write_2cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
684 SchedVar<A57LMAddrPred3, [A57Write_3cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
685 SchedVar<A57LMAddrPred4, [A57Write_4cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
686 SchedVar<A57LMAddrPred5, [A57Write_5cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
687 SchedVar<A57LMAddrPred6, [A57Write_6cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
688 SchedVar<A57LMAddrPred7, [A57Write_7cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
689 SchedVar<A57LMAddrPred8, [A57Write_8cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
690 SchedVar<NoSchedPred, [A57Write_2cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
691 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
692 def A57WriteSTM_Upd : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
693 SchedVar<A57LMAddrPred1, [A57Write_1cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
694 SchedVar<A57LMAddrPred2, [A57Write_2cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
695 SchedVar<A57LMAddrPred3, [A57Write_3cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
696 SchedVar<A57LMAddrPred4, [A57Write_4cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
697 SchedVar<A57LMAddrPred5, [A57Write_5cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
698 SchedVar<A57LMAddrPred6, [A57Write_6cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
699 SchedVar<A57LMAddrPred7, [A57Write_7cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
700 SchedVar<A57LMAddrPred8, [A57Write_8cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
701 SchedVar<NoSchedPred, [A57Write_2cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
702 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
703
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
704 def : InstRW<[A57WriteSTM], (instregex "(t2|sys|t)?STM(IA|DA|DB|IB)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
705 def : InstRW<[A57WrBackOne, A57WriteSTM_Upd],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
706 (instregex "(t2|sys|t)?STM(IA_UPD|DA_UPD|DB_UPD|IB_UPD)", "tPUSH")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
707
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
708 // --- 3.10 FP Data Processing Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
709 def : SchedAlias<WriteFPALU32, A57Write_5cyc_1V>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
710 def : SchedAlias<WriteFPALU64, A57Write_5cyc_1V>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
711
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
712 def : InstRW<[A57Write_3cyc_1V], (instregex "VABS(S|D|H)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
713
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
714 // fp compare - 3cyc F1 for unconditional, 6cyc "F0/F1, F1" for conditional
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
715 def A57WriteVcmp : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
716 SchedVar<IsPredicatedPred, [A57Write_6cyc_1V_1X]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
717 SchedVar<NoSchedPred, [A57Write_3cyc_1X]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
718 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
719 def : InstRW<[A57WriteVcmp],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
720 (instregex "VCMP(D|S|H|ZD|ZS|ZH)$", "VCMPE(D|S|H|ZD|ZS|ZH)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
721
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
722 // fp convert
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
723 def : InstRW<[A57Write_5cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
724 "VCVT(A|N|P|M)(SH|UH|SS|US|SD|UD)", "VCVT(BDH|THD|TDH)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
725
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
726 def : SchedAlias<WriteFPCVT, A57Write_5cyc_1V>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
727
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
728 // FP round to integral
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
729 def : InstRW<[A57Write_5cyc_1V], (instregex "VRINT(A|N|P|M|Z|R|X)(H|S|D)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
730
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
731 // FP divide, FP square root
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
732 def : SchedAlias<WriteFPDIV32, A57Write_17cyc_1W>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
733 def : SchedAlias<WriteFPDIV64, A57Write_32cyc_1W>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
734 def : SchedAlias<WriteFPSQRT32, A57Write_17cyc_1W>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
735 def : SchedAlias<WriteFPSQRT64, A57Write_32cyc_1W>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
736
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
737 // FP max/min
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
738 def : InstRW<[A57Write_5cyc_1V], (instregex "VMAX", "VMIN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
739
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
740 // FP multiply-accumulate pipelines support late forwarding of the result
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
741 // from FP multiply μops to the accumulate operands of an
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
742 // FP multiply-accumulate μop. The latter can potentially be issued 1 cycle
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
743 // after the FP multiply μop has been issued
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
744 // FP multiply, FZ
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
745 def A57WriteVMUL : SchedWriteRes<[A57UnitV]> { let Latency = 5; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
746
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
747 def : SchedAlias<WriteFPMUL32, A57WriteVMUL>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
748 def : SchedAlias<WriteFPMUL64, A57WriteVMUL>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
749 def : ReadAdvance<ReadFPMUL, 0>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
750
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
751 // FP multiply accumulate, FZ: 9cyc "F0/F1" or 4 cyc for sequenced accumulate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
752 // VFMA, VFMS, VFNMA, VFNMS, VMLA, VMLS, VNMLA, VNMLS
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
753 def A57WriteVFMA : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
754
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
755 // VFMA takes 9 cyc for common case and 4 cyc for VFMA->VFMA chain (5 read adv.)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
756 // VMUL takes 5 cyc for common case and 1 cyc for VMUL->VFMA chain (4 read adv.)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
757 // Currently, there is no way to define different read advances for VFMA operand
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
758 // from VFMA or from VMUL, so there will be 5 read advance.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
759 // Zero latency (instead of one) for VMUL->VFMA shouldn't break something.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
760 // The same situation with ASIMD VMUL/VFMA instructions
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
761 // def A57ReadVFMA : SchedRead;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
762 // def : ReadAdvance<A57ReadVFMA, 5, [A57WriteVFMA]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
763 // def : ReadAdvance<A57ReadVFMA, 4, [A57WriteVMUL]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
764 def A57ReadVFMA5 : SchedReadAdvance<5, [A57WriteVFMA, A57WriteVMUL]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
765
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
766 def : SchedAlias<WriteFPMAC32, A57WriteVFMA>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
767 def : SchedAlias<WriteFPMAC64, A57WriteVFMA>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
768 def : SchedAlias<ReadFPMAC, A57ReadVFMA5>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
769
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
770 def : InstRW<[A57Write_3cyc_1V], (instregex "VNEG")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
771 def : InstRW<[A57Write_3cyc_1V], (instregex "VSEL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
772
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
773 // --- 3.11 FP Miscellaneous Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
774 // VMOV: 3cyc "F0/F1" for imm/reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
775 def : InstRW<[A57Write_3cyc_1V], (instregex "FCONST(D|S|H)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
776 def : InstRW<[A57Write_3cyc_1V], (instregex "VMOV(D|S|H)(cc)?$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
777
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
778 // 5cyc L for FP transfer, vfp to core reg,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
779 // 5cyc L for FP transfer, core reg to vfp
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
780 def : SchedAlias<WriteFPMOV, A57Write_5cyc_1L>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
781 // VMOVRRS/VMOVRRD in common code declared with one WriteFPMOV (instead of 2).
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
782 def : InstRW<[A57Write_5cyc_1L, A57Write_5cyc_1L], (instregex "VMOV(RRS|RRD)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
783
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
784 // 8cyc "L,F0/F1" for FP transfer, core reg to upper or lower half of vfp D-reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
785 def : InstRW<[A57Write_8cyc_1L_1I], (instregex "VMOVDRR")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
786
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
787 // --- 3.12 FP Load Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
788 def : InstRW<[A57Write_5cyc_1L], (instregex "VLDR(D|S|H)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
789
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
790 def : InstRW<[A57Write_5cyc_1L], (instregex "VLDMQIA$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
791
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
792 // FP load multiple (VLDM)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
793
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
794 def A57VLDMOpsListUncond : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
795 [A57Write_5cyc_1L, A57Write_5cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
796 A57Write_6cyc_1L, A57Write_6cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
797 A57Write_7cyc_1L, A57Write_7cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
798 A57Write_8cyc_1L, A57Write_8cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
799 A57Write_9cyc_1L, A57Write_9cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
800 A57Write_10cyc_1L, A57Write_10cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
801 A57Write_11cyc_1L, A57Write_11cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
802 A57Write_12cyc_1L, A57Write_12cyc_1L]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
803 def A57WriteVLDMuncond : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
804 SchedVar<A57LMAddrPred1, A57VLDMOpsListUncond.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
805 SchedVar<A57LMAddrPred2, A57VLDMOpsListUncond.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
806 SchedVar<A57LMAddrPred3, A57VLDMOpsListUncond.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
807 SchedVar<A57LMAddrPred4, A57VLDMOpsListUncond.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
808 SchedVar<A57LMAddrPred5, A57VLDMOpsListUncond.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
809 SchedVar<A57LMAddrPred6, A57VLDMOpsListUncond.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
810 SchedVar<A57LMAddrPred7, A57VLDMOpsListUncond.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
811 SchedVar<A57LMAddrPred8, A57VLDMOpsListUncond.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
812 SchedVar<NoSchedPred, A57VLDMOpsListUncond.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
813 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
814
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
815 def A57VLDMOpsListCond : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
816 [A57Write_5cyc_1L, A57Write_6cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
817 A57Write_7cyc_1L, A57Write_8cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
818 A57Write_9cyc_1L, A57Write_10cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
819 A57Write_11cyc_1L, A57Write_12cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
820 A57Write_13cyc_1L, A57Write_14cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
821 A57Write_15cyc_1L, A57Write_16cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
822 A57Write_17cyc_1L, A57Write_18cyc_1L,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
823 A57Write_19cyc_1L, A57Write_20cyc_1L]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
824 def A57WriteVLDMcond : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
825 SchedVar<A57LMAddrPred1, A57VLDMOpsListCond.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
826 SchedVar<A57LMAddrPred2, A57VLDMOpsListCond.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
827 SchedVar<A57LMAddrPred3, A57VLDMOpsListCond.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
828 SchedVar<A57LMAddrPred4, A57VLDMOpsListCond.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
829 SchedVar<A57LMAddrPred5, A57VLDMOpsListCond.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
830 SchedVar<A57LMAddrPred6, A57VLDMOpsListCond.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
831 SchedVar<A57LMAddrPred7, A57VLDMOpsListCond.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
832 SchedVar<A57LMAddrPred8, A57VLDMOpsListCond.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
833 SchedVar<NoSchedPred, A57VLDMOpsListCond.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
834 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
835
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
836 def A57WriteVLDM : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
837 SchedVar<IsPredicatedPred, [A57WriteVLDMcond]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
838 SchedVar<NoSchedPred, [A57WriteVLDMuncond]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
839 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
840
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
841 def : InstRW<[A57WriteVLDM], (instregex "VLDM(DIA|SIA)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
842
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
843 def A57VLDMOpsListUncond_Upd : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
844 [A57Write_5cyc_1L_1I, A57Write_5cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
845 A57Write_6cyc_1L_1I, A57Write_6cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
846 A57Write_7cyc_1L_1I, A57Write_7cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
847 A57Write_8cyc_1L_1I, A57Write_8cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
848 A57Write_9cyc_1L_1I, A57Write_9cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
849 A57Write_10cyc_1L_1I, A57Write_10cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
850 A57Write_11cyc_1L_1I, A57Write_11cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
851 A57Write_12cyc_1L_1I, A57Write_12cyc_1L_1I]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
852 def A57WriteVLDMuncond_UPD : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
853 SchedVar<A57LMAddrPred1, A57VLDMOpsListUncond_Upd.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
854 SchedVar<A57LMAddrPred2, A57VLDMOpsListUncond_Upd.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
855 SchedVar<A57LMAddrPred3, A57VLDMOpsListUncond_Upd.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
856 SchedVar<A57LMAddrPred4, A57VLDMOpsListUncond_Upd.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
857 SchedVar<A57LMAddrPred5, A57VLDMOpsListUncond_Upd.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
858 SchedVar<A57LMAddrPred6, A57VLDMOpsListUncond_Upd.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
859 SchedVar<A57LMAddrPred7, A57VLDMOpsListUncond_Upd.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
860 SchedVar<A57LMAddrPred8, A57VLDMOpsListUncond_Upd.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
861 SchedVar<NoSchedPred, A57VLDMOpsListUncond_Upd.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
862 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
863
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
864 def A57VLDMOpsListCond_Upd : A57WriteLMOpsListType<
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
865 [A57Write_5cyc_1L_1I, A57Write_6cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
866 A57Write_7cyc_1L_1I, A57Write_8cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
867 A57Write_9cyc_1L_1I, A57Write_10cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
868 A57Write_11cyc_1L_1I, A57Write_12cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
869 A57Write_13cyc_1L_1I, A57Write_14cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
870 A57Write_15cyc_1L_1I, A57Write_16cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
871 A57Write_17cyc_1L_1I, A57Write_18cyc_1L_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
872 A57Write_19cyc_1L_1I, A57Write_20cyc_1L_1I]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
873 def A57WriteVLDMcond_UPD : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
874 SchedVar<A57LMAddrPred1, A57VLDMOpsListCond_Upd.Writes[0-1]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
875 SchedVar<A57LMAddrPred2, A57VLDMOpsListCond_Upd.Writes[0-3]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
876 SchedVar<A57LMAddrPred3, A57VLDMOpsListCond_Upd.Writes[0-5]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
877 SchedVar<A57LMAddrPred4, A57VLDMOpsListCond_Upd.Writes[0-7]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
878 SchedVar<A57LMAddrPred5, A57VLDMOpsListCond_Upd.Writes[0-9]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
879 SchedVar<A57LMAddrPred6, A57VLDMOpsListCond_Upd.Writes[0-11]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
880 SchedVar<A57LMAddrPred7, A57VLDMOpsListCond_Upd.Writes[0-13]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
881 SchedVar<A57LMAddrPred8, A57VLDMOpsListCond_Upd.Writes[0-15]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
882 SchedVar<NoSchedPred, A57VLDMOpsListCond_Upd.Writes[0-15]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
883 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
884
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
885 def A57WriteVLDM_UPD : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
886 SchedVar<IsPredicatedPred, [A57WriteVLDMcond_UPD]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
887 SchedVar<NoSchedPred, [A57WriteVLDMuncond_UPD]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
888 ]> { let Variadic=1; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
889
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
890 def : InstRW<[A57WrBackOne, A57WriteVLDM_UPD],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
891 (instregex "VLDM(DIA_UPD|DDB_UPD|SIA_UPD|SDB_UPD)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
892
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
893 // --- 3.13 FP Store Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
894 def : InstRW<[A57Write_1cyc_1S], (instregex "VSTR(D|S|H)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
895
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
896 def : InstRW<[A57Write_2cyc_1S], (instregex "VSTMQIA$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
897
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
898 def A57WriteVSTMs : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
899 SchedVar<A57LMAddrPred1, [A57Write_1cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
900 SchedVar<A57LMAddrPred2, [A57Write_2cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
901 SchedVar<A57LMAddrPred3, [A57Write_3cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
902 SchedVar<A57LMAddrPred4, [A57Write_4cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
903 SchedVar<A57LMAddrPred5, [A57Write_5cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
904 SchedVar<A57LMAddrPred6, [A57Write_6cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
905 SchedVar<A57LMAddrPred7, [A57Write_7cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
906 SchedVar<A57LMAddrPred8, [A57Write_8cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
907 SchedVar<NoSchedPred, [A57Write_2cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
908 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
909 def A57WriteVSTMd : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
910 SchedVar<A57LMAddrPred1, [A57Write_2cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
911 SchedVar<A57LMAddrPred2, [A57Write_4cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
912 SchedVar<A57LMAddrPred3, [A57Write_6cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
913 SchedVar<A57LMAddrPred4, [A57Write_8cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
914 SchedVar<A57LMAddrPred5, [A57Write_10cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
915 SchedVar<A57LMAddrPred6, [A57Write_12cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
916 SchedVar<A57LMAddrPred7, [A57Write_14cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
917 SchedVar<A57LMAddrPred8, [A57Write_16cyc_1S]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
918 SchedVar<NoSchedPred, [A57Write_4cyc_1S]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
919 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
920 def A57WriteVSTMs_Upd : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
921 SchedVar<A57LMAddrPred1, [A57Write_1cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
922 SchedVar<A57LMAddrPred2, [A57Write_2cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
923 SchedVar<A57LMAddrPred3, [A57Write_3cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
924 SchedVar<A57LMAddrPred4, [A57Write_4cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
925 SchedVar<A57LMAddrPred5, [A57Write_5cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
926 SchedVar<A57LMAddrPred6, [A57Write_6cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
927 SchedVar<A57LMAddrPred7, [A57Write_7cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
928 SchedVar<A57LMAddrPred8, [A57Write_8cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
929 SchedVar<NoSchedPred, [A57Write_2cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
930 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
931 def A57WriteVSTMd_Upd : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
932 SchedVar<A57LMAddrPred1, [A57Write_2cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
933 SchedVar<A57LMAddrPred2, [A57Write_4cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
934 SchedVar<A57LMAddrPred3, [A57Write_6cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
935 SchedVar<A57LMAddrPred4, [A57Write_8cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
936 SchedVar<A57LMAddrPred5, [A57Write_10cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
937 SchedVar<A57LMAddrPred6, [A57Write_12cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
938 SchedVar<A57LMAddrPred7, [A57Write_14cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
939 SchedVar<A57LMAddrPred8, [A57Write_16cyc_1S_1I]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
940 SchedVar<NoSchedPred, [A57Write_2cyc_1S_1I]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
941 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
942
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
943 def : InstRW<[A57WriteVSTMs], (instregex "VSTMSIA$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
944 def : InstRW<[A57WriteVSTMd], (instregex "VSTMDIA$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
945 def : InstRW<[A57WrBackOne, A57WriteVSTMs_Upd],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
946 (instregex "VSTM(SIA_UPD|SDB_UPD)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
947 def : InstRW<[A57WrBackOne, A57WriteVSTMd_Upd],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
948 (instregex "VSTM(DIA_UPD|DDB_UPD)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
949
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
950 // --- 3.14 ASIMD Integer Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
951
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
952 // ASIMD absolute diff, 3cyc F0/F1 for integer VABD
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
953 def : InstRW<[A57Write_3cyc_1V], (instregex "VABD(s|u)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
954
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
955 // ASIMD absolute diff accum: 4(1) F1 for D-form, 5(2) F1 for Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
956 def A57WriteVABAD : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
957 def A57ReadVABAD : SchedReadAdvance<3, [A57WriteVABAD]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
958 def : InstRW<[A57WriteVABAD, A57ReadVABAD],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
959 (instregex "VABA(s|u)(v8i8|v4i16|v2i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
960 def A57WriteVABAQ : SchedWriteRes<[A57UnitX]> { let Latency = 5; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
961 def A57ReadVABAQ : SchedReadAdvance<3, [A57WriteVABAQ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
962 def : InstRW<[A57WriteVABAQ, A57ReadVABAQ],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
963 (instregex "VABA(s|u)(v16i8|v8i16|v4i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
964
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
965 // ASIMD absolute diff accum long: 4(1) F1 for VABAL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
966 def A57WriteVABAL : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
967 def A57ReadVABAL : SchedReadAdvance<3, [A57WriteVABAL]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
968 def : InstRW<[A57WriteVABAL, A57ReadVABAL], (instregex "VABAL(s|u)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
969
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
970 // ASIMD absolute diff long: 3cyc F0/F1 for VABDL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
971 def : InstRW<[A57Write_3cyc_1V], (instregex "VABDL(s|u)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
972
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
973 // ASIMD arith, basic
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
974 def : InstRW<[A57Write_3cyc_1V], (instregex "VADDv", "VADDL", "VADDW",
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
975 "VNEG(s8d|s16d|s32d|s8q|s16q|s32q|d|q)",
134
3a76565eade5 update 5.0.1
mir3636
parents: 121
diff changeset
976 "VPADDi", "VPADDL", "VSUBv", "VSUBL", "VSUBW")>;
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
977
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
978 // ASIMD arith, complex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
979 def : InstRW<[A57Write_3cyc_1V], (instregex "VABS", "VADDHN", "VHADD", "VHSUB",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
980 "VQABS", "VQADD", "VQNEG", "VQSUB",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
981 "VRADDHN", "VRHADD", "VRSUBHN", "VSUBHN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
982
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
983 // ASIMD compare
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
984 def : InstRW<[A57Write_3cyc_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
985 (instregex "VCEQ", "VCGE", "VCGT", "VCLE", "VTST", "VCLT")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
986
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
987 // ASIMD logical
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
988 def : InstRW<[A57Write_3cyc_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
989 (instregex "VAND", "VBIC", "VMVN", "VORR", "VORN", "VEOR")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
990
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
991 // ASIMD max/min
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
992 def : InstRW<[A57Write_3cyc_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
993 (instregex "(VMAX|VMIN)(s|u)", "(VPMAX|VPMIN)(s8|s16|s32|u8|u16|u32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
994
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
995 // ASIMD multiply, D-form: 5cyc F0 for r0px, 4cyc F0 for r1p0 and later
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
996 // Cortex-A57 r1p0 and later reduce the latency of ASIMD multiply
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
997 // and multiply-with-accumulate instructions relative to r0pX.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
998 def A57WriteVMULD_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
999 SchedVar<IsR1P0AndLaterPred, [A57Write_4cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1000 SchedVar<NoSchedPred, [A57Write_5cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1001 def : InstRW<[A57WriteVMULD_VecInt], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1002 "VMUL(v8i8|v4i16|v2i32|pd)", "VMULsl(v4i16|v2i32)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1003 "VQDMULH(sl)?(v4i16|v2i32)", "VQRDMULH(sl)?(v4i16|v2i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1004
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1005 // ASIMD multiply, Q-form: 6cyc F0 for r0px, 5cyc F0 for r1p0 and later
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1006 def A57WriteVMULQ_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1007 SchedVar<IsR1P0AndLaterPred, [A57Write_5cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1008 SchedVar<NoSchedPred, [A57Write_6cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1009 def : InstRW<[A57WriteVMULQ_VecInt], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1010 "VMUL(v16i8|v8i16|v4i32|pq)", "VMULsl(v8i16|v4i32)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1011 "VQDMULH(sl)?(v8i16|v4i32)", "VQRDMULH(sl)?(v8i16|v4i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1012
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1013 // ASIMD multiply accumulate, D-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1014 // 5cyc F0 for r0px, 4cyc F0 for r1p0 and later, 1cyc for accumulate sequence
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1015 // (4 or 3 ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1016 def A57WriteVMLAD_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1017 SchedVar<IsR1P0AndLaterPred, [A57Write_4cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1018 SchedVar<NoSchedPred, [A57Write_5cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1019 def A57ReadVMLAD_VecInt : SchedReadVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1020 SchedVar<IsR1P0AndLaterPred, [SchedReadAdvance<3, [A57WriteVMLAD_VecInt]>]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1021 SchedVar<NoSchedPred, [SchedReadAdvance<4, [A57WriteVMLAD_VecInt]>]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1022 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1023 def : InstRW<[A57WriteVMLAD_VecInt, A57ReadVMLAD_VecInt],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1024 (instregex "VMLA(sl)?(v8i8|v4i16|v2i32)", "VMLS(sl)?(v8i8|v4i16|v2i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1025
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1026 // ASIMD multiply accumulate, Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1027 // 6cyc F0 for r0px, 5cyc F0 for r1p0 and later, 2cyc for accumulate sequence
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1028 // (4 or 3 ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1029 def A57WriteVMLAQ_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1030 SchedVar<IsR1P0AndLaterPred, [A57Write_5cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1031 SchedVar<NoSchedPred, [A57Write_6cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1032 def A57ReadVMLAQ_VecInt : SchedReadVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1033 SchedVar<IsR1P0AndLaterPred, [SchedReadAdvance<3, [A57WriteVMLAQ_VecInt]>]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1034 SchedVar<NoSchedPred, [SchedReadAdvance<4, [A57WriteVMLAQ_VecInt]>]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1035 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1036 def : InstRW<[A57WriteVMLAQ_VecInt, A57ReadVMLAQ_VecInt],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1037 (instregex "VMLA(sl)?(v16i8|v8i16|v4i32)", "VMLS(sl)?(v16i8|v8i16|v4i32)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1038
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1039 // ASIMD multiply accumulate long
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1040 // 5cyc F0 for r0px, 4cyc F0 for r1p0 and later, 1cyc for accumulate sequence
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1041 // (4 or 3 ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1042 def A57WriteVMLAL_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1043 SchedVar<IsR1P0AndLaterPred, [A57Write_4cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1044 SchedVar<NoSchedPred, [A57Write_5cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1045 def A57ReadVMLAL_VecInt : SchedReadVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1046 SchedVar<IsR1P0AndLaterPred, [SchedReadAdvance<3, [A57WriteVMLAL_VecInt]>]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1047 SchedVar<NoSchedPred, [SchedReadAdvance<4, [A57WriteVMLAL_VecInt]>]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1048 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1049 def : InstRW<[A57WriteVMLAL_VecInt, A57ReadVMLAL_VecInt],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1050 (instregex "VMLAL(s|u)", "VMLSL(s|u)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1051
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1052 // ASIMD multiply accumulate saturating long
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1053 // 5cyc F0 for r0px, 4cyc F0 for r1p0 and later, 2cyc for accumulate sequence
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1054 // (3 or 2 ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1055 def A57WriteVQDMLAL_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1056 SchedVar<IsR1P0AndLaterPred, [A57Write_4cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1057 SchedVar<NoSchedPred, [A57Write_5cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1058 def A57ReadVQDMLAL_VecInt : SchedReadVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1059 SchedVar<IsR1P0AndLaterPred, [SchedReadAdvance<2, [A57WriteVQDMLAL_VecInt]>]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1060 SchedVar<NoSchedPred, [SchedReadAdvance<3, [A57WriteVQDMLAL_VecInt]>]>
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1061 ]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1062 def : InstRW<[A57WriteVQDMLAL_VecInt, A57ReadVQDMLAL_VecInt],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1063 (instregex "VQDMLAL", "VQDMLSL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1064
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1065 // ASIMD multiply long
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1066 // 5cyc F0 for r0px, 4cyc F0 for r1p0 and later
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1067 def A57WriteVMULL_VecInt : SchedWriteVariant<[
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1068 SchedVar<IsR1P0AndLaterPred, [A57Write_4cyc_1W]>,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1069 SchedVar<NoSchedPred, [A57Write_5cyc_1W]>]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1070 def : InstRW<[A57WriteVMULL_VecInt],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1071 (instregex "VMULL(s|u|p8|sls|slu)", "VQDMULL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1072
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1073 // ASIMD pairwise add and accumulate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1074 // 4cyc F1, 1cyc for accumulate sequence (3cyc ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1075 def A57WriteVPADAL : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1076 def A57ReadVPADAL : SchedReadAdvance<3, [A57WriteVPADAL]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1077 def : InstRW<[A57WriteVPADAL, A57ReadVPADAL], (instregex "VPADAL(s|u)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1078
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1079 // ASIMD shift accumulate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1080 // 4cyc F1, 1cyc for accumulate sequence (3cyc ReadAdvance)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1081 def A57WriteVSRA : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1082 def A57ReadVSRA : SchedReadAdvance<3, [A57WriteVSRA]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1083 def : InstRW<[A57WriteVSRA, A57ReadVSRA], (instregex "VSRA", "VRSRA")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1084
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1085 // ASIMD shift by immed, basic
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1086 def : InstRW<[A57Write_3cyc_1X],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1087 (instregex "VMOVL", "VSHLi", "VSHLL", "VSHR(s|u)", "VSHRN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1088
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1089 // ASIMD shift by immed, complex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1090 def : InstRW<[A57Write_4cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1091 "VQRSHRN", "VQRSHRUN", "VQSHL(si|ui|su)", "VQSHRN", "VQSHRUN", "VRSHR(s|u)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1092 "VRSHRN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1093
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1094 // ASIMD shift by immed and insert, basic, D-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1095 def : InstRW<[A57Write_4cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1096 "VSLI(v8i8|v4i16|v2i32|v1i64)", "VSRI(v8i8|v4i16|v2i32|v1i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1097
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1098 // ASIMD shift by immed and insert, basic, Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1099 def : InstRW<[A57Write_5cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1100 "VSLI(v16i8|v8i16|v4i32|v2i64)", "VSRI(v16i8|v8i16|v4i32|v2i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1101
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1102 // ASIMD shift by register, basic, D-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1103 def : InstRW<[A57Write_3cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1104 "VSHL(s|u)(v8i8|v4i16|v2i32|v1i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1105
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1106 // ASIMD shift by register, basic, Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1107 def : InstRW<[A57Write_4cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1108 "VSHL(s|u)(v16i8|v8i16|v4i32|v2i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1109
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1110 // ASIMD shift by register, complex, D-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1111 // VQRSHL, VQSHL, VRSHL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1112 def : InstRW<[A57Write_4cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1113 "VQRSHL(s|u)(v8i8|v4i16|v2i32|v1i64)", "VQSHL(s|u)(v8i8|v4i16|v2i32|v1i64)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1114 "VRSHL(s|u)(v8i8|v4i16|v2i32|v1i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1115
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1116 // ASIMD shift by register, complex, Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1117 def : InstRW<[A57Write_5cyc_1X], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1118 "VQRSHL(s|u)(v16i8|v8i16|v4i32|v2i64)", "VQSHL(s|u)(v16i8|v8i16|v4i32|v2i64)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1119 "VRSHL(s|u)(v16i8|v8i16|v4i32|v2i64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1120
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1121 // --- 3.15 ASIMD Floating-Point Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1122 // ASIMD FP absolute value
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1123 def : InstRW<[A57Write_3cyc_1V], (instregex "VABS(fd|fq|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1124
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1125 // ASIMD FP arith
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1126 def : InstRW<[A57Write_5cyc_1V], (instregex "VABD(fd|fq|hd|hq)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1127 "VADD(fd|fq|hd|hq)", "VPADD(f|h)", "VSUB(fd|fq|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1128
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1129 // ASIMD FP compare
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1130 def : InstRW<[A57Write_5cyc_1V], (instregex "VAC(GE|GT|LE|LT)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1131 "VC(EQ|GE|GT|LE)(fd|fq|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1132
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1133 // ASIMD FP convert, integer
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1134 def : InstRW<[A57Write_5cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1135 "VCVT(f2sd|f2ud|s2fd|u2fd|f2sq|f2uq|s2fq|u2fq|f2xsd|f2xud|xs2fd|xu2fd)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1136 "VCVT(f2xsq|f2xuq|xs2fq|xu2fq)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1137 "VCVT(AN|MN|NN|PN)(SDf|SQf|UDf|UQf|SDh|SQh|UDh|UQh)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1138
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1139 // ASIMD FP convert, half-precision: 8cyc F0/F1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1140 def : InstRW<[A57Write_8cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1141 "VCVT(h2sd|h2ud|s2hd|u2hd|h2sq|h2uq|s2hq|u2hq|h2xsd|h2xud|xs2hd|xu2hd)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1142 "VCVT(h2xsq|h2xuq|xs2hq|xu2hq)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1143 "VCVT(f2h|h2f)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1144
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1145 // ASIMD FP max/min
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1146 def : InstRW<[A57Write_5cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1147 "(VMAX|VMIN)(fd|fq|hd|hq)", "(VPMAX|VPMIN)(f|h)", "VMAXNM", "VMINNM")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1148
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1149 // ASIMD FP multiply
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1150 def A57WriteVMUL_VecFP : SchedWriteRes<[A57UnitV]> { let Latency = 5; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1151 def : InstRW<[A57WriteVMUL_VecFP], (instregex "VMUL(sl)?(fd|fq|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1152
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1153 // ASIMD FP multiply accumulate: 9cyc F0/F1, 4cyc for accumulate sequence
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1154 def A57WriteVMLA_VecFP : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1155 def A57ReadVMLA_VecFP :
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1156 SchedReadAdvance<5, [A57WriteVMLA_VecFP, A57WriteVMUL_VecFP]>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1157 def : InstRW<[A57WriteVMLA_VecFP, A57ReadVMLA_VecFP],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1158 (instregex "(VMLA|VMLS)(sl)?(fd|fq|hd|hq)", "(VFMA|VFMS)(fd|fq|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1159
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1160 // ASIMD FP negate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1161 def : InstRW<[A57Write_3cyc_1V], (instregex "VNEG(fd|f32q|hd|hq)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1162
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1163 // ASIMD FP round to integral
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1164 def : InstRW<[A57Write_5cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1165 "VRINT(AN|MN|NN|PN|XN|ZN)(Df|Qf|Dh|Qh)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1166
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1167 // --- 3.16 ASIMD Miscellaneous Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1168
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1169 // ASIMD bitwise insert
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1170 def : InstRW<[A57Write_3cyc_1V], (instregex "VBIF", "VBIT", "VBSL")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1171
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1172 // ASIMD count
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1173 def : InstRW<[A57Write_3cyc_1V], (instregex "VCLS", "VCLZ", "VCNT")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1174
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1175 // ASIMD duplicate, core reg: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1176 def : InstRW<[A57Write_8cyc_1L_1V], (instregex "VDUP(8|16|32)(d|q)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1177
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1178 // ASIMD duplicate, scalar: 3cyc "F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1179 def : InstRW<[A57Write_3cyc_1V], (instregex "VDUPLN(8|16|32)(d|q)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1180
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1181 // ASIMD extract
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1182 def : InstRW<[A57Write_3cyc_1V], (instregex "VEXT(d|q)(8|16|32|64)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1183
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1184 // ASIMD move, immed
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1185 def : InstRW<[A57Write_3cyc_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1186 "VMOV(v8i8|v16i8|v4i16|v8i16|v2i32|v4i32|v1i64|v2i64|v2f32|v4f32)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1187 "VMOVQ0")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1188
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1189 // ASIMD move, narrowing
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1190 def : InstRW<[A57Write_3cyc_1V], (instregex "VMOVN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1191
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1192 // ASIMD move, saturating
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1193 def : InstRW<[A57Write_4cyc_1X], (instregex "VQMOVN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1194
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1195 // ASIMD reciprocal estimate
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1196 def : InstRW<[A57Write_5cyc_1V], (instregex "VRECPE", "VRSQRTE")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1197
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1198 // ASIMD reciprocal step, FZ
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1199 def : InstRW<[A57Write_9cyc_1V], (instregex "VRECPS", "VRSQRTS")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1200
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1201 // ASIMD reverse, swap, table lookup (1-2 reg)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1202 def : InstRW<[A57Write_3cyc_1V], (instregex "VREV", "VSWP", "VTB(L|X)(1|2)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1203
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1204 // ASIMD table lookup (3-4 reg)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1205 def : InstRW<[A57Write_6cyc_1V], (instregex "VTBL(3|4)", "VTBX(3|4)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1206
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1207 // ASIMD transfer, scalar to core reg: 6cyc "L, I0/I1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1208 def : InstRW<[A57Write_6cyc_1L_1I], (instregex "VGETLN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1209
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1210 // ASIMD transfer, core reg to scalar: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1211 def : InstRW<[A57Write_8cyc_1L_1V], (instregex "VSETLN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1212
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1213 // ASIMD transpose
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1214 def : InstRW<[A57Write_3cyc_1V, A57Write_3cyc_1V], (instregex "VTRN")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1215
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1216 // ASIMD unzip/zip, D-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1217 def : InstRW<[A57Write_3cyc_1V, A57Write_3cyc_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1218 (instregex "VUZPd", "VZIPd")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1219
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1220 // ASIMD unzip/zip, Q-form
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1221 def : InstRW<[A57Write_6cyc_1V, A57Write_6cyc_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1222 (instregex "VUZPq", "VZIPq")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1223
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1224 // --- 3.17 ASIMD Load Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1225
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1226 // Overriden via InstRW for this processor.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1227 def : WriteRes<WriteVLD1, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1228 def : WriteRes<WriteVLD2, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1229 def : WriteRes<WriteVLD3, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1230 def : WriteRes<WriteVLD4, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1231 def : WriteRes<WriteVST1, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1232 def : WriteRes<WriteVST2, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1233 def : WriteRes<WriteVST3, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1234 def : WriteRes<WriteVST4, []>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1235
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1236 // 1-2 reg: 5cyc L, +I for writeback, 1 cyc wb latency
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1237 def : InstRW<[A57Write_5cyc_1L], (instregex "VLD1(d|q)(8|16|32|64)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1238 def : InstRW<[A57Write_5cyc_1L_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1239 (instregex "VLD1(d|q)(8|16|32|64)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1240
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1241 // 3-4 reg: 6cyc L, +I for writeback, 1 cyc wb latency
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1242 def : InstRW<[A57Write_6cyc_1L],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1243 (instregex "VLD1(d|q)(8|16|32|64)(T|Q)$", "VLD1d64(T|Q)Pseudo")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1244
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1245 def : InstRW<[A57Write_6cyc_1L_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1246 (instregex "VLD1(d|q)(8|16|32|64)(T|Q)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1247
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1248 // ASIMD load, 1 element, one lane and all lanes: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1249 def : InstRW<[A57Write_8cyc_1L_1V], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1250 "VLD1(LN|DUP)(d|q)(8|16|32)$", "VLD1(LN|DUP)(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1251 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne], (instregex
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1252 "VLD1(LN|DUP)(d|q)(8|16|32)(wb|_UPD)", "VLD1LNq(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1253
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1254 // ASIMD load, 2 element, multiple, 2 reg: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1255 def : InstRW<[A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1256 (instregex "VLD2(d|q)(8|16|32)$", "VLD2q(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1257 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1258 (instregex "VLD2(d|q)(8|16|32)wb", "VLD2q(8|16|32)PseudoWB")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1259
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1260 // ASIMD load, 2 element, multiple, 4 reg: 9cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1261 def : InstRW<[A57Write_9cyc_1L_1V], (instregex "VLD2b(8|16|32)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1262 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1263 (instregex "VLD2b(8|16|32)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1264
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1265 // ASIMD load, 2 element, one lane and all lanes: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1266 def : InstRW<[A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1267 (instregex "VLD2(DUP|LN)(d|q)(8|16|32|8x2|16x2|32x2)$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1268 "VLD2LN(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1269 // 2 results + wb result
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1270 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1271 (instregex "VLD2LN(d|q)(8|16|32)_UPD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1272 // 1 result + wb result
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1273 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1274 (instregex "VLD2DUPd(8|16|32|8x2|16x2|32x2)wb",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1275 "VLD2LN(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1276
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1277 // ASIMD load, 3 element, multiple, 3 reg: 9cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1278 // 3 results
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1279 def : InstRW<[A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1280 (instregex "VLD3(d|q)(8|16|32)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1281 // 1 result
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1282 def : InstRW<[A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1283 (instregex "VLD3(d|q)(8|16|32)(oddP|P)seudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1284 // 3 results + wb
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1285 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1286 A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1287 (instregex "VLD3(d|q)(8|16|32)_UPD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1288 // 1 result + wb
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1289 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1290 (instregex "VLD3(d|q)(8|16|32)(oddP|P)seudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1291
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1292 // ASIMD load, 3 element, one lane, size 32: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1293 def : InstRW<[A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1294 (instregex "VLD3LN(d|q)32$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1295 "VLD3LN(d|q)32Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1296 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1297 A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1298 (instregex "VLD3LN(d|q)32_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1299 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1300 (instregex "VLD3LN(d|q)32Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1301
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1302 // ASIMD load, 3 element, one lane, size 8/16: 9cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1303 def : InstRW<[A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1304 (instregex "VLD3LN(d|q)(8|16)$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1305 "VLD3LN(d|q)(8|16)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1306 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1307 A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1308 (instregex "VLD3LN(d|q)(8|16)_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1309 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1310 (instregex "VLD3LN(d|q)(8|16)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1311
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1312 // ASIMD load, 3 element, all lanes: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1313 def : InstRW<[A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1314 (instregex "VLD3DUP(d|q)(8|16|32)$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1315 "VLD3DUP(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1316 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1317 A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1318 (instregex "VLD3DUP(d|q)(8|16|32)_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1319 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1320 (instregex "VLD3DUP(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1321
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1322 // ASIMD load, 4 element, multiple, 4 reg: 9cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1323 def : InstRW<[A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1324 A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1325 (instregex "VLD4(d|q)(8|16|32)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1326 def : InstRW<[A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1327 (instregex "VLD4(d|q)(8|16|32)(oddP|P)seudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1328 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1329 A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1330 (instregex "VLD4(d|q)(8|16|32)_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1331 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1332 (instregex "VLD4(d|q)(8|16|32)(oddP|P)seudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1333
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1334 // ASIMD load, 4 element, one lane, size 32: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1335 def : InstRW<[A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1336 A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1337 (instregex "VLD4LN(d|q)32$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1338 "VLD4LN(d|q)32Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1339 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1340 A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1341 A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1342 (instregex "VLD4LN(d|q)32_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1343 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1344 (instregex "VLD4LN(d|q)32Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1345
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1346 // ASIMD load, 4 element, one lane, size 8/16: 9cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1347 def : InstRW<[A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V, A57Write_9cyc_1L_1V,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1348 A57Write_9cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1349 (instregex "VLD4LN(d|q)(8|16)$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1350 "VLD4LN(d|q)(8|16)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1351 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1352 A57Write_9cyc_1L_1V_1I, A57Write_9cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1353 A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1354 (instregex "VLD4LN(d|q)(8|16)_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1355 def : InstRW<[A57Write_9cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1356 (instregex "VLD4LN(d|q)(8|16)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1357
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1358 // ASIMD load, 4 element, all lanes: 8cyc "L, F0/F1"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1359 def : InstRW<[A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V, A57Write_8cyc_1L_1V,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1360 A57Write_8cyc_1L_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1361 (instregex "VLD4DUP(d|q)(8|16|32)$",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1362 "VLD4DUP(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1363 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1364 A57Write_8cyc_1L_1V_1I, A57Write_8cyc_1L_1V_1I,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1365 A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1366 (instregex "VLD4DUP(d|q)(8|16|32)_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1367 def : InstRW<[A57Write_8cyc_1L_1V_1I, A57WrBackOne],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1368 (instregex "VLD4DUP(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1369
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1370 // --- 3.18 ASIMD Store Instructions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1371
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1372 // ASIMD store, 1 element, multiple, 1 reg: 1cyc S
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1373 def : InstRW<[A57Write_1cyc_1S], (instregex "VST1d(8|16|32|64)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1374 def : InstRW<[A57WrBackOne, A57Write_1cyc_1S_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1375 (instregex "VST1d(8|16|32|64)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1376 // ASIMD store, 1 element, multiple, 2 reg: 2cyc S
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1377 def : InstRW<[A57Write_2cyc_1S], (instregex "VST1q(8|16|32|64)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1378 def : InstRW<[A57WrBackOne, A57Write_2cyc_1S_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1379 (instregex "VST1q(8|16|32|64)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1380 // ASIMD store, 1 element, multiple, 3 reg: 3cyc S
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1381 def : InstRW<[A57Write_3cyc_1S],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1382 (instregex "VST1d(8|16|32|64)T$", "VST1d64TPseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1383 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1384 (instregex "VST1d(8|16|32|64)Twb", "VST1d64TPseudoWB")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1385 // ASIMD store, 1 element, multiple, 4 reg: 4cyc S
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1386 def : InstRW<[A57Write_4cyc_1S],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1387 (instregex "VST1d(8|16|32|64)(Q|QPseudo)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1388 def : InstRW<[A57WrBackOne, A57Write_4cyc_1S_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1389 (instregex "VST1d(8|16|32|64)(Qwb|QPseudoWB)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1390 // ASIMD store, 1 element, one lane: 3cyc "F0/F1, S"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1391 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1392 (instregex "VST1LNd(8|16|32)$", "VST1LNq(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1393 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1394 (instregex "VST1LNd(8|16|32)_UPD", "VST1LNq(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1395 // ASIMD store, 2 element, multiple, 2 reg: 3cyc "F0/F1, S"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1396 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1397 (instregex "VST2(d|b)(8|16|32)$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1398 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1399 (instregex "VST2(b|d)(8|16|32)wb")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1400 // ASIMD store, 2 element, multiple, 4 reg: 4cyc "F0/F1, S"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1401 def : InstRW<[A57Write_4cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1402 (instregex "VST2q(8|16|32)$", "VST2q(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1403 def : InstRW<[A57WrBackOne, A57Write_4cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1404 (instregex "VST2q(8|16|32)wb", "VST2q(8|16|32)PseudoWB")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1405 // ASIMD store, 2 element, one lane: 3cyc "F0/F1, S"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1406 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1407 (instregex "VST2LN(d|q)(8|16|32)$", "VST2LN(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1408 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1409 (instregex "VST2LN(d|q)(8|16|32)_UPD",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1410 "VST2LN(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1411 // ASIMD store, 3 element, multiple, 3 reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1412 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1413 (instregex "VST3(d|q)(8|16|32)$", "VST3(d|q)(8|16|32)(oddP|P)seudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1414 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1415 (instregex "VST3(d|q)(8|16|32)_UPD",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1416 "VST3(d|q)(8|16|32)(oddP|P)seudo_UPD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1417 // ASIMD store, 3 element, one lane
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1418 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1419 (instregex "VST3LN(d|q)(8|16|32)$", "VST3LN(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1420 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1421 (instregex "VST3LN(d|q)(8|16|32)_UPD",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1422 "VST3LN(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1423 // ASIMD store, 4 element, multiple, 4 reg
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1424 def : InstRW<[A57Write_4cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1425 (instregex "VST4(d|q)(8|16|32)$", "VST4(d|q)(8|16|32)(oddP|P)seudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1426 def : InstRW<[A57WrBackOne, A57Write_4cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1427 (instregex "VST4(d|q)(8|16|32)_UPD",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1428 "VST4(d|q)(8|16|32)(oddP|P)seudo_UPD$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1429 // ASIMD store, 4 element, one lane
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1430 def : InstRW<[A57Write_3cyc_1S_1V],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1431 (instregex "VST4LN(d|q)(8|16|32)$", "VST4LN(d|q)(8|16|32)Pseudo$")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1432 def : InstRW<[A57WrBackOne, A57Write_3cyc_1S_1V_1I],
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1433 (instregex "VST4LN(d|q)(8|16|32)_UPD",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1434 "VST4LN(d|q)(8|16|32)Pseudo_UPD")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1435
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1436 // --- 3.19 Cryptography Extensions ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1437 // Crypto AES ops
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1438 // AESD, AESE, AESIMC, AESMC: 3cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1439 def : InstRW<[A57Write_3cyc_1W], (instregex "^AES")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1440 // Crypto polynomial (64x64) multiply long (VMULL.P64): 3cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1441 def : InstRW<[A57Write_3cyc_1W], (instregex "^VMULLp64")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1442 // Crypto SHA1 xor ops: 6cyc F0/F1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1443 def : InstRW<[A57Write_6cyc_2V], (instregex "^SHA1SU0")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1444 // Crypto SHA1 fast ops: 3cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1445 def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA1(H|SU1)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1446 // Crypto SHA1 slow ops: 6cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1447 def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA1[CMP]")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1448 // Crypto SHA256 fast ops: 3cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1449 def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA256SU0")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1450 // Crypto SHA256 slow ops: 6cyc F0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1451 def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA256(H|H2|SU1)")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1452
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1453 // --- 3.20 CRC ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1454 def : InstRW<[A57Write_3cyc_1W], (instregex "^(t2)?CRC32")>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1455
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1456 // -----------------------------------------------------------------------------
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1457 // Common definitions
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1458 def : WriteRes<WriteNoop, []> { let Latency = 0; let NumMicroOps = 0; }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1459 def : SchedAlias<WriteALU, A57Write_1cyc_1I>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1460
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1461 def : SchedAlias<WriteBr, A57Write_1cyc_1B>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1462 def : SchedAlias<WriteBrL, A57Write_1cyc_1B_1I>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1463 def : SchedAlias<WriteBrTbl, A57Write_1cyc_1B_1I>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1464 def : SchedAlias<WritePreLd, A57Write_4cyc_1L>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1465
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1466 def : SchedAlias<WriteLd, A57Write_4cyc_1L>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1467 def : SchedAlias<WriteST, A57Write_1cyc_1S>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1468 def : ReadAdvance<ReadALU, 0>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1469
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1470 } // SchedModel = CortexA57Model
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1471