PPCInstrSPE.td 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  1. //=======-- PPCInstrSPE.td - The PowerPC SPE Extension -*- 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 describes the Signal Processing Engine extension to
  10. // the PowerPC instruction set.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. class EFXForm_1<bits<11> xo, dag OOL, dag IOL, string asmstr,
  14. InstrItinClass itin, list<dag> pattern> :
  15. I<4, OOL, IOL, asmstr, itin> {
  16. bits<5> RT;
  17. bits<5> RA;
  18. bits<5> RB;
  19. let Pattern = pattern;
  20. let Inst{6-10} = RT;
  21. let Inst{11-15} = RA;
  22. let Inst{16-20} = RB;
  23. let Inst{21-31} = xo;
  24. }
  25. class EFXForm_2<bits<11> xo, dag OOL, dag IOL, string asmstr,
  26. InstrItinClass itin, list<dag> pattern> :
  27. EFXForm_1<xo, OOL, IOL, asmstr, itin, pattern> {
  28. let RB = 0;
  29. }
  30. class EFXForm_2a<bits<11> xo, dag OOL, dag IOL, string asmstr,
  31. InstrItinClass itin, list<dag> pattern> :
  32. EFXForm_1<xo, OOL, IOL, asmstr, itin, pattern> {
  33. let RA = 0;
  34. }
  35. class EFXForm_3<bits<11> xo, dag OOL, dag IOL, string asmstr,
  36. InstrItinClass itin> :
  37. I<4, OOL, IOL, asmstr, itin> {
  38. bits<3> crD;
  39. bits<5> RA;
  40. bits<5> RB;
  41. let Inst{6-8} = crD;
  42. let Inst{9-10} = 0;
  43. let Inst{11-15} = RA;
  44. let Inst{16-20} = RB;
  45. let Inst{21-31} = xo;
  46. }
  47. class EVXForm_1<bits<11> xo, dag OOL, dag IOL, string asmstr,
  48. InstrItinClass itin, list<dag> pattern> :
  49. I<4, OOL, IOL, asmstr, itin> {
  50. bits<5> RT;
  51. bits<5> RA;
  52. bits<5> RB;
  53. let Pattern = pattern;
  54. let Inst{6-10} = RT;
  55. let Inst{11-15} = RA;
  56. let Inst{16-20} = RB;
  57. let Inst{21-31} = xo;
  58. }
  59. class EVXForm_2<bits<11> xo, dag OOL, dag IOL, string asmstr,
  60. InstrItinClass itin, list<dag> pattern> :
  61. EVXForm_1<xo, OOL, IOL, asmstr, itin, pattern> {
  62. let RB = 0;
  63. }
  64. class EVXForm_2a<bits<11> xo, dag OOL, dag IOL, string asmstr,
  65. InstrItinClass itin, list<dag> pattern> :
  66. EVXForm_1<xo, OOL, IOL, asmstr, itin, pattern> {
  67. let RA = 0;
  68. }
  69. class EVXForm_3<bits<11> xo, dag OOL, dag IOL, string asmstr,
  70. InstrItinClass itin, list<dag> pattern> :
  71. I<4, OOL, IOL, asmstr, itin> {
  72. bits<3> crD;
  73. bits<5> RA;
  74. bits<5> RB;
  75. let Pattern = pattern;
  76. let Inst{6-8} = crD;
  77. let Inst{9-10} = 0;
  78. let Inst{11-15} = RA;
  79. let Inst{16-20} = RB;
  80. let Inst{21-31} = xo;
  81. }
  82. class EVXForm_4<bits<8> xo, dag OOL, dag IOL, string asmstr,
  83. InstrItinClass itin, list<dag> pattern> :
  84. I<4, OOL, IOL, asmstr, itin> {
  85. bits<3> crD;
  86. bits<5> RA;
  87. bits<5> RB;
  88. bits<5> RT;
  89. let Pattern = pattern;
  90. let Inst{6-10} = RT;
  91. let Inst{11-15} = RA;
  92. let Inst{16-20} = RB;
  93. let Inst{21-28} = xo;
  94. let Inst{29-31} = crD;
  95. }
  96. class EVXForm_D<bits<11> xo, dag OOL, dag IOL, string asmstr,
  97. InstrItinClass itin, list<dag> pattern> :
  98. I<4, OOL, IOL, asmstr, itin> {
  99. bits<5> RT;
  100. bits<21> D;
  101. let Pattern = pattern;
  102. let Inst{6-10} = RT;
  103. let Inst{20} = D{0};
  104. let Inst{19} = D{1};
  105. let Inst{18} = D{2};
  106. let Inst{17} = D{3};
  107. let Inst{16} = D{4};
  108. let Inst{15} = D{5};
  109. let Inst{14} = D{6};
  110. let Inst{13} = D{7};
  111. let Inst{12} = D{8};
  112. let Inst{11} = D{9};
  113. let Inst{11-20} = D{0-9};
  114. let Inst{21-31} = xo;
  115. }
  116. let DecoderNamespace = "SPE", Predicates = [HasSPE] in {
  117. def BRINC : EVXForm_1<527, (outs gprc:$RT), (ins gprc:$RA, gprc:$RB),
  118. "brinc $RT, $RA, $RB", IIC_IntSimple, []>;
  119. // Double-precision floating point
  120. def EFDABS : EFXForm_2<740, (outs sperc:$RT), (ins sperc:$RA),
  121. "efdabs $RT, $RA", IIC_FPDGeneral,
  122. [(set f64:$RT, (fabs f64:$RA))]>;
  123. def EFDADD : EFXForm_1<736, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  124. "efdadd $RT, $RA, $RB", IIC_FPAddSub,
  125. [(set f64:$RT, (any_fadd f64:$RA, f64:$RB))]>;
  126. def EFDCFS : EFXForm_2a<751, (outs sperc:$RT), (ins spe4rc:$RB),
  127. "efdcfs $RT, $RB", IIC_FPDGeneral,
  128. [(set f64:$RT, (any_fpextend f32:$RB))]>;
  129. def EFDCFSF : EFXForm_2a<755, (outs sperc:$RT), (ins spe4rc:$RB),
  130. "efdcfsf $RT, $RB", IIC_FPDGeneral, []>;
  131. def EFDCFSI : EFXForm_2a<753, (outs sperc:$RT), (ins gprc:$RB),
  132. "efdcfsi $RT, $RB", IIC_FPDGeneral,
  133. [(set f64:$RT, (any_sint_to_fp i32:$RB))]>;
  134. def EFDCFSID : EFXForm_2a<739, (outs sperc:$RT), (ins gprc:$RB),
  135. "efdcfsid $RT, $RB", IIC_FPDGeneral,
  136. []>;
  137. def EFDCFUF : EFXForm_2a<754, (outs sperc:$RT), (ins spe4rc:$RB),
  138. "efdcfuf $RT, $RB", IIC_FPDGeneral, []>;
  139. def EFDCFUI : EFXForm_2a<752, (outs sperc:$RT), (ins gprc:$RB),
  140. "efdcfui $RT, $RB", IIC_FPDGeneral,
  141. [(set f64:$RT, (any_uint_to_fp i32:$RB))]>;
  142. def EFDCFUID : EFXForm_2a<738, (outs sperc:$RT), (ins gprc:$RB),
  143. "efdcfuid $RT, $RB", IIC_FPDGeneral,
  144. []>;
  145. let isCompare = 1 in {
  146. def EFDCMPEQ : EFXForm_3<750, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  147. "efdcmpeq $crD, $RA, $RB", IIC_FPDGeneral>;
  148. def EFDCMPGT : EFXForm_3<748, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  149. "efdcmpgt $crD, $RA, $RB", IIC_FPDGeneral>;
  150. def EFDCMPLT : EFXForm_3<749, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  151. "efdcmplt $crD, $RA, $RB", IIC_FPDGeneral>;
  152. }
  153. def EFDCTSF : EFXForm_2a<759, (outs sperc:$RT), (ins spe4rc:$RB),
  154. "efdctsf $RT, $RB", IIC_FPDGeneral, []>;
  155. def EFDCTSI : EFXForm_2a<757, (outs gprc:$RT), (ins sperc:$RB),
  156. "efdctsi $RT, $RB", IIC_FPDGeneral,
  157. []>;
  158. def EFDCTSIDZ : EFXForm_2a<747, (outs gprc:$RT), (ins sperc:$RB),
  159. "efdctsidz $RT, $RB", IIC_FPDGeneral,
  160. []>;
  161. def EFDCTSIZ : EFXForm_2a<762, (outs gprc:$RT), (ins sperc:$RB),
  162. "efdctsiz $RT, $RB", IIC_FPDGeneral,
  163. [(set i32:$RT, (any_fp_to_sint f64:$RB))]>;
  164. def EFDCTUF : EFXForm_2a<758, (outs sperc:$RT), (ins spe4rc:$RB),
  165. "efdctuf $RT, $RB", IIC_FPDGeneral, []>;
  166. def EFDCTUI : EFXForm_2a<756, (outs gprc:$RT), (ins sperc:$RB),
  167. "efdctui $RT, $RB", IIC_FPDGeneral,
  168. []>;
  169. def EFDCTUIDZ : EFXForm_2a<746, (outs gprc:$RT), (ins sperc:$RB),
  170. "efdctuidz $RT, $RB", IIC_FPDGeneral,
  171. []>;
  172. def EFDCTUIZ : EFXForm_2a<760, (outs gprc:$RT), (ins sperc:$RB),
  173. "efdctuiz $RT, $RB", IIC_FPDGeneral,
  174. [(set i32:$RT, (any_fp_to_uint f64:$RB))]>;
  175. def EFDDIV : EFXForm_1<745, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  176. "efddiv $RT, $RA, $RB", IIC_FPDivD,
  177. [(set f64:$RT, (any_fdiv f64:$RA, f64:$RB))]>;
  178. def EFDMUL : EFXForm_1<744, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  179. "efdmul $RT, $RA, $RB", IIC_FPDGeneral,
  180. [(set f64:$RT, (any_fmul f64:$RA, f64:$RB))]>;
  181. def EFDNABS : EFXForm_2<741, (outs sperc:$RT), (ins sperc:$RA),
  182. "efdnabs $RT, $RA", IIC_FPDGeneral,
  183. [(set f64:$RT, (fneg (fabs f64:$RA)))]>;
  184. def EFDNEG : EFXForm_2<742, (outs sperc:$RT), (ins sperc:$RA),
  185. "efdneg $RT, $RA", IIC_FPDGeneral,
  186. [(set f64:$RT, (fneg f64:$RA))]>;
  187. def EFDSUB : EFXForm_1<737, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  188. "efdsub $RT, $RA, $RB", IIC_FPDGeneral,
  189. [(set f64:$RT, (any_fsub f64:$RA, f64:$RB))]>;
  190. let isCompare = 1 in {
  191. def EFDTSTEQ : EFXForm_3<766, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  192. "efdtsteq $crD, $RA, $RB", IIC_FPDGeneral>;
  193. def EFDTSTGT : EFXForm_3<764, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  194. "efdtstgt $crD, $RA, $RB", IIC_FPDGeneral>;
  195. def EFDTSTLT : EFXForm_3<765, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  196. "efdtstlt $crD, $RA, $RB", IIC_FPDGeneral>;
  197. }
  198. // Single-precision floating point
  199. def EFSABS : EFXForm_2<708, (outs spe4rc:$RT), (ins spe4rc:$RA),
  200. "efsabs $RT, $RA", IIC_FPSGeneral,
  201. [(set f32:$RT, (fabs f32:$RA))]>;
  202. def EFSADD : EFXForm_1<704, (outs spe4rc:$RT), (ins spe4rc:$RA, spe4rc:$RB),
  203. "efsadd $RT, $RA, $RB", IIC_FPAddSub,
  204. [(set f32:$RT, (any_fadd f32:$RA, f32:$RB))]>;
  205. def EFSCFD : EFXForm_2a<719, (outs spe4rc:$RT), (ins sperc:$RB),
  206. "efscfd $RT, $RB", IIC_FPSGeneral,
  207. [(set f32:$RT, (any_fpround f64:$RB))]>;
  208. def EFSCFSF : EFXForm_2a<723, (outs spe4rc:$RT), (ins spe4rc:$RB),
  209. "efscfsf $RT, $RB", IIC_FPSGeneral, []>;
  210. def EFSCFSI : EFXForm_2a<721, (outs spe4rc:$RT), (ins gprc:$RB),
  211. "efscfsi $RT, $RB", IIC_FPSGeneral,
  212. [(set f32:$RT, (any_sint_to_fp i32:$RB))]>;
  213. def EFSCFUF : EFXForm_2a<722, (outs spe4rc:$RT), (ins spe4rc:$RB),
  214. "efscfuf $RT, $RB", IIC_FPSGeneral, []>;
  215. def EFSCFUI : EFXForm_2a<720, (outs spe4rc:$RT), (ins gprc:$RB),
  216. "efscfui $RT, $RB", IIC_FPSGeneral,
  217. [(set f32:$RT, (any_uint_to_fp i32:$RB))]>;
  218. let isCompare = 1 in {
  219. def EFSCMPEQ : EFXForm_3<718, (outs crrc:$crD), (ins spe4rc:$RA, spe4rc:$RB),
  220. "efscmpeq $crD, $RA, $RB", IIC_FPCompare>;
  221. def EFSCMPGT : EFXForm_3<716, (outs crrc:$crD), (ins spe4rc:$RA, spe4rc:$RB),
  222. "efscmpgt $crD, $RA, $RB", IIC_FPCompare>;
  223. def EFSCMPLT : EFXForm_3<717, (outs crrc:$crD), (ins spe4rc:$RA, spe4rc:$RB),
  224. "efscmplt $crD, $RA, $RB", IIC_FPCompare>;
  225. }
  226. def EFSCTSF : EFXForm_2a<727, (outs spe4rc:$RT), (ins spe4rc:$RB),
  227. "efsctsf $RT, $RB", IIC_FPSGeneral, []>;
  228. def EFSCTSI : EFXForm_2a<725, (outs gprc:$RT), (ins spe4rc:$RB),
  229. "efsctsi $RT, $RB", IIC_FPSGeneral,
  230. []>;
  231. def EFSCTSIZ : EFXForm_2a<730, (outs gprc:$RT), (ins spe4rc:$RB),
  232. "efsctsiz $RT, $RB", IIC_FPSGeneral,
  233. [(set i32:$RT, (any_fp_to_sint f32:$RB))]>;
  234. def EFSCTUF : EFXForm_2a<726, (outs sperc:$RT), (ins spe4rc:$RB),
  235. "efsctuf $RT, $RB", IIC_FPSGeneral, []>;
  236. def EFSCTUI : EFXForm_2a<724, (outs gprc:$RT), (ins spe4rc:$RB),
  237. "efsctui $RT, $RB", IIC_FPSGeneral,
  238. []>;
  239. def EFSCTUIZ : EFXForm_2a<728, (outs gprc:$RT), (ins spe4rc:$RB),
  240. "efsctuiz $RT, $RB", IIC_FPSGeneral,
  241. [(set i32:$RT, (any_fp_to_uint f32:$RB))]>;
  242. def EFSDIV : EFXForm_1<713, (outs spe4rc:$RT), (ins spe4rc:$RA, spe4rc:$RB),
  243. "efsdiv $RT, $RA, $RB", IIC_FPDivD,
  244. [(set f32:$RT, (any_fdiv f32:$RA, f32:$RB))]>;
  245. def EFSMUL : EFXForm_1<712, (outs spe4rc:$RT), (ins spe4rc:$RA, spe4rc:$RB),
  246. "efsmul $RT, $RA, $RB", IIC_FPGeneral,
  247. [(set f32:$RT, (any_fmul f32:$RA, f32:$RB))]>;
  248. def EFSNABS : EFXForm_2<709, (outs spe4rc:$RT), (ins spe4rc:$RA),
  249. "efsnabs $RT, $RA", IIC_FPGeneral,
  250. [(set f32:$RT, (fneg (fabs f32:$RA)))]>;
  251. def EFSNEG : EFXForm_2<710, (outs spe4rc:$RT), (ins spe4rc:$RA),
  252. "efsneg $RT, $RA", IIC_FPGeneral,
  253. [(set f32:$RT, (fneg f32:$RA))]>;
  254. def EFSSUB : EFXForm_1<705, (outs spe4rc:$RT), (ins spe4rc:$RA, spe4rc:$RB),
  255. "efssub $RT, $RA, $RB", IIC_FPSGeneral,
  256. [(set f32:$RT, (any_fsub f32:$RA, f32:$RB))]>;
  257. let isCompare = 1 in {
  258. def EFSTSTEQ : EFXForm_3<734, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  259. "efststeq $crD, $RA, $RB", IIC_FPCompare>;
  260. def EFSTSTGT : EFXForm_3<732, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  261. "efststgt $crD, $RA, $RB", IIC_FPCompare>;
  262. def EFSTSTLT : EFXForm_3<733, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  263. "efststlt $crD, $RA, $RB", IIC_FPCompare>;
  264. }
  265. // SPE Vector operations
  266. def EVABS : EVXForm_2<520, (outs sperc:$RT), (ins sperc:$RA),
  267. "evabs $RT, $RA", IIC_VecGeneral,
  268. []>;
  269. def EVADDIW : EVXForm_1<514, (outs sperc:$RT), (ins sperc:$RA, u5imm:$RB),
  270. "evaddiw $RT, $RB, $RA", IIC_VecGeneral, []>;
  271. def EVADDSMIAAW : EVXForm_2<1225, (outs sperc:$RT), (ins sperc:$RA),
  272. "evaddsmiaaw $RT, $RA", IIC_VecComplex, []>;
  273. def EVADDSSIAAW : EVXForm_2<1217, (outs sperc:$RT), (ins sperc:$RA),
  274. "evaddssiaaw $RT, $RA", IIC_VecComplex, []>;
  275. def EVADDUSIAAW : EVXForm_2<1216, (outs sperc:$RT), (ins sperc:$RA),
  276. "evaddusiaaw $RT, $RA", IIC_VecComplex, []>;
  277. def EVADDUMIAAW : EVXForm_2<1224, (outs sperc:$RT), (ins sperc:$RA),
  278. "evaddumiaaw $RT, $RA", IIC_VecComplex, []>;
  279. def EVADDW : EVXForm_1<512, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  280. "evaddw $RT, $RA, $RB", IIC_VecGeneral,
  281. []>;
  282. def EVAND : EVXForm_1<529, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  283. "evand $RT, $RA, $RB", IIC_VecGeneral,
  284. []>;
  285. def EVANDC : EVXForm_1<530, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  286. "evandc $RT, $RA, $RB", IIC_VecGeneral,
  287. []>;
  288. let isCompare = 1 in {
  289. def EVCMPEQ : EVXForm_3<564, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  290. "evcmpeq $crD, $RA, $RB", IIC_VecGeneral, []>;
  291. def EVCMPGTS : EVXForm_3<561, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  292. "evcmpgts $crD, $RA, $RB", IIC_VecGeneral, []>;
  293. def EVCMPGTU : EVXForm_3<560, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  294. "evcmpgtu $crD, $RA, $RB", IIC_VecGeneral, []>;
  295. def EVCMPLTS : EVXForm_3<563, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  296. "evcmplts $crD, $RA, $RB", IIC_VecGeneral, []>;
  297. def EVCMPLTU : EVXForm_3<562, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  298. "evcmpltu $crD, $RA, $RB", IIC_VecGeneral, []>;
  299. }
  300. def EVCNTLSW : EVXForm_2<526, (outs sperc:$RT), (ins sperc:$RA),
  301. "evcntlsw $RT, $RA", IIC_VecGeneral, []>;
  302. def EVCNTLZW : EVXForm_2<525, (outs sperc:$RT), (ins sperc:$RA),
  303. "evcntlzw $RT, $RA", IIC_VecGeneral,
  304. []>;
  305. def EVDIVWS : EVXForm_1<1222, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  306. "evdivws $RT, $RA, $RB", IIC_VecComplex,
  307. []>;
  308. def EVDIVWU : EVXForm_1<1223, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  309. "evdivwu $RT, $RA, $RB", IIC_VecComplex,
  310. []>;
  311. def EVEQV : EVXForm_1<537, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  312. "eveqv $RT, $RA, $RB", IIC_VecGeneral,
  313. []>;
  314. def EVEXTSB : EVXForm_2<522, (outs sperc:$RT), (ins sperc:$RA),
  315. "evextsb $RT, $RA", IIC_VecGeneral,
  316. []>;
  317. def EVEXTSH : EVXForm_2<523, (outs sperc:$RT), (ins sperc:$RA),
  318. "evextsh $RT, $RA", IIC_VecGeneral,
  319. []>;
  320. def EVFSABS : EVXForm_2<644, (outs sperc:$RT), (ins sperc:$RA),
  321. "evfsabs $RT, $RA", IIC_VecGeneral,
  322. []>;
  323. def EVFSADD : EVXForm_1<640, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  324. "evfsadd $RT, $RA, $RB", IIC_VecComplex,
  325. []>;
  326. def EVFSCFSF : EVXForm_2a<659, (outs sperc:$RT), (ins sperc:$RB),
  327. "evfscfsf $RT, $RB", IIC_VecComplex, []>;
  328. def EVFSCFSI : EVXForm_2a<657, (outs sperc:$RT), (ins sperc:$RB),
  329. "evfscfsi $RT, $RB", IIC_VecComplex,
  330. []>;
  331. def EVFSCFUF : EVXForm_2a<658, (outs sperc:$RT), (ins sperc:$RB),
  332. "evfscfuf $RT, $RB", IIC_VecComplex, []>;
  333. def EVFSCFUI : EVXForm_2a<650, (outs sperc:$RT), (ins sperc:$RB),
  334. "evfscfui $RT, $RB", IIC_VecComplex,
  335. []>;
  336. let isCompare = 1 in {
  337. def EVFSCMPEQ : EVXForm_3<654, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  338. "evfscmpeq $crD, $RA, $RB", IIC_FPSGeneral, []>;
  339. def EVFSCMPGT : EVXForm_3<652, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  340. "evfscmpgt $crD, $RA, $RB", IIC_FPSGeneral, []>;
  341. def EVFSCMPLT : EVXForm_3<653, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  342. "evfscmplt $crD, $RA, $RB", IIC_FPSGeneral, []>;
  343. }
  344. def EVFSCTSF : EVXForm_2a<663, (outs sperc:$RT), (ins sperc:$RB),
  345. "evfsctsf $RT, $RB", IIC_VecComplex, []>;
  346. def EVFSCTSI : EVXForm_2a<661, (outs sperc:$RT), (ins sperc:$RB),
  347. "evfsctsi $RT, $RB", IIC_VecComplex,
  348. []>;
  349. def EVFSCTSIZ : EVXForm_2a<666, (outs sperc:$RT), (ins sperc:$RB),
  350. "evfsctsiz $RT, $RB", IIC_VecComplex,
  351. []>;
  352. def EVFSCTUF : EVXForm_2a<662, (outs sperc:$RT), (ins sperc:$RB),
  353. "evfsctsf $RT, $RB", IIC_VecComplex, []>;
  354. def EVFSCTUI : EVXForm_2a<660, (outs sperc:$RT), (ins sperc:$RB),
  355. "evfsctui $RT, $RB", IIC_VecComplex,
  356. []>;
  357. def EVFSCTUIZ : EVXForm_2a<664, (outs sperc:$RT), (ins sperc:$RB),
  358. "evfsctsiz $RT, $RB", IIC_VecComplex,
  359. []>;
  360. def EVFSDIV : EVXForm_1<649, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  361. "evfsdiv $RT, $RA, $RB", IIC_FPDivD,
  362. []>;
  363. def EVFSMUL : EVXForm_1<648, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  364. "evfsmul $RT, $RA, $RB", IIC_VecComplex,
  365. []>;
  366. def EVFSNABS : EVXForm_2<645, (outs sperc:$RT), (ins sperc:$RA),
  367. "evfsnabs $RT, $RA", IIC_VecGeneral,
  368. []>;
  369. def EVFSNEG : EVXForm_2<646, (outs sperc:$RT), (ins sperc:$RA),
  370. "evfsneg $RT, $RA", IIC_VecGeneral,
  371. []>;
  372. def EVFSSUB : EVXForm_1<641, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  373. "evfssub $RT, $RA, $RB", IIC_VecComplex,
  374. []>;
  375. let isCompare = 1 in {
  376. def EVFSTSTEQ : EVXForm_3<670, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  377. "evfststeq $crD, $RA, $RB", IIC_VecGeneral, []>;
  378. def EVFSTSTGT : EVXForm_3<668, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  379. "evfststgt $crD, $RA, $RB", IIC_VecGeneral, []>;
  380. def EVFSTSTLT : EVXForm_3<669, (outs crrc:$crD), (ins sperc:$RA, sperc:$RB),
  381. "evfststlt $crD, $RA, $RB", IIC_VecGeneral, []>;
  382. }
  383. def EVLDD : EVXForm_D<769, (outs sperc:$RT), (ins spe8dis:$dst),
  384. "evldd $RT, $dst", IIC_LdStLoad,
  385. [(set f64:$RT, (load iaddr:$dst))]>;
  386. def EVLDDX : EVXForm_1<768, (outs sperc:$RT), (ins memrr:$src),
  387. "evlddx $RT, $src", IIC_LdStLoad,
  388. [(set f64:$RT, (load xaddr:$src))]>;
  389. def EVLDH : EVXForm_D<773, (outs sperc:$RT), (ins spe8dis:$dst),
  390. "evldh $RT, $dst", IIC_LdStLoad, []>;
  391. def EVLDHX : EVXForm_1<772, (outs sperc:$RT), (ins memrr:$src),
  392. "evldhx $RT, $src", IIC_LdStLoad, []>;
  393. def EVLDW : EVXForm_D<771, (outs sperc:$RT), (ins spe8dis:$dst),
  394. "evldw $RT, $dst", IIC_LdStLoad,
  395. []>;
  396. def EVLDWX : EVXForm_1<770, (outs sperc:$RT), (ins memrr:$src),
  397. "evldwx $RT, $src", IIC_LdStLoad,
  398. []>;
  399. def EVLHHESPLAT : EVXForm_D<777, (outs sperc:$RT), (ins spe2dis:$dst),
  400. "evlhhesplat $RT, $dst", IIC_LdStLoad, []>;
  401. def EVLHHESPLATX : EVXForm_1<776, (outs sperc:$RT), (ins memrr:$src),
  402. "evlhhesplatx $RT, $src", IIC_LdStLoad, []>;
  403. def EVLHHOUSPLAT : EVXForm_D<781, (outs sperc:$RT), (ins spe2dis:$dst),
  404. "evlhhousplat $RT, $dst", IIC_LdStLoad, []>;
  405. def EVLHHOUSPLATX : EVXForm_1<780, (outs sperc:$RT), (ins memrr:$src),
  406. "evlhhousplatx $RT, $src", IIC_LdStLoad, []>;
  407. def EVLHHOSSPLAT : EVXForm_D<783, (outs sperc:$RT), (ins spe2dis:$dst),
  408. "evlhhossplat $RT, $dst", IIC_LdStLoad, []>;
  409. def EVLHHOSSPLATX : EVXForm_1<782, (outs sperc:$RT), (ins memrr:$src),
  410. "evlhhossplatx $RT, $src", IIC_LdStLoad, []>;
  411. def EVLWHE : EVXForm_D<785, (outs sperc:$RT), (ins spe4dis:$dst),
  412. "evlwhe $RT, $dst", IIC_LdStLoad, []>;
  413. def EVLWHEX : EVXForm_1<784, (outs sperc:$RT), (ins memrr:$src),
  414. "evlwhex $RT, $src", IIC_LdStLoad, []>;
  415. def EVLWHOS : EVXForm_D<791, (outs sperc:$RT), (ins spe4dis:$dst),
  416. "evlwhos $RT, $dst", IIC_LdStLoad, []>;
  417. def EVLWHOSX : EVXForm_1<790, (outs sperc:$RT), (ins memrr:$src),
  418. "evlwhosx $RT, $src", IIC_LdStLoad, []>;
  419. def EVLWHOU : EVXForm_D<789, (outs sperc:$RT), (ins spe4dis:$dst),
  420. "evlwhou $RT, $dst", IIC_LdStLoad, []>;
  421. def EVLWHOUX : EVXForm_1<788, (outs sperc:$RT), (ins memrr:$src),
  422. "evlwhoux $RT, $src", IIC_LdStLoad, []>;
  423. def EVLWHSPLAT : EVXForm_D<797, (outs sperc:$RT), (ins spe4dis:$dst),
  424. "evlwhsplat $RT, $dst", IIC_LdStLoad, []>;
  425. def EVLWHSPLATX : EVXForm_1<796, (outs sperc:$RT), (ins memrr:$src),
  426. "evlwhsplatx $RT, $src", IIC_LdStLoad, []>;
  427. def EVLWWSPLAT : EVXForm_D<793, (outs sperc:$RT), (ins spe4dis:$dst),
  428. "evlwwsplat $RT, $dst", IIC_LdStLoad, []>;
  429. def EVLWWSPLATX : EVXForm_1<792, (outs sperc:$RT), (ins memrr:$src),
  430. "evlwwsplatx $RT, $src", IIC_LdStLoad, []>;
  431. def EVMERGEHI : EVXForm_1<556, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  432. "evmergehi $RT, $RA, $RB", IIC_VecGeneral, []>;
  433. def EVMERGELO : EVXForm_1<557, (outs sperc:$RT), (ins gprc:$RA, gprc:$RB),
  434. "evmergelo $RT, $RA, $RB", IIC_VecGeneral, []>;
  435. def EVMERGEHILO : EVXForm_1<558, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  436. "evmergehilo $RT, $RA, $RB", IIC_VecGeneral, []>;
  437. def EVMERGELOHI : EVXForm_1<559, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  438. "evmergelohi $RT, $RA, $RB", IIC_VecGeneral, []>;
  439. def EVMHEGSMFAA : EVXForm_1<1323, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  440. "evmhegsmfaa $RT, $RA, $RB", IIC_VecComplex, []>;
  441. def EVMHEGSMFAN : EVXForm_1<1451, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  442. "evmhegsmfan $RT, $RA, $RB", IIC_VecComplex, []>;
  443. def EVMHEGSMIAA : EVXForm_1<1321, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  444. "evmhegsmiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  445. def EVMHEGSMIAN : EVXForm_1<1449, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  446. "evmhegsmian $RT, $RA, $RB", IIC_VecComplex, []>;
  447. def EVMHEGUMIAA : EVXForm_1<1320, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  448. "evmhegumiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  449. def EVMHEGUMIAN : EVXForm_1<1448, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  450. "evmhegumian $RT, $RA, $RB", IIC_VecComplex, []>;
  451. def EVMHESMF : EVXForm_1<1035, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  452. "evmhesmf $RT, $RA, $RB", IIC_VecComplex, []>;
  453. def EVMHESMFA : EVXForm_1<1067, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  454. "evmhesmfa $RT, $RA, $RB", IIC_VecComplex, []>;
  455. def EVMHESMFAAW : EVXForm_1<1291, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  456. "evmhesmfaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  457. def EVMHESMFANW : EVXForm_1<1419, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  458. "evmhesmfanw $RT, $RA, $RB", IIC_VecComplex, []>;
  459. def EVMHESMI : EVXForm_1<1033, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  460. "evmhesmi $RT, $RA, $RB", IIC_VecComplex, []>;
  461. def EVMHESMIA : EVXForm_1<1065, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  462. "evmhesmia $RT, $RA, $RB", IIC_VecComplex, []>;
  463. def EVMHESMIAAW : EVXForm_1<1289, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  464. "evmhesmiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  465. def EVMHESMIANW : EVXForm_1<1417, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  466. "evmhesmianw $RT, $RA, $RB", IIC_VecComplex, []>;
  467. def EVMHESSF : EVXForm_1<1027, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  468. "evmhessf $RT, $RA, $RB", IIC_VecComplex, []>;
  469. def EVMHESSFA : EVXForm_1<1059, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  470. "evmhessfa $RT, $RA, $RB", IIC_VecComplex, []>;
  471. def EVMHESSFAAW : EVXForm_1<1283, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  472. "evmhessfaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  473. def EVMHESSFANW : EVXForm_1<1411, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  474. "evmhessfanw $RT, $RA, $RB", IIC_VecComplex, []>;
  475. def EVMHESSIAAW : EVXForm_1<1281, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  476. "evmhessiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  477. def EVMHESSIANW : EVXForm_1<1409, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  478. "evmhessianw $RT, $RA, $RB", IIC_VecComplex, []>;
  479. def EVMHEUMI : EVXForm_1<1032, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  480. "evmheumi $RT, $RA, $RB", IIC_VecComplex, []>;
  481. def EVMHEUMIA : EVXForm_1<1064, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  482. "evmheumia $RT, $RA, $RB", IIC_VecComplex, []>;
  483. def EVMHEUMIAAW : EVXForm_1<1288, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  484. "evmheumiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  485. def EVMHEUMIANW : EVXForm_1<1416, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  486. "evmheumianw $RT, $RA, $RB", IIC_VecComplex, []>;
  487. def EVMHEUSIAAW : EVXForm_1<1280, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  488. "evmheusiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  489. def EVMHEUSIANW : EVXForm_1<1408, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  490. "evmheusianw $RT, $RA, $RB", IIC_VecComplex, []>;
  491. def EVMHOGSMFAA : EVXForm_1<1327, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  492. "evmhogsmfaa $RT, $RA, $RB", IIC_VecComplex, []>;
  493. def EVMHOGSMFAN : EVXForm_1<1455, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  494. "evmhogsmfan $RT, $RA, $RB", IIC_VecComplex, []>;
  495. def EVMHOGSMIAA : EVXForm_1<1325, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  496. "evmhogsmiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  497. def EVMHOGSMIAN : EVXForm_1<1453, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  498. "evmhogsmian $RT, $RA, $RB", IIC_VecComplex, []>;
  499. def EVMHOGUMIAA : EVXForm_1<1324, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  500. "evmhogumiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  501. def EVMHOGUMIAN : EVXForm_1<1452, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  502. "evmhogumian $RT, $RA, $RB", IIC_VecComplex, []>;
  503. def EVMHOSMF : EVXForm_1<1039, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  504. "evmhosmf $RT, $RA, $RB", IIC_VecComplex, []>;
  505. def EVMHOSMFA : EVXForm_1<1071, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  506. "evmhosmfa $RT, $RA, $RB", IIC_VecComplex, []>;
  507. def EVMHOSMFAAW : EVXForm_1<1295, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  508. "evmhosmfaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  509. def EVMHOSMFANW : EVXForm_1<1423, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  510. "evmhosmfanw $RT, $RA, $RB", IIC_VecComplex, []>;
  511. def EVMHOSMI : EVXForm_1<1037, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  512. "evmhosmi $RT, $RA, $RB", IIC_VecComplex, []>;
  513. def EVMHOSMIA : EVXForm_1<1069, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  514. "evmhosmia $RT, $RA, $RB", IIC_VecComplex, []>;
  515. def EVMHOSMIAAW : EVXForm_1<1293, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  516. "evmhosmiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  517. def EVMHOSMIANW : EVXForm_1<1421, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  518. "evmhosmianw $RT, $RA, $RB", IIC_VecComplex, []>;
  519. def EVMHOSSF : EVXForm_1<1031, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  520. "evmhossf $RT, $RA, $RB", IIC_VecComplex, []>;
  521. def EVMHOSSFA : EVXForm_1<1063, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  522. "evmhossfa $RT, $RA, $RB", IIC_VecComplex, []>;
  523. def EVMHOSSFAAW : EVXForm_1<1287, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  524. "evmhossfaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  525. def EVMHOSSFANW : EVXForm_1<1415, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  526. "evmhossfanw $RT, $RA, $RB", IIC_VecComplex, []>;
  527. def EVMHOSSIAAW : EVXForm_1<1285, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  528. "evmhossiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  529. def EVMHOSSIANW : EVXForm_1<1413, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  530. "evmhossianw $RT, $RA, $RB", IIC_VecComplex, []>;
  531. def EVMHOUMI : EVXForm_1<1036, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  532. "evmhoumi $RT, $RA, $RB", IIC_VecComplex, []>;
  533. def EVMHOUMIA : EVXForm_1<1068, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  534. "evmhoumia $RT, $RA, $RB", IIC_VecComplex, []>;
  535. def EVMHOUMIAAW : EVXForm_1<1292, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  536. "evmhoumiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  537. def EVMHOUMIANW : EVXForm_1<1420, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  538. "evmhoumianw $RT, $RA, $RB", IIC_VecComplex, []>;
  539. def EVMHOUSIAAW : EVXForm_1<1284, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  540. "evmhousiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  541. def EVMHOUSIANW : EVXForm_1<1412, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  542. "evmhousianw $RT, $RA, $RB", IIC_VecComplex, []>;
  543. def EVMRA : EVXForm_2<1220, (outs sperc:$RT), (ins sperc:$RA),
  544. "evmra $RT, $RA", IIC_VecComplex, []>;
  545. def EVMWHSMF : EVXForm_1<1103, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  546. "evmwhsmf $RT, $RA, $RB", IIC_VecComplex, []>;
  547. def EVMWHSMFA : EVXForm_1<1135, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  548. "evmwhsmfa $RT, $RA, $RB", IIC_VecComplex, []>;
  549. def EVMWHSMI : EVXForm_1<1101, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  550. "evmwhsmi $RT, $RA, $RB", IIC_VecComplex, []>;
  551. def EVMWHSMIA : EVXForm_1<1133, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  552. "evmwhsmia $RT, $RA, $RB", IIC_VecComplex, []>;
  553. def EVMWHSSF : EVXForm_1<1095, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  554. "evmwhssf $RT, $RA, $RB", IIC_VecComplex, []>;
  555. def EVMWHSSFA : EVXForm_1<1127, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  556. "evmwhssfa $RT, $RA, $RB", IIC_VecComplex, []>;
  557. def EVMWHUMI : EVXForm_1<1100, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  558. "evmwhumi $RT, $RA, $RB", IIC_VecComplex, []>;
  559. def EVMWHUMIA : EVXForm_1<1132, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  560. "evmwhumia $RT, $RA, $RB", IIC_VecComplex, []>;
  561. def EVMWLSMIAAW : EVXForm_1<1353, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  562. "evmwlsmiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  563. def EVMWLSMIANW : EVXForm_1<1481, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  564. "evmwlsmianw $RT, $RA, $RB", IIC_VecComplex, []>;
  565. def EVMWLSSIAAW : EVXForm_1<1345, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  566. "evmwlssiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  567. def EVMWLSSIANW : EVXForm_1<1473, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  568. "evmwlssianw $RT, $RA, $RB", IIC_VecComplex, []>;
  569. def EVMWLUMI : EVXForm_1<1096, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  570. "evmwlumi $RT, $RA, $RB", IIC_VecComplex,
  571. []>;
  572. def EVMWLUMIA : EVXForm_1<1128, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  573. "evmwlumia $RT, $RA, $RB", IIC_VecComplex, []>;
  574. def EVMWLUMIAAW : EVXForm_1<1352, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  575. "evmwlumiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  576. def EVMWLUMIANW : EVXForm_1<1480, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  577. "evmwlumianw $RT, $RA, $RB", IIC_VecComplex, []>;
  578. def EVMWLUSIAAW : EVXForm_1<1344, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  579. "evmwlusiaaw $RT, $RA, $RB", IIC_VecComplex, []>;
  580. def EVMWLUSIANW : EVXForm_1<1472, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  581. "evmwlusianw $RT, $RA, $RB", IIC_VecComplex, []>;
  582. def EVMWSMF : EVXForm_1<1115, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  583. "evmwsmf $RT, $RA, $RB", IIC_VecComplex, []>;
  584. def EVMWSMFA : EVXForm_1<1147, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  585. "evmwsmfa $RT, $RA, $RB", IIC_VecComplex, []>;
  586. def EVMWSMFAA : EVXForm_1<1371, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  587. "evmwsmfaa $RT, $RA, $RB", IIC_VecComplex, []>;
  588. def EVMWSMFAN : EVXForm_1<1499, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  589. "evmwsmfan $RT, $RA, $RB", IIC_VecComplex, []>;
  590. def EVMWSMI : EVXForm_1<1113, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  591. "evmwsmi $RT, $RA, $RB", IIC_VecComplex, []>;
  592. def EVMWSMIA : EVXForm_1<1145, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  593. "evmwsmia $RT, $RA, $RB", IIC_VecComplex, []>;
  594. def EVMWSMIAA : EVXForm_1<1369, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  595. "evmwsmiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  596. def EVMWSMIAN : EVXForm_1<1497, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  597. "evmwsmian $RT, $RA, $RB", IIC_VecComplex, []>;
  598. def EVMWSSF : EVXForm_1<1107, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  599. "evmwssf $RT, $RA, $RB", IIC_VecComplex, []>;
  600. def EVMWSSFA : EVXForm_1<1139, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  601. "evmwssfa $RT, $RA, $RB", IIC_VecComplex, []>;
  602. def EVMWSSFAA : EVXForm_1<1363, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  603. "evmwssfaa $RT, $RA, $RB", IIC_VecComplex, []>;
  604. def EVMWSSFAN : EVXForm_1<1491, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  605. "evmwssfan $RT, $RA, $RB", IIC_VecComplex, []>;
  606. def EVMWUMI : EVXForm_1<1112, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  607. "evmwumi $RT, $RA, $RB", IIC_VecComplex, []>;
  608. def EVMWUMIA : EVXForm_1<1144, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  609. "evmwumia $RT, $RA, $RB", IIC_VecComplex, []>;
  610. def EVMWUMIAA : EVXForm_1<1368, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  611. "evmwumiaa $RT, $RA, $RB", IIC_VecComplex, []>;
  612. def EVMWUMIAN : EVXForm_1<1496, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  613. "evmwumian $RT, $RA, $RB", IIC_VecComplex, []>;
  614. def EVNAND : EVXForm_1<542, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  615. "evnand $RT, $RA, $RB", IIC_VecGeneral,
  616. []>;
  617. def EVNEG : EVXForm_2<521, (outs sperc:$RT), (ins sperc:$RA),
  618. "evneg $RT, $RA", IIC_VecGeneral,
  619. []>;
  620. def EVNOR : EVXForm_1<536, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  621. "evnor $RT, $RA, $RB", IIC_VecGeneral,
  622. []>;
  623. def EVOR : EVXForm_1<535, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  624. "evor $RT, $RA, $RB", IIC_VecGeneral,
  625. []>;
  626. def EVORC : EVXForm_1<539, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  627. "evorc $RT, $RA, $RB", IIC_VecGeneral,
  628. []>;
  629. def EVRLWI : EVXForm_1<554, (outs sperc:$RT), (ins sperc:$RA, u5imm:$RB),
  630. "evrlwi $RT, $RA, $RB", IIC_VecGeneral, []>;
  631. def EVRLW : EVXForm_1<552, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  632. "evrlw $RT, $RA, $RB", IIC_VecGeneral,
  633. []>;
  634. def EVRNDW : EVXForm_2<524, (outs sperc:$RT), (ins sperc:$RA),
  635. "evrndw $RT, $RA", IIC_VecGeneral, []>;
  636. def EVSEL : EVXForm_4<79, (outs sperc:$RT),
  637. (ins sperc:$RA, sperc:$RB, crrc:$crD),
  638. "evsel crD,$RT,$RA,$RB", IIC_VecGeneral, []>;
  639. def EVSLWI : EVXForm_1<550, (outs sperc:$RT), (ins sperc:$RA, u5imm:$RB),
  640. "evslwi $RT, $RA, $RB", IIC_VecGeneral, []>;
  641. def EVSLW : EVXForm_1<548, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  642. "evslw $RT, $RA, $RB", IIC_VecGeneral,
  643. []>;
  644. def EVSPLATFI : EVXForm_2<555, (outs sperc:$RT), (ins s5imm:$RA),
  645. "evsplatfi $RT, $RA", IIC_VecGeneral, []>;
  646. def EVSPLATI : EVXForm_2<553, (outs sperc:$RT), (ins s5imm:$RA),
  647. "evsplati $RT, $RA", IIC_VecGeneral, []>;
  648. def EVSRWIS : EVXForm_1<547, (outs sperc:$RT), (ins sperc:$RA, u5imm:$RB),
  649. "evsrwis $RT, $RA, $RB", IIC_VecGeneral, []>;
  650. def EVSRWIU : EVXForm_1<546, (outs sperc:$RT), (ins sperc:$RA, u5imm:$RB),
  651. "evsrwiu $RT, $RA, $RB", IIC_VecGeneral, []>;
  652. def EVSRWS : EVXForm_1<545, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  653. "evsrws $RT, $RA, $RB", IIC_VecGeneral,
  654. []>;
  655. def EVSRWU : EVXForm_1<544, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  656. "evsrwu $RT, $RA, $RB", IIC_VecGeneral,
  657. []>;
  658. def EVSTDD : EVXForm_D<801, (outs), (ins sperc:$RT, spe8dis:$dst),
  659. "evstdd $RT, $dst", IIC_LdStStore,
  660. [(store f64:$RT, iaddr:$dst)]>;
  661. def EVSTDDX : EVXForm_1<800, (outs), (ins sperc:$RT, memrr:$dst),
  662. "evstddx $RT, $dst", IIC_LdStStore,
  663. [(store f64:$RT, xaddr:$dst)]>;
  664. def EVSTDH : EVXForm_D<805, (outs), (ins sperc:$RT, spe8dis:$dst),
  665. "evstdh $RT, $dst", IIC_LdStStore, []>;
  666. def EVSTDHX : EVXForm_1<804, (outs), (ins sperc:$RT, memrr:$dst),
  667. "evstdhx $RT, $dst", IIC_LdStStore, []>;
  668. def EVSTDW : EVXForm_D<803, (outs), (ins sperc:$RT, spe8dis:$dst),
  669. "evstdw $RT, $dst", IIC_LdStStore,
  670. []>;
  671. def EVSTDWX : EVXForm_1<802, (outs), (ins sperc:$RT, memrr:$dst),
  672. "evstdwx $RT, $dst", IIC_LdStStore,
  673. []>;
  674. def EVSTWHE : EVXForm_D<817, (outs), (ins sperc:$RT, spe4dis:$dst),
  675. "evstwhe $RT, $dst", IIC_LdStStore, []>;
  676. def EVSTWHEX : EVXForm_1<816, (outs), (ins sperc:$RT, memrr:$dst),
  677. "evstwhex $RT, $dst", IIC_LdStStore, []>;
  678. def EVSTWHO : EVXForm_D<821, (outs), (ins sperc:$RT, spe4dis:$dst),
  679. "evstwho $RT, $dst", IIC_LdStStore, []>;
  680. def EVSTWHOX : EVXForm_1<820, (outs), (ins sperc:$RT, memrr:$dst),
  681. "evstwhox $RT, $dst", IIC_LdStStore, []>;
  682. def EVSTWWE : EVXForm_D<825, (outs), (ins sperc:$RT, spe4dis:$dst),
  683. "evstwwe $RT, $dst", IIC_LdStStore, []>;
  684. def EVSTWWEX : EVXForm_1<824, (outs), (ins sperc:$RT, memrr:$dst),
  685. "evstwwex $RT, $dst", IIC_LdStStore, []>;
  686. def EVSTWWO : EVXForm_D<829, (outs), (ins sperc:$RT, spe4dis:$dst),
  687. "evstwwo $RT, $dst", IIC_LdStStore, []>;
  688. def EVSTWWOX : EVXForm_1<828, (outs), (ins sperc:$RT, memrr:$dst),
  689. "evstwwox $RT, $dst", IIC_LdStStore, []>;
  690. def EVSUBFSSIAAW : EVXForm_2<1219, (outs sperc:$RT), (ins sperc:$RA),
  691. "evsubfssiaaw $RT, $RA", IIC_VecComplex, []>;
  692. def EVSUBFSMIAAW : EVXForm_2<1227, (outs sperc:$RT), (ins sperc:$RA),
  693. "evsubfsmiaaw $RT, $RA", IIC_VecComplex, []>;
  694. def EVSUBFUMIAAW : EVXForm_2<1226, (outs sperc:$RT), (ins sperc:$RA),
  695. "evsubfumiaaw $RT, $RA", IIC_VecComplex, []>;
  696. def EVSUBFUSIAAW : EVXForm_2<1218, (outs sperc:$RT), (ins sperc:$RA),
  697. "evsubfusiaaw $RT, $RA", IIC_VecComplex, []>;
  698. def EVSUBFW : EVXForm_1<516, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  699. "evsubfw $RT, $RA, $RB", IIC_VecGeneral,
  700. []>;
  701. def EVSUBIFW : EVXForm_1<518, (outs sperc:$RT), (ins u5imm:$RA, sperc:$RB),
  702. "evsubifw $RT, $RA, $RB", IIC_VecGeneral, []>;
  703. def EVXOR : EVXForm_1<534, (outs sperc:$RT), (ins sperc:$RA, sperc:$RB),
  704. "evxor $RT, $RA, $RB", IIC_VecGeneral,
  705. []>;
  706. let isAsmParserOnly = 1 in {
  707. // Identical to the integer Load/Stores, but to handle floats
  708. def SPELWZ : DForm_1<32, (outs spe4rc:$rD), (ins memri:$src),
  709. "lwz $rD, $src", IIC_LdStLoad,
  710. [(set f32:$rD, (load iaddr:$src))]>;
  711. def SPELWZX : XForm_1<31, 23, (outs spe4rc:$rD), (ins memrr:$src),
  712. "lwzx $rD, $src", IIC_LdStLoad,
  713. [(set f32:$rD, (load xaddr:$src))]>;
  714. def SPESTW : DForm_1<36, (outs), (ins spe4rc:$rS, memri:$src),
  715. "stw $rS, $src", IIC_LdStStore,
  716. [(store f32:$rS, iaddr:$src)]>;
  717. def SPESTWX : XForm_8<31, 151, (outs), (ins spe4rc:$rS, memrr:$dst),
  718. "stwx $rS, $dst", IIC_LdStStore,
  719. [(store f32:$rS, xaddr:$dst)]>;
  720. }
  721. } // HasSPE
  722. let Predicates = [HasSPE] in {
  723. def SELECT_CC_SPE4 : PPCCustomInserterPseudo<(outs spe4rc:$dst),
  724. (ins crrc:$cond, spe4rc:$T, spe4rc:$F,
  725. i32imm:$BROPC), "#SELECT_CC_SPE4",
  726. []>;
  727. def SELECT_CC_SPE : PPCCustomInserterPseudo<(outs sperc:$dst),
  728. (ins crrc:$cond, sperc:$T, sperc:$F, i32imm:$BROPC),
  729. "#SELECT_CC_SPE",
  730. []>;
  731. def SELECT_SPE4 : PPCCustomInserterPseudo<(outs spe4rc:$dst), (ins crbitrc:$cond,
  732. spe4rc:$T, spe4rc:$F), "#SELECT_SPE4",
  733. [(set f32:$dst, (select i1:$cond, f32:$T, f32:$F))]>;
  734. def SELECT_SPE : PPCCustomInserterPseudo<(outs sperc:$dst), (ins crbitrc:$cond,
  735. sperc:$T, sperc:$F), "#SELECT_SPE",
  736. [(set f64:$dst, (select i1:$cond, f64:$T, f64:$F))]>;
  737. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETLT)),
  738. (SELECT_SPE4 (CRANDC $lhs, $rhs), $tval, $fval)>;
  739. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETULT)),
  740. (SELECT_SPE4 (CRANDC $rhs, $lhs), $tval, $fval)>;
  741. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETLE)),
  742. (SELECT_SPE4 (CRORC $lhs, $rhs), $tval, $fval)>;
  743. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETULE)),
  744. (SELECT_SPE4 (CRORC $rhs, $lhs), $tval, $fval)>;
  745. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETEQ)),
  746. (SELECT_SPE4 (CREQV $lhs, $rhs), $tval, $fval)>;
  747. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETGE)),
  748. (SELECT_SPE4 (CRORC $rhs, $lhs), $tval, $fval)>;
  749. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETUGE)),
  750. (SELECT_SPE4 (CRORC $lhs, $rhs), $tval, $fval)>;
  751. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETGT)),
  752. (SELECT_SPE4 (CRANDC $rhs, $lhs), $tval, $fval)>;
  753. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETUGT)),
  754. (SELECT_SPE4 (CRANDC $lhs, $rhs), $tval, $fval)>;
  755. def : Pat<(f32 (selectcc i1:$lhs, i1:$rhs, f32:$tval, f32:$fval, SETNE)),
  756. (SELECT_SPE4 (CRXOR $lhs, $rhs), $tval, $fval)>;
  757. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETLT)),
  758. (SELECT_SPE (CRANDC $lhs, $rhs), $tval, $fval)>;
  759. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETULT)),
  760. (SELECT_SPE (CRANDC $rhs, $lhs), $tval, $fval)>;
  761. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETLE)),
  762. (SELECT_SPE (CRORC $lhs, $rhs), $tval, $fval)>;
  763. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETULE)),
  764. (SELECT_SPE (CRORC $rhs, $lhs), $tval, $fval)>;
  765. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETEQ)),
  766. (SELECT_SPE (CREQV $lhs, $rhs), $tval, $fval)>;
  767. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETGE)),
  768. (SELECT_SPE (CRORC $rhs, $lhs), $tval, $fval)>;
  769. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETUGE)),
  770. (SELECT_SPE (CRORC $lhs, $rhs), $tval, $fval)>;
  771. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETGT)),
  772. (SELECT_SPE (CRANDC $rhs, $lhs), $tval, $fval)>;
  773. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETUGT)),
  774. (SELECT_SPE (CRANDC $lhs, $rhs), $tval, $fval)>;
  775. def : Pat<(f64 (selectcc i1:$lhs, i1:$rhs, f64:$tval, f64:$fval, SETNE)),
  776. (SELECT_SPE (CRXOR $lhs, $rhs), $tval, $fval)>;
  777. def : Pat<(f64 (PPCbuild_spe64 i32:$rB, i32:$rA)),
  778. (f64 (COPY_TO_REGCLASS (EVMERGELO $rA, $rB), SPERC))>;
  779. def : Pat<(i32 (PPCextract_spe f64:$rA, 1)),
  780. (i32 (EXTRACT_SUBREG (EVMERGEHI $rA, $rA), sub_32))>;
  781. def : Pat<(i32 (PPCextract_spe f64:$rA, 0)),
  782. (i32 (EXTRACT_SUBREG $rA, sub_32))>;
  783. }