AArch64SchedA57.td 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. //=- AArch64SchedA57.td - ARM Cortex-A57 Scheduling Defs -----*- tablegen -*-=//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines the machine model for ARM Cortex-A57 to support
  10. // instruction scheduling and other instruction cost heuristics.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //===----------------------------------------------------------------------===//
  14. // The Cortex-A57 is a traditional superscalar microprocessor with a
  15. // conservative 3-wide in-order stage for decode and dispatch. Combined with the
  16. // much wider out-of-order issue stage, this produced a need to carefully
  17. // schedule micro-ops so that all three decoded each cycle are successfully
  18. // issued as the reservation station(s) simply don't stay occupied for long.
  19. // Therefore, IssueWidth is set to the narrower of the two at three, while still
  20. // modeling the machine as out-of-order.
  21. def CortexA57Model : SchedMachineModel {
  22. let IssueWidth = 3; // 3-way decode and dispatch
  23. let MicroOpBufferSize = 128; // 128 micro-op re-order buffer
  24. let LoadLatency = 4; // Optimistic load latency
  25. let MispredictPenalty = 14; // Fetch + Decode/Rename/Dispatch + Branch
  26. // Enable partial & runtime unrolling. The magic number is chosen based on
  27. // experiments and benchmarking data.
  28. let LoopMicroOpBufferSize = 16;
  29. let CompleteModel = 1;
  30. list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F,
  31. PAUnsupported.F,
  32. SMEUnsupported.F,
  33. [HasMTE]);
  34. }
  35. //===----------------------------------------------------------------------===//
  36. // Define each kind of processor resource and number available on Cortex-A57.
  37. // Cortex A-57 has 8 pipelines that each has its own 8-entry queue where
  38. // micro-ops wait for their operands and then issue out-of-order.
  39. def A57UnitB : ProcResource<1>; // Type B micro-ops
  40. def A57UnitI : ProcResource<2>; // Type I micro-ops
  41. def A57UnitM : ProcResource<1>; // Type M micro-ops
  42. def A57UnitL : ProcResource<1>; // Type L micro-ops
  43. def A57UnitS : ProcResource<1>; // Type S micro-ops
  44. def A57UnitX : ProcResource<1>; // Type X micro-ops
  45. def A57UnitW : ProcResource<1>; // Type W micro-ops
  46. let SchedModel = CortexA57Model in {
  47. def A57UnitV : ProcResGroup<[A57UnitX, A57UnitW]>; // Type V micro-ops
  48. }
  49. let SchedModel = CortexA57Model in {
  50. //===----------------------------------------------------------------------===//
  51. // Define customized scheduler read/write types specific to the Cortex-A57.
  52. include "AArch64SchedA57WriteRes.td"
  53. //===----------------------------------------------------------------------===//
  54. // Map the target-defined scheduler read/write resources and latency for
  55. // Cortex-A57. The Cortex-A57 types are directly associated with resources, so
  56. // defining the aliases precludes the need for mapping them using WriteRes. The
  57. // aliases are sufficient for creating a coarse, working model. As the model
  58. // evolves, InstRWs will be used to override some of these SchedAliases.
  59. //
  60. // WARNING: Using SchedAliases is convenient and works well for latency and
  61. // resource lookup for instructions. However, this creates an entry in
  62. // AArch64WriteLatencyTable with a WriteResourceID of 0, breaking
  63. // any SchedReadAdvance since the lookup will fail.
  64. def : SchedAlias<WriteImm, A57Write_1cyc_1I>;
  65. def : SchedAlias<WriteI, A57Write_1cyc_1I>;
  66. def : SchedAlias<WriteISReg, A57Write_2cyc_1M>;
  67. def : SchedAlias<WriteIEReg, A57Write_2cyc_1M>;
  68. def : SchedAlias<WriteExtr, A57Write_1cyc_1I>;
  69. def : SchedAlias<WriteIS, A57Write_1cyc_1I>;
  70. def : SchedAlias<WriteID32, A57Write_19cyc_1M>;
  71. def : SchedAlias<WriteID64, A57Write_35cyc_1M>;
  72. def : WriteRes<WriteIM32, [A57UnitM]> { let Latency = 3; }
  73. def : WriteRes<WriteIM64, [A57UnitM]> { let Latency = 5; }
  74. def : SchedAlias<WriteBr, A57Write_1cyc_1B>;
  75. def : SchedAlias<WriteBrReg, A57Write_1cyc_1B>;
  76. def : SchedAlias<WriteLD, A57Write_4cyc_1L>;
  77. def : SchedAlias<WriteST, A57Write_1cyc_1S>;
  78. def : SchedAlias<WriteSTP, A57Write_1cyc_1S>;
  79. def : SchedAlias<WriteAdr, A57Write_1cyc_1I>;
  80. def : SchedAlias<WriteLDIdx, A57Write_4cyc_1I_1L>;
  81. def : SchedAlias<WriteSTIdx, A57Write_1cyc_1I_1S>;
  82. def : SchedAlias<WriteF, A57Write_3cyc_1V>;
  83. def : SchedAlias<WriteFCmp, A57Write_3cyc_1V>;
  84. def : SchedAlias<WriteFCvt, A57Write_5cyc_1V>;
  85. def : SchedAlias<WriteFCopy, A57Write_5cyc_1L>;
  86. def : SchedAlias<WriteFImm, A57Write_3cyc_1V>;
  87. def : WriteRes<WriteFMul, [A57UnitV]> { let Latency = 5;}
  88. def : SchedAlias<WriteFDiv, A57Write_17cyc_1W>;
  89. def : SchedAlias<WriteVd, A57Write_3cyc_1V>;
  90. def : SchedAlias<WriteVq, A57Write_3cyc_1V>;
  91. def : SchedAlias<WriteVLD, A57Write_5cyc_1L>;
  92. def : SchedAlias<WriteVST, A57Write_1cyc_1S>;
  93. def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
  94. def : WriteRes<WriteSys, []> { let Latency = 1; }
  95. def : WriteRes<WriteBarrier, []> { let Latency = 1; }
  96. def : WriteRes<WriteHint, []> { let Latency = 1; }
  97. def : WriteRes<WriteLDHi, []> { let Latency = 4; }
  98. // Forwarding logic is only modeled for multiply and accumulate
  99. def : ReadAdvance<ReadI, 0>;
  100. def : ReadAdvance<ReadISReg, 0>;
  101. def : ReadAdvance<ReadIEReg, 0>;
  102. def : ReadAdvance<ReadIM, 0>;
  103. def : ReadAdvance<ReadIMA, 2, [WriteIM32, WriteIM64]>;
  104. def : ReadAdvance<ReadID, 0>;
  105. def : ReadAdvance<ReadExtrHi, 0>;
  106. def : ReadAdvance<ReadST, 0>;
  107. def : ReadAdvance<ReadAdrBase, 0>;
  108. def : ReadAdvance<ReadVLD, 0>;
  109. //===----------------------------------------------------------------------===//
  110. // Specialize the coarse model by associating instruction groups with the
  111. // subtarget-defined types. As the modeled is refined, this will override most
  112. // of the above ShchedAlias mappings.
  113. // Miscellaneous
  114. // -----------------------------------------------------------------------------
  115. def : InstRW<[WriteI], (instrs COPY)>;
  116. // Branch Instructions
  117. // -----------------------------------------------------------------------------
  118. def : InstRW<[A57Write_1cyc_1B_1I], (instrs BL)>;
  119. def : InstRW<[A57Write_2cyc_1B_1I], (instrs BLR)>;
  120. // Shifted Register with Shift == 0
  121. // ----------------------------------------------------------------------------
  122. def A57WriteISReg : SchedWriteVariant<[
  123. SchedVar<RegShiftedPred, [WriteISReg]>,
  124. SchedVar<NoSchedPred, [WriteI]>]>;
  125. def : InstRW<[A57WriteISReg], (instregex ".*rs$")>;
  126. // Divide and Multiply Instructions
  127. // -----------------------------------------------------------------------------
  128. // Multiply high
  129. def : InstRW<[A57Write_6cyc_1M], (instrs SMULHrr, UMULHrr)>;
  130. // Miscellaneous Data-Processing Instructions
  131. // -----------------------------------------------------------------------------
  132. def : InstRW<[A57Write_1cyc_1I], (instrs EXTRWrri)>;
  133. def : InstRW<[A57Write_3cyc_1I_1M], (instrs EXTRXrri)>;
  134. def : InstRW<[A57Write_2cyc_1M], (instregex "BFM")>;
  135. // Cryptography Extensions
  136. // -----------------------------------------------------------------------------
  137. def A57ReadAES : SchedReadAdvance<3, [A57Write_3cyc_1W]>;
  138. def : InstRW<[A57Write_3cyc_1W], (instregex "^AES[DE]")>;
  139. def : InstRW<[A57Write_3cyc_1W, A57ReadAES], (instregex "^AESI?MC")>;
  140. def : InstRW<[A57Write_6cyc_2V], (instregex "^SHA1SU0")>;
  141. def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA1(H|SU1)")>;
  142. def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA1[CMP]")>;
  143. def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA256SU0")>;
  144. def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA256(H|H2|SU1)")>;
  145. def : InstRW<[A57Write_3cyc_1W], (instregex "^CRC32")>;
  146. // Vector Load
  147. // -----------------------------------------------------------------------------
  148. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1i(8|16|32)$")>;
  149. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1i(8|16|32)_POST$")>;
  150. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1i(64)$")>;
  151. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1i(64)_POST$")>;
  152. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1Rv(8b|4h|2s)$")>;
  153. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1Rv(8b|4h|2s)_POST$")>;
  154. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Rv(1d)$")>;
  155. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Rv(1d)_POST$")>;
  156. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1Rv(16b|8h|4s|2d)$")>;
  157. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1Rv(16b|8h|4s|2d)_POST$")>;
  158. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Onev(8b|4h|2s|1d)$")>;
  159. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Onev(8b|4h|2s|1d)_POST$")>;
  160. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Onev(16b|8h|4s|2d)$")>;
  161. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Onev(16b|8h|4s|2d)_POST$")>;
  162. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Twov(8b|4h|2s|1d)$")>;
  163. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Twov(8b|4h|2s|1d)_POST$")>;
  164. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Twov(16b|8h|4s|2d)$")>;
  165. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Twov(16b|8h|4s|2d)_POST$")>;
  166. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Threev(8b|4h|2s|1d)$")>;
  167. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Threev(8b|4h|2s|1d)_POST$")>;
  168. def : InstRW<[A57Write_7cyc_3L], (instregex "LD1Threev(16b|8h|4s|2d)$")>;
  169. def : InstRW<[A57Write_7cyc_3L, WriteAdr], (instregex "LD1Threev(16b|8h|4s|2d)_POST$")>;
  170. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Fourv(8b|4h|2s|1d)$")>;
  171. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Fourv(8b|4h|2s|1d)_POST$")>;
  172. def : InstRW<[A57Write_8cyc_4L], (instregex "LD1Fourv(16b|8h|4s|2d)$")>;
  173. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD1Fourv(16b|8h|4s|2d)_POST$")>;
  174. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD2i(8|16)$")>;
  175. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD2i(8|16)_POST$")>;
  176. def : InstRW<[A57Write_6cyc_2L], (instregex "LD2i(32)$")>;
  177. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD2i(32)_POST$")>;
  178. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2i(64)$")>;
  179. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2i(64)_POST$")>;
  180. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2Rv(8b|4h|2s)$")>;
  181. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2Rv(8b|4h|2s)_POST$")>;
  182. def : InstRW<[A57Write_5cyc_1L], (instregex "LD2Rv(1d)$")>;
  183. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD2Rv(1d)_POST$")>;
  184. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD2Rv(16b|8h|4s|2d)$")>;
  185. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD2Rv(16b|8h|4s|2d)_POST$")>;
  186. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2Twov(8b|4h|2s)$")>;
  187. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2Twov(8b|4h|2s)_POST$")>;
  188. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD2Twov(16b|8h|4s)$")>;
  189. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD2Twov(16b|8h|4s)_POST$")>;
  190. def : InstRW<[A57Write_6cyc_2L], (instregex "LD2Twov(2d)$")>;
  191. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD2Twov(2d)_POST$")>;
  192. def : InstRW<[A57Write_9cyc_1L_3V], (instregex "LD3i(8|16)$")>;
  193. def : InstRW<[A57Write_9cyc_1L_3V, WriteAdr], (instregex "LD3i(8|16)_POST$")>;
  194. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD3i(32)$")>;
  195. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD3i(32)_POST$")>;
  196. def : InstRW<[A57Write_6cyc_2L], (instregex "LD3i(64)$")>;
  197. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD3i(64)_POST$")>;
  198. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD3Rv(8b|4h|2s)$")>;
  199. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD3Rv(8b|4h|2s)_POST$")>;
  200. def : InstRW<[A57Write_6cyc_2L], (instregex "LD3Rv(1d)$")>;
  201. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD3Rv(1d)_POST$")>;
  202. def : InstRW<[A57Write_9cyc_1L_3V], (instregex "LD3Rv(16b|8h|4s)$")>;
  203. def : InstRW<[A57Write_9cyc_1L_3V, WriteAdr], (instregex "LD3Rv(16b|8h|4s)_POST$")>;
  204. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD3Rv(2d)$")>;
  205. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD3Rv(2d)_POST$")>;
  206. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD3Threev(8b|4h|2s)$")>;
  207. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD3Threev(8b|4h|2s)_POST$")>;
  208. def : InstRW<[A57Write_10cyc_3L_4V], (instregex "LD3Threev(16b|8h|4s)$")>;
  209. def : InstRW<[A57Write_10cyc_3L_4V, WriteAdr], (instregex "LD3Threev(16b|8h|4s)_POST$")>;
  210. def : InstRW<[A57Write_8cyc_4L], (instregex "LD3Threev(2d)$")>;
  211. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD3Threev(2d)_POST$")>;
  212. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4i(8|16)$")>;
  213. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4i(8|16)_POST$")>;
  214. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD4i(32)$")>;
  215. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD4i(32)_POST$")>;
  216. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4i(64)$")>;
  217. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4i(64)_POST$")>;
  218. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD4Rv(8b|4h|2s)$")>;
  219. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD4Rv(8b|4h|2s)_POST$")>;
  220. def : InstRW<[A57Write_6cyc_2L], (instregex "LD4Rv(1d)$")>;
  221. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD4Rv(1d)_POST$")>;
  222. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4Rv(16b|8h|4s)$")>;
  223. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4Rv(16b|8h|4s)_POST$")>;
  224. def : InstRW<[A57Write_9cyc_2L_4V], (instregex "LD4Rv(2d)$")>;
  225. def : InstRW<[A57Write_9cyc_2L_4V, WriteAdr], (instregex "LD4Rv(2d)_POST$")>;
  226. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD4Fourv(8b|4h|2s)$")>;
  227. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD4Fourv(8b|4h|2s)_POST$")>;
  228. def : InstRW<[A57Write_11cyc_4L_4V], (instregex "LD4Fourv(16b|8h|4s)$")>;
  229. def : InstRW<[A57Write_11cyc_4L_4V, WriteAdr], (instregex "LD4Fourv(16b|8h|4s)_POST$")>;
  230. def : InstRW<[A57Write_8cyc_4L], (instregex "LD4Fourv(2d)$")>;
  231. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD4Fourv(2d)_POST$")>;
  232. // Vector Store
  233. // -----------------------------------------------------------------------------
  234. def : InstRW<[A57Write_1cyc_1S], (instregex "ST1i(8|16|32)$")>;
  235. def : InstRW<[A57Write_1cyc_1S, WriteAdr], (instregex "ST1i(8|16|32)_POST$")>;
  236. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST1i(64)$")>;
  237. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST1i(64)_POST$")>;
  238. def : InstRW<[A57Write_1cyc_1S], (instregex "ST1Onev(8b|4h|2s|1d)$")>;
  239. def : InstRW<[A57Write_1cyc_1S, WriteAdr], (instregex "ST1Onev(8b|4h|2s|1d)_POST$")>;
  240. def : InstRW<[A57Write_2cyc_2S], (instregex "ST1Onev(16b|8h|4s|2d)$")>;
  241. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST1Onev(16b|8h|4s|2d)_POST$")>;
  242. def : InstRW<[A57Write_2cyc_2S], (instregex "ST1Twov(8b|4h|2s|1d)$")>;
  243. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST1Twov(8b|4h|2s|1d)_POST$")>;
  244. def : InstRW<[A57Write_4cyc_4S], (instregex "ST1Twov(16b|8h|4s|2d)$")>;
  245. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST1Twov(16b|8h|4s|2d)_POST$")>;
  246. def : InstRW<[A57Write_3cyc_3S], (instregex "ST1Threev(8b|4h|2s|1d)$")>;
  247. def : InstRW<[A57Write_3cyc_3S, WriteAdr], (instregex "ST1Threev(8b|4h|2s|1d)_POST$")>;
  248. def : InstRW<[A57Write_6cyc_6S], (instregex "ST1Threev(16b|8h|4s|2d)$")>;
  249. def : InstRW<[A57Write_6cyc_6S, WriteAdr], (instregex "ST1Threev(16b|8h|4s|2d)_POST$")>;
  250. def : InstRW<[A57Write_4cyc_4S], (instregex "ST1Fourv(8b|4h|2s|1d)$")>;
  251. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST1Fourv(8b|4h|2s|1d)_POST$")>;
  252. def : InstRW<[A57Write_8cyc_8S], (instregex "ST1Fourv(16b|8h|4s|2d)$")>;
  253. def : InstRW<[A57Write_8cyc_8S, WriteAdr], (instregex "ST1Fourv(16b|8h|4s|2d)_POST$")>;
  254. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST2i(8|16|32)$")>;
  255. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST2i(8|16|32)_POST$")>;
  256. def : InstRW<[A57Write_2cyc_2S], (instregex "ST2i(64)$")>;
  257. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST2i(64)_POST$")>;
  258. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST2Twov(8b|4h|2s)$")>;
  259. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST2Twov(8b|4h|2s)_POST$")>;
  260. def : InstRW<[A57Write_4cyc_4S_2V], (instregex "ST2Twov(16b|8h|4s)$")>;
  261. def : InstRW<[A57Write_4cyc_4S_2V, WriteAdr], (instregex "ST2Twov(16b|8h|4s)_POST$")>;
  262. def : InstRW<[A57Write_4cyc_4S], (instregex "ST2Twov(2d)$")>;
  263. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST2Twov(2d)_POST$")>;
  264. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST3i(8|16)$")>;
  265. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST3i(8|16)_POST$")>;
  266. def : InstRW<[A57Write_3cyc_3S], (instregex "ST3i(32)$")>;
  267. def : InstRW<[A57Write_3cyc_3S, WriteAdr], (instregex "ST3i(32)_POST$")>;
  268. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST3i(64)$")>;
  269. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST3i(64)_POST$")>;
  270. def : InstRW<[A57Write_3cyc_3S_2V], (instregex "ST3Threev(8b|4h|2s)$")>;
  271. def : InstRW<[A57Write_3cyc_3S_2V, WriteAdr], (instregex "ST3Threev(8b|4h|2s)_POST$")>;
  272. def : InstRW<[A57Write_6cyc_6S_4V], (instregex "ST3Threev(16b|8h|4s)$")>;
  273. def : InstRW<[A57Write_6cyc_6S_4V, WriteAdr], (instregex "ST3Threev(16b|8h|4s)_POST$")>;
  274. def : InstRW<[A57Write_6cyc_6S], (instregex "ST3Threev(2d)$")>;
  275. def : InstRW<[A57Write_6cyc_6S, WriteAdr], (instregex "ST3Threev(2d)_POST$")>;
  276. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST4i(8|16)$")>;
  277. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST4i(8|16)_POST$")>;
  278. def : InstRW<[A57Write_4cyc_4S], (instregex "ST4i(32)$")>;
  279. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST4i(32)_POST$")>;
  280. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST4i(64)$")>;
  281. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST4i(64)_POST$")>;
  282. def : InstRW<[A57Write_4cyc_4S_2V], (instregex "ST4Fourv(8b|4h|2s)$")>;
  283. def : InstRW<[A57Write_4cyc_4S_2V, WriteAdr], (instregex "ST4Fourv(8b|4h|2s)_POST$")>;
  284. def : InstRW<[A57Write_8cyc_8S_4V], (instregex "ST4Fourv(16b|8h|4s)$")>;
  285. def : InstRW<[A57Write_8cyc_8S_4V, WriteAdr], (instregex "ST4Fourv(16b|8h|4s)_POST$")>;
  286. def : InstRW<[A57Write_8cyc_8S], (instregex "ST4Fourv(2d)$")>;
  287. def : InstRW<[A57Write_8cyc_8S, WriteAdr], (instregex "ST4Fourv(2d)_POST$")>;
  288. // Vector - Integer
  289. // -----------------------------------------------------------------------------
  290. // Reference for forms in this group
  291. // D form - v8i8, v4i16, v2i32
  292. // Q form - v16i8, v8i16, v4i32
  293. // D form - v1i8, v1i16, v1i32, v1i64
  294. // Q form - v16i8, v8i16, v4i32, v2i64
  295. // D form - v8i8_v8i16, v4i16_v4i32, v2i32_v2i64
  296. // Q form - v16i8_v8i16, v8i16_v4i32, v4i32_v2i64
  297. // Cortex A57 Software Optimization Guide Sec 3.14
  298. // Advance for absolute diff accum, pairwise add and accumulate, shift accumulate
  299. def A57ReadIVA3 : SchedReadAdvance<3, [A57Write_4cyc_1X_NonMul_Forward, A57Write_5cyc_2X_NonMul_Forward]>;
  300. // ASIMD absolute diff accum, D-form
  301. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABA(v8i8|v4i16|v2i32)$")>;
  302. // ASIMD absolute diff accum, Q-form
  303. def : InstRW<[A57Write_5cyc_2X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABA(v16i8|v8i16|v4i32)$")>;
  304. // ASIMD absolute diff accum long
  305. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABAL")>;
  306. // ASIMD arith, reduce, 4H/4S
  307. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>;
  308. // ASIMD arith, reduce, 8B/8H
  309. def : InstRW<[A57Write_7cyc_1V_1X], (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>;
  310. // ASIMD arith, reduce, 16B
  311. def : InstRW<[A57Write_8cyc_2X], (instregex "^[SU]?ADDL?Vv16i8v$")>;
  312. // ASIMD max/min, reduce, 4H/4S
  313. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>;
  314. // ASIMD max/min, reduce, 8B/8H
  315. def : InstRW<[A57Write_7cyc_1V_1X], (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>;
  316. // ASIMD max/min, reduce, 16B
  317. def : InstRW<[A57Write_8cyc_2X], (instregex "^[SU](MIN|MAX)Vv16i8v$")>;
  318. // ASIMD multiply, D-form
  319. // MUL
  320. def : InstRW<[A57Write_5cyc_1W_Mul_Forward], (instregex "^MUL(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)(_indexed)?$")>;
  321. // PMUL, SQDMULH, SQRDMULH
  322. def : InstRW<[A57Write_5cyc_1W], (instregex "^(PMUL|SQR?DMULH)(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)(_indexed)?$")>;
  323. // ASIMD multiply, Q-form
  324. // MUL
  325. def : InstRW<[A57Write_6cyc_2W_Mul_Forward], (instregex "^MUL(v16i8|v8i16|v4i32)(_indexed)?$")>;
  326. // PMUL, SQDMULH, SQRDMULH
  327. def : InstRW<[A57Write_6cyc_2W], (instregex "^(PMUL|SQR?DMULH)(v16i8|v8i16|v4i32)(_indexed)?$")>;
  328. // Cortex A57 Software Optimization Guide Sec 3.14
  329. def A57ReadIVMA4 : SchedReadAdvance<4 , [A57Write_5cyc_1W_Mul_Forward, A57Write_6cyc_2W_Mul_Forward]>;
  330. def A57ReadIVMA3 : SchedReadAdvance<3 , [A57Write_5cyc_1W_Mul_Forward, A57Write_6cyc_2W_Mul_Forward]>;
  331. // ASIMD multiply accumulate, D-form
  332. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA4], (instregex "^ML[AS](v8i8|v4i16|v2i32)(_indexed)?$")>;
  333. // ASIMD multiply accumulate, Q-form
  334. def : InstRW<[A57Write_6cyc_2W_Mul_Forward, A57ReadIVMA4], (instregex "^ML[AS](v16i8|v8i16|v4i32)(_indexed)?$")>;
  335. // ASIMD multiply accumulate long
  336. // ASIMD multiply accumulate saturating long
  337. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA4], (instregex "^(S|U)ML[AS]L")>;
  338. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA3], (instregex "^SQDML[AS]L")>;
  339. // ASIMD multiply long
  340. def : InstRW<[A57Write_5cyc_1W_Mul_Forward], (instregex "^(S|U)MULL")>;
  341. def : InstRW<[A57Write_5cyc_1W], (instregex "^SQDMULL")>;
  342. def : InstRW<[A57Write_5cyc_1W], (instregex "^PMULL(v8i8|v16i8)")>;
  343. def : InstRW<[A57Write_3cyc_1W], (instregex "^PMULL(v1i64|v2i64)")>;
  344. // ASIMD pairwise add and accumulate
  345. // ASIMD shift accumulate
  346. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ADALP")>;
  347. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^(S|SR|U|UR)SRA")>;
  348. // ASIMD shift by immed, complex
  349. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]?(Q|R){1,2}SHR")>;
  350. def : InstRW<[A57Write_4cyc_1X], (instregex "^SQSHLU")>;
  351. // ASIMD shift by register, basic, Q-form
  352. def : InstRW<[A57Write_4cyc_2X], (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>;
  353. // ASIMD shift by register, complex, D-form
  354. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU][QR]{1,2}SHL(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>;
  355. // ASIMD shift by register, complex, Q-form
  356. def : InstRW<[A57Write_5cyc_2X], (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>;
  357. // Vector - Floating Point
  358. // -----------------------------------------------------------------------------
  359. // Reference for forms in this group
  360. // D form - v2f32
  361. // Q form - v4f32, v2f64
  362. // D form - 32, 64
  363. // D form - v1i32, v1i64
  364. // D form - v2i32
  365. // Q form - v4i32, v2i64
  366. // ASIMD FP arith, normal, D-form
  367. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FABD|FADD|FSUB)(v2f32|32|64|v2i32p)")>;
  368. // ASIMD FP arith, normal, Q-form
  369. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FABD|FADD|FSUB)(v4f32|v2f64|v2i64p)")>;
  370. // ASIMD FP arith, pairwise, D-form
  371. def : InstRW<[A57Write_5cyc_1V], (instregex "^FADDP(v2f32|32|64|v2i32)")>;
  372. // ASIMD FP arith, pairwise, Q-form
  373. def : InstRW<[A57Write_9cyc_3V], (instregex "^FADDP(v4f32|v2f64|v2i64)")>;
  374. // ASIMD FP compare, D-form
  375. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FACGE|FACGT|FCMEQ|FCMGE|FCMGT|FCMLE|FCMLT)(v2f32|32|64|v1i32|v2i32|v1i64)")>;
  376. // ASIMD FP compare, Q-form
  377. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FACGE|FACGT|FCMEQ|FCMGE|FCMGT|FCMLE|FCMLT)(v4f32|v2f64|v4i32|v2i64)")>;
  378. // ASIMD FP convert, long and narrow
  379. def : InstRW<[A57Write_8cyc_3V], (instregex "^FCVT(L|N|XN)v")>;
  380. // ASIMD FP convert, other, D-form
  381. def : InstRW<[A57Write_5cyc_1V], (instregex "^[FSU]CVT([AMNPZ][SU])?(_Int)?(v2f32|v1i32|v2i32|v1i64)")>;
  382. // ASIMD FP convert, other, Q-form
  383. def : InstRW<[A57Write_5cyc_2V], (instregex "^[FSU]CVT([AMNPZ][SU])?(_Int)?(v4f32|v2f64|v4i32|v2i64)")>;
  384. // ASIMD FP divide, D-form, F32
  385. def : InstRW<[A57Write_17cyc_1W], (instregex "FDIVv2f32")>;
  386. // ASIMD FP divide, Q-form, F32
  387. def : InstRW<[A57Write_34cyc_2W], (instregex "FDIVv4f32")>;
  388. // ASIMD FP divide, Q-form, F64
  389. def : InstRW<[A57Write_64cyc_2W], (instregex "FDIVv2f64")>;
  390. // Note: These were simply duplicated from ASIMD FDIV because of missing documentation
  391. // ASIMD FP square root, D-form, F32
  392. def : InstRW<[A57Write_17cyc_1W], (instregex "FSQRTv2f32")>;
  393. // ASIMD FP square root, Q-form, F32
  394. def : InstRW<[A57Write_34cyc_2W], (instregex "FSQRTv4f32")>;
  395. // ASIMD FP square root, Q-form, F64
  396. def : InstRW<[A57Write_64cyc_2W], (instregex "FSQRTv2f64")>;
  397. // ASIMD FP max/min, normal, D-form
  398. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FMAX|FMIN)(NM)?(v2f32)")>;
  399. // ASIMD FP max/min, normal, Q-form
  400. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FMAX|FMIN)(NM)?(v4f32|v2f64)")>;
  401. // ASIMD FP max/min, pairwise, D-form
  402. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FMAX|FMIN)(NM)?P(v2f32|v2i32)")>;
  403. // ASIMD FP max/min, pairwise, Q-form
  404. def : InstRW<[A57Write_9cyc_3V], (instregex "^(FMAX|FMIN)(NM)?P(v4f32|v2f64|v2i64)")>;
  405. // ASIMD FP max/min, reduce
  406. def : InstRW<[A57Write_10cyc_3V], (instregex "^(FMAX|FMIN)(NM)?Vv")>;
  407. // ASIMD FP multiply, D-form, FZ
  408. def : InstRW<[A57Write_5cyc_1V_FP_Forward], (instregex "^FMULX?(v2f32|v1i32|v2i32|v1i64|32|64)")>;
  409. // ASIMD FP multiply, Q-form, FZ
  410. def : InstRW<[A57Write_5cyc_2V_FP_Forward], (instregex "^FMULX?(v4f32|v2f64|v4i32|v2i64)")>;
  411. // ASIMD FP multiply accumulate, D-form, FZ
  412. // ASIMD FP multiply accumulate, Q-form, FZ
  413. def A57WriteFPVMAD : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
  414. def A57WriteFPVMAQ : SchedWriteRes<[A57UnitV, A57UnitV]> { let Latency = 10; }
  415. // Cortex A57 Software Optimization Guide Sec 3.15
  416. // Advances from FP mul and mul-accum to mul-accum
  417. def A57ReadFPVMA5 : SchedReadAdvance<5, [A57WriteFPVMAD, A57WriteFPVMAQ, A57Write_5cyc_1V_FP_Forward, A57Write_5cyc_2V_FP_Forward]>;
  418. def A57ReadFPVMA6 : SchedReadAdvance<6, [A57WriteFPVMAD, A57WriteFPVMAQ, A57Write_5cyc_1V_FP_Forward, A57Write_5cyc_2V_FP_Forward]>;
  419. def : InstRW<[A57WriteFPVMAD, A57ReadFPVMA5], (instregex "^FML[AS](v2f32|v1i32|v2i32|v1i64)")>;
  420. def : InstRW<[A57WriteFPVMAQ, A57ReadFPVMA6], (instregex "^FML[AS](v4f32|v2f64|v4i32|v2i64)")>;
  421. // ASIMD FP round, D-form
  422. def : InstRW<[A57Write_5cyc_1V], (instregex "^FRINT[AIMNPXZ](v2f32)")>;
  423. // ASIMD FP round, Q-form
  424. def : InstRW<[A57Write_5cyc_2V], (instregex "^FRINT[AIMNPXZ](v4f32|v2f64)")>;
  425. // Vector - Miscellaneous
  426. // -----------------------------------------------------------------------------
  427. // Reference for forms in this group
  428. // D form - v8i8, v4i16, v2i32
  429. // Q form - v16i8, v8i16, v4i32
  430. // D form - v1i8, v1i16, v1i32, v1i64
  431. // Q form - v16i8, v8i16, v4i32, v2i64
  432. // ASIMD bitwise insert, Q-form
  433. def : InstRW<[A57Write_3cyc_2V], (instregex "^(BIF|BIT|BSL|BSP)v16i8")>;
  434. // ASIMD duplicate, gen reg, D-form and Q-form
  435. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^DUP(i8|i16|i32|i64)$")>;
  436. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^DUPv.+gpr")>;
  437. // ASIMD move, saturating
  438. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]QXTU?N")>;
  439. // ASIMD reciprocal estimate, D-form
  440. def : InstRW<[A57Write_5cyc_1V], (instregex "^[FU](RECP|RSQRT)(E|X)(v2f32|v1i32|v2i32|v1i64)")>;
  441. // ASIMD reciprocal estimate, Q-form
  442. def : InstRW<[A57Write_5cyc_2V], (instregex "^[FU](RECP|RSQRT)(E|X)(v2f64|v4f32|v4i32)")>;
  443. // ASIMD reciprocal step, D-form, FZ
  444. def : InstRW<[A57Write_9cyc_1V], (instregex "^F(RECP|RSQRT)S(v2f32|v1i32|v2i32|v1i64|32|64)")>;
  445. // ASIMD reciprocal step, Q-form, FZ
  446. def : InstRW<[A57Write_9cyc_2V], (instregex "^F(RECP|RSQRT)S(v2f64|v4f32|v4i32)")>;
  447. // ASIMD table lookup, D-form
  448. def : InstRW<[A57Write_3cyc_1V], (instregex "^TB[LX]v8i8One")>;
  449. def : InstRW<[A57Write_6cyc_2V], (instregex "^TB[LX]v8i8Two")>;
  450. def : InstRW<[A57Write_9cyc_3V], (instregex "^TB[LX]v8i8Three")>;
  451. def : InstRW<[A57Write_12cyc_4V], (instregex "^TB[LX]v8i8Four")>;
  452. // ASIMD table lookup, Q-form
  453. def : InstRW<[A57Write_6cyc_3V], (instregex "^TB[LX]v16i8One")>;
  454. def : InstRW<[A57Write_9cyc_5V], (instregex "^TB[LX]v16i8Two")>;
  455. def : InstRW<[A57Write_12cyc_7V], (instregex "^TB[LX]v16i8Three")>;
  456. def : InstRW<[A57Write_15cyc_9V], (instregex "^TB[LX]v16i8Four")>;
  457. // ASIMD transfer, element to gen reg
  458. def : InstRW<[A57Write_6cyc_1I_1L], (instregex "^[SU]MOVv")>;
  459. // ASIMD transfer, gen reg to element
  460. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^INSv")>;
  461. // ASIMD unzip/zip, Q-form
  462. def : InstRW<[A57Write_6cyc_3V], (instregex "^(UZP|ZIP)(1|2)(v16i8|v8i16|v4i32|v2i64)")>;
  463. // Remainder
  464. // -----------------------------------------------------------------------------
  465. def : InstRW<[A57Write_5cyc_1V], (instregex "^F(ADD|SUB)[DS]rr")>;
  466. // Cortex A57 Software Optimization Guide Sec 3.10
  467. def A57WriteFPMA : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
  468. def A57ReadFPMA5 : SchedReadAdvance<5, [A57WriteFPMA, WriteFMul]>;
  469. def A57ReadFPM : SchedReadAdvance<0>;
  470. def : InstRW<[A57WriteFPMA, A57ReadFPM, A57ReadFPM, A57ReadFPMA5], (instregex "^FN?M(ADD|SUB)[DS]rrr")>;
  471. def : InstRW<[A57Write_10cyc_1L_1V], (instregex "^[FSU]CVT[AMNPZ][SU](_Int)?[SU]?[XW]?[DS]?[rds]i?")>;
  472. def : InstRW<[A57Write_10cyc_1L_1V], (instregex "^[SU]CVTF")>;
  473. def : InstRW<[A57Write_32cyc_1W], (instrs FDIVDrr)>;
  474. def : InstRW<[A57Write_17cyc_1W], (instrs FDIVSrr)>;
  475. def : InstRW<[A57Write_5cyc_1V], (instregex "^F(MAX|MIN).+rr")>;
  476. def : InstRW<[A57Write_5cyc_1V], (instregex "^FRINT.+r")>;
  477. def : InstRW<[A57Write_32cyc_1W], (instrs FSQRTDr)>;
  478. def : InstRW<[A57Write_17cyc_1W], (instrs FSQRTSr)>;
  479. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDNPDi)>;
  480. def : InstRW<[A57Write_6cyc_2L, WriteLDHi], (instrs LDNPQi)>;
  481. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDNPSi)>;
  482. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDPDi)>;
  483. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPDpost)>;
  484. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPDpre)>;
  485. def : InstRW<[A57Write_6cyc_2L, WriteLDHi], (instrs LDPQi)>;
  486. def : InstRW<[A57Write_6cyc_2L, WriteLDHi, WriteAdr], (instrs LDPQpost)>;
  487. def : InstRW<[A57Write_6cyc_2L, WriteLDHi, WriteAdr], (instrs LDPQpre)>;
  488. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi], (instrs LDPSWi)>;
  489. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi, WriteAdr], (instrs LDPSWpost)>;
  490. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi, WriteAdr], (instrs LDPSWpre)>;
  491. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDPSi)>;
  492. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPSpost)>;
  493. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPSpre)>;
  494. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRBpost)>;
  495. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRBpre)>;
  496. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRBroW)>;
  497. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRBroX)>;
  498. def : InstRW<[A57Write_5cyc_1L], (instrs LDRBui)>;
  499. def : InstRW<[A57Write_5cyc_1L], (instrs LDRDl)>;
  500. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRDpost)>;
  501. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRDpre)>;
  502. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRDroW)>;
  503. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRDroX)>;
  504. def : InstRW<[A57Write_5cyc_1L], (instrs LDRDui)>;
  505. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRHHroW)>;
  506. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRHHroX)>;
  507. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRHpost)>;
  508. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRHpre)>;
  509. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRHroW)>;
  510. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRHroX)>;
  511. def : InstRW<[A57Write_5cyc_1L], (instrs LDRHui)>;
  512. def : InstRW<[A57Write_5cyc_1L], (instrs LDRQl)>;
  513. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRQpost)>;
  514. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRQpre)>;
  515. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRQroW)>;
  516. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRQroX)>;
  517. def : InstRW<[A57Write_5cyc_1L], (instrs LDRQui)>;
  518. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHWroW)>;
  519. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHWroX)>;
  520. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHXroW)>;
  521. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHXroX)>;
  522. def : InstRW<[A57Write_5cyc_1L], (instrs LDRSl)>;
  523. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRSpost)>;
  524. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRSpre)>;
  525. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRSroW)>;
  526. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRSroX)>;
  527. def : InstRW<[A57Write_5cyc_1L], (instrs LDRSui)>;
  528. def : InstRW<[A57Write_5cyc_1L], (instrs LDURBi)>;
  529. def : InstRW<[A57Write_5cyc_1L], (instrs LDURDi)>;
  530. def : InstRW<[A57Write_5cyc_1L], (instrs LDURHi)>;
  531. def : InstRW<[A57Write_5cyc_1L], (instrs LDURQi)>;
  532. def : InstRW<[A57Write_5cyc_1L], (instrs LDURSi)>;
  533. def : InstRW<[A57Write_2cyc_2S], (instrs STNPDi)>;
  534. def : InstRW<[A57Write_4cyc_1I_4S], (instrs STNPQi)>;
  535. def : InstRW<[A57Write_2cyc_2S], (instrs STNPXi)>;
  536. def : InstRW<[A57Write_2cyc_2S], (instrs STPDi)>;
  537. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPDpost)>;
  538. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPDpre)>;
  539. def : InstRW<[A57Write_4cyc_1I_4S], (instrs STPQi)>;
  540. def : InstRW<[WriteAdr, A57Write_4cyc_1I_4S], (instrs STPQpost)>;
  541. def : InstRW<[WriteAdr, A57Write_4cyc_2I_4S], (instrs STPQpre)>;
  542. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPSpost)>;
  543. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPSpre)>;
  544. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPWpost)>;
  545. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPWpre)>;
  546. def : InstRW<[A57Write_2cyc_2S], (instrs STPXi)>;
  547. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPXpost)>;
  548. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPXpre)>;
  549. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBBpost)>;
  550. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBBpre)>;
  551. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBpost)>;
  552. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRBpre)>;
  553. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRBroW)>;
  554. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRBroX)>;
  555. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRDpost)>;
  556. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRDpre)>;
  557. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHHpost)>;
  558. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHHpre)>;
  559. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHHroW)>;
  560. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHHroX)>;
  561. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHpost)>;
  562. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRHpre)>;
  563. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHroW)>;
  564. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHroX)>;
  565. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQpost)>;
  566. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STRQpre)>;
  567. def : InstRW<[A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQroW)>;
  568. def : InstRW<[A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQroX)>;
  569. def : InstRW<[A57Write_2cyc_1I_2S], (instrs STRQui)>;
  570. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRSpost)>;
  571. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRSpre)>;
  572. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRWpost)>;
  573. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRWpre)>;
  574. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRXpost)>;
  575. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRXpre)>;
  576. def : InstRW<[A57Write_2cyc_2S], (instrs STURQi)>;
  577. } // SchedModel = CortexA57Model