x86mmsecond.inc 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022
  1. in_x86_movss
  2. ,in_x86_movapd
  3. ,in_x86_movhpd
  4. ,in_x86_movlpd
  5. ,in_x86_movupd
  6. ,in_x86_movsd_from_mem
  7. ,in_x86_movd_from_mem
  8. ,in_x86_pmovsxbd_from_mem
  9. ,in_x86_pmovzxbd_from_mem
  10. ,in_x86_pmovsxwq_from_mem
  11. ,in_x86_pmovzxwq_from_mem
  12. : //out r0:xmm;r1:ptr32;
  13. begin
  14. case inlinenumber of
  15. in_x86_pmovzxwq_from_mem: begin op:=A_pmovzxwq end;
  16. in_x86_pmovsxwq_from_mem: begin op:=A_pmovsxwq end;
  17. in_x86_pmovzxbd_from_mem: begin op:=A_pmovzxbd end;
  18. in_x86_pmovsxbd_from_mem: begin op:=A_pmovsxbd end;
  19. in_x86_movd_from_mem: begin op:=A_movd end;
  20. in_x86_movsd_from_mem: begin op:=A_movsd end;
  21. in_x86_movupd: begin op:=A_movupd end;
  22. in_x86_movlpd: begin op:=A_movlpd end;
  23. in_x86_movhpd: begin op:=A_movhpd end;
  24. in_x86_movapd: begin op:=A_movapd end;
  25. in_x86_movss: begin op:=A_movss; end;
  26. else
  27. Internalerror(2020010201);
  28. end;
  29. GetParameters(1);
  30. for i := 1 to 1 do secondpass(paraarray[i]);
  31. location_make_ref(paraarray[1].location);
  32. location_reset(location,LOC_MMREGISTER,OS_M128);
  33. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  34. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  35. end;
  36. in_x86_movaps
  37. ,in_x86_movups
  38. ,in_x86_sqrtpd_from_mem
  39. ,in_x86_movdqa_from_mem
  40. ,in_x86_movdqu_from_mem
  41. ,in_x86_movsldup_from_mem
  42. ,in_x86_movshdup_from_mem
  43. ,in_x86_lddqu
  44. ,in_x86_pabsb_from_mem
  45. ,in_x86_pabsw_from_mem
  46. ,in_x86_pabsd_from_mem
  47. ,in_x86_movntdqa
  48. : //out r0:xmm;r1:ptr128;
  49. begin
  50. case inlinenumber of
  51. in_x86_movntdqa: begin op:=A_movntdqa end;
  52. in_x86_pabsd_from_mem: begin op:=A_pabsd end;
  53. in_x86_pabsw_from_mem: begin op:=A_pabsw end;
  54. in_x86_pabsb_from_mem: begin op:=A_pabsb end;
  55. in_x86_lddqu: begin op:=A_lddqu end;
  56. in_x86_movshdup_from_mem: begin op:=A_movshdup end;
  57. in_x86_movsldup_from_mem: begin op:=A_movsldup end;
  58. in_x86_movdqu_from_mem: begin op:=A_movdqu end;
  59. in_x86_movdqa_from_mem: begin op:=A_movdqa end;
  60. in_x86_sqrtpd_from_mem: begin op:=A_sqrtpd end;
  61. in_x86_movups: begin op:=A_movups end;
  62. in_x86_movaps: begin op:=A_movaps; end;
  63. else
  64. Internalerror(2020010201);
  65. end;
  66. GetParameters(1);
  67. for i := 1 to 1 do secondpass(paraarray[i]);
  68. location_make_ref(paraarray[1].location);
  69. location_reset(location,LOC_MMREGISTER,OS_M128);
  70. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  71. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  72. end;
  73. in_x86_movss_to_mem
  74. ,in_x86_movapd_to_mem
  75. ,in_x86_movntpd_to_mem
  76. ,in_x86_movhpd_to_mem
  77. ,in_x86_movlpd_to_mem
  78. ,in_x86_movupd_to_mem
  79. ,in_x86_movsd_to_mem
  80. ,in_x86_movd_to_mem
  81. : //r0:ptr32;r1:xmm;
  82. begin
  83. case inlinenumber of
  84. in_x86_movd_to_mem: begin op:=A_movd end;
  85. in_x86_movsd_to_mem: begin op:=A_movsd end;
  86. in_x86_movupd_to_mem: begin op:=A_movupd end;
  87. in_x86_movlpd_to_mem: begin op:=A_movlpd end;
  88. in_x86_movhpd_to_mem: begin op:=A_movhpd end;
  89. in_x86_movntpd_to_mem: begin op:=A_movntpd end;
  90. in_x86_movapd_to_mem: begin op:=A_movapd end;
  91. in_x86_movss_to_mem: begin op:=A_movss; end;
  92. else
  93. Internalerror(2020010201);
  94. end;
  95. GetParameters(2);
  96. for i := 1 to 2 do secondpass(paraarray[i]);
  97. location_make_ref(paraarray[1].location);
  98. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  99. current_asmdata.CurrAsmList.concat(taicpu.op_reg_ref(op,S_NO,paraarray[2].location.register,paraarray[1].location.reference));
  100. end;
  101. in_x86_movaps_to_mem
  102. ,in_x86_movups_to_mem
  103. ,in_x86_movdqa
  104. ,in_x86_movdqu
  105. ,in_x86_movntdq
  106. : //r0:ptr128;r1:xmm;
  107. begin
  108. case inlinenumber of
  109. in_x86_movntdq: begin op:=A_movntdq end;
  110. in_x86_movdqu: begin op:=A_movdqu end;
  111. in_x86_movdqa: begin op:=A_movdqa end;
  112. in_x86_movups_to_mem: begin op:=A_movups end;
  113. in_x86_movaps_to_mem: begin op:=A_movaps; end;
  114. else
  115. Internalerror(2020010201);
  116. end;
  117. GetParameters(2);
  118. for i := 1 to 2 do secondpass(paraarray[i]);
  119. location_make_ref(paraarray[1].location);
  120. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  121. current_asmdata.CurrAsmList.concat(taicpu.op_reg_ref(op,S_NO,paraarray[2].location.register,paraarray[1].location.reference));
  122. end;
  123. in_x86_movss_to_val
  124. : //out r0:f32;r1:xmm;
  125. begin
  126. case inlinenumber of
  127. in_x86_movss_to_val: begin op:=A_movss; end;
  128. else
  129. Internalerror(2020010201);
  130. end;
  131. GetParameters(1);
  132. for i := 1 to 1 do secondpass(paraarray[i]);
  133. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  134. location_reset(location,LOC_MMREGISTER,OS_M128);
  135. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  136. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  137. end;
  138. in_x86_movss_from_val
  139. : //out r0:xmm;r1:f32;
  140. begin
  141. case inlinenumber of
  142. in_x86_movss_from_val: begin op:=A_movss; end;
  143. else
  144. Internalerror(2020010201);
  145. end;
  146. GetParameters(1);
  147. for i := 1 to 1 do secondpass(paraarray[i]);
  148. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  149. location_reset(location,LOC_MMREGISTER,OS_M128);
  150. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  151. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  152. end;
  153. in_x86_movlps
  154. ,in_x86_movhps
  155. ,in_x86_cvtpi2ps_from_mem
  156. ,in_x86_addsd_from_mem
  157. ,in_x86_divsd_from_mem
  158. ,in_x86_maxsd_from_mem
  159. ,in_x86_minsd_from_mem
  160. ,in_x86_mulsd_from_mem
  161. ,in_x86_subsd_from_mem
  162. ,in_x86_comisd_from_mem
  163. ,in_x86_ucomisd_from_mem
  164. ,in_x86_cvtdq2pd_from_mem
  165. ,in_x86_cvtpi2pd_from_mem
  166. ,in_x86_cvtps2pd_from_mem
  167. ,in_x86_cvtsd2ss_from_mem
  168. : //var r0:xmm;r1:ptr64;
  169. begin
  170. case inlinenumber of
  171. in_x86_cvtsd2ss_from_mem: begin op:=A_cvtsd2ss end;
  172. in_x86_cvtps2pd_from_mem: begin op:=A_cvtps2pd end;
  173. in_x86_cvtpi2pd_from_mem: begin op:=A_cvtpi2pd end;
  174. in_x86_cvtdq2pd_from_mem: begin op:=A_cvtdq2pd end;
  175. in_x86_ucomisd_from_mem: begin op:=A_ucomisd end;
  176. in_x86_comisd_from_mem: begin op:=A_comisd end;
  177. in_x86_subsd_from_mem: begin op:=A_subsd end;
  178. in_x86_mulsd_from_mem: begin op:=A_mulsd end;
  179. in_x86_minsd_from_mem: begin op:=A_minsd end;
  180. in_x86_maxsd_from_mem: begin op:=A_maxsd end;
  181. in_x86_divsd_from_mem: begin op:=A_divsd end;
  182. in_x86_addsd_from_mem: begin op:=A_addsd end;
  183. in_x86_cvtpi2ps_from_mem: begin op:=A_cvtpi2ps end;
  184. in_x86_movhps: begin op:=A_movhps end;
  185. in_x86_movlps: begin op:=A_movlps; end;
  186. else
  187. Internalerror(2020010201);
  188. end;
  189. GetParameters(2);
  190. for i := 1 to 2 do secondpass(paraarray[i]);
  191. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  192. location_make_ref(paraarray[2].location);
  193. location:=paraarray[1].location;
  194. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  195. end;
  196. in_x86_movlps_to_mem
  197. ,in_x86_movhps_to_mem
  198. ,in_x86_movq_to_mem
  199. : //r0:ptr64;r1:xmm;
  200. begin
  201. case inlinenumber of
  202. in_x86_movq_to_mem: begin op:=A_movq end;
  203. in_x86_movhps_to_mem: begin op:=A_movhps end;
  204. in_x86_movlps_to_mem: begin op:=A_movlps; end;
  205. else
  206. Internalerror(2020010201);
  207. end;
  208. GetParameters(2);
  209. for i := 1 to 2 do secondpass(paraarray[i]);
  210. location_make_ref(paraarray[1].location);
  211. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  212. current_asmdata.CurrAsmList.concat(taicpu.op_reg_ref(op,S_NO,paraarray[2].location.register,paraarray[1].location.reference));
  213. end;
  214. in_x86_movlhps
  215. ,in_x86_movhlps
  216. ,in_x86_addss
  217. ,in_x86_subss
  218. ,in_x86_mulss
  219. ,in_x86_divss
  220. ,in_x86_rcpss
  221. ,in_x86_sqrtss
  222. ,in_x86_maxss
  223. ,in_x86_minss
  224. ,in_x86_rsqrtss
  225. ,in_x86_addps
  226. ,in_x86_subps
  227. ,in_x86_mulps
  228. ,in_x86_divps
  229. ,in_x86_rcpps
  230. ,in_x86_sqrtps
  231. ,in_x86_maxps
  232. ,in_x86_minps
  233. ,in_x86_rsqrtps
  234. ,in_x86_andps
  235. ,in_x86_orps
  236. ,in_x86_xorps
  237. ,in_x86_andnps
  238. ,in_x86_unpckhps
  239. ,in_x86_unpcklps
  240. ,in_x86_addpd
  241. ,in_x86_addsd
  242. ,in_x86_divpd
  243. ,in_x86_divsd
  244. ,in_x86_maxpd
  245. ,in_x86_maxsd
  246. ,in_x86_minpd
  247. ,in_x86_minsd
  248. ,in_x86_mulpd
  249. ,in_x86_mulsd
  250. ,in_x86_subpd
  251. ,in_x86_subsd
  252. ,in_x86_andpd
  253. ,in_x86_andnpd
  254. ,in_x86_orpd
  255. ,in_x86_xorpd
  256. ,in_x86_comisd
  257. ,in_x86_ucomisd
  258. ,in_x86_unpckhpd
  259. ,in_x86_unpcklpd
  260. ,in_x86_cvtdq2pd
  261. ,in_x86_cvtdq2ps
  262. ,in_x86_cvtpd2dq
  263. ,in_x86_cvtpd2ps
  264. ,in_x86_cvtps2dq
  265. ,in_x86_cvtps2pd
  266. ,in_x86_cvtsd2ss
  267. ,in_x86_cvtss2sd
  268. ,in_x86_cvttpd2dq
  269. ,in_x86_cvttps2dq
  270. ,in_x86_packssdw
  271. ,in_x86_packsswb
  272. ,in_x86_packuswb
  273. ,in_x86_paddb
  274. ,in_x86_paddw
  275. ,in_x86_paddd
  276. ,in_x86_paddq
  277. ,in_x86_paddsb
  278. ,in_x86_paddsw
  279. ,in_x86_paddusb
  280. ,in_x86_paddusw
  281. ,in_x86_pand
  282. ,in_x86_pandn
  283. ,in_x86_por
  284. ,in_x86_pxor
  285. ,in_x86_pcmpeqb
  286. ,in_x86_pcmpeqw
  287. ,in_x86_pcmpeqd
  288. ,in_x86_pcmpgtb
  289. ,in_x86_pcmpgtw
  290. ,in_x86_pcmpgtd
  291. ,in_x86_pmullw
  292. ,in_x86_pmulhw
  293. ,in_x86_pmulhuw_sse2
  294. ,in_x86_pmuludq
  295. ,in_x86_psllw_sse2
  296. ,in_x86_pslld_sse2
  297. ,in_x86_psllq_sse2
  298. ,in_x86_psrad_sse2
  299. ,in_x86_psraw_sse2
  300. ,in_x86_psrlw_sse2
  301. ,in_x86_psrld_sse2
  302. ,in_x86_psrlq_sse2
  303. ,in_x86_psubb
  304. ,in_x86_psubw
  305. ,in_x86_psubd
  306. ,in_x86_psubq
  307. ,in_x86_psubsb
  308. ,in_x86_psubsw
  309. ,in_x86_pmaddwd
  310. ,in_x86_psubusb
  311. ,in_x86_psubusw
  312. ,in_x86_punpckhbw
  313. ,in_x86_punpckhwd
  314. ,in_x86_punpckhdq
  315. ,in_x86_punpcklbw
  316. ,in_x86_punpcklwd
  317. ,in_x86_punpckldq
  318. ,in_x86_pavgb_sse2
  319. ,in_x86_pavgw_sse2
  320. ,in_x86_pminub_sse2
  321. ,in_x86_pminsw_sse2
  322. ,in_x86_pmaxsw_sse2
  323. ,in_x86_pmaxub_sse2
  324. ,in_x86_psadbw_sse2
  325. ,in_x86_punpckhqdq
  326. ,in_x86_punpcklqdq
  327. ,in_x86_addsubps
  328. ,in_x86_addsubpd
  329. ,in_x86_haddps
  330. ,in_x86_haddpd
  331. ,in_x86_hsubps
  332. ,in_x86_hsubpd
  333. ,in_x86_psignb
  334. ,in_x86_psignw
  335. ,in_x86_psignd
  336. ,in_x86_pshufb
  337. ,in_x86_pmulhrsw
  338. ,in_x86_pmaddubsw
  339. ,in_x86_phsubw
  340. ,in_x86_phsubsw
  341. ,in_x86_phsubd
  342. ,in_x86_phaddsw
  343. ,in_x86_phaddw
  344. ,in_x86_phaddd
  345. ,in_x86_phminposuw
  346. ,in_x86_pmulld
  347. ,in_x86_pmuldq
  348. ,in_x86_pminsb
  349. ,in_x86_pminuw
  350. ,in_x86_pminsd
  351. ,in_x86_pminud
  352. ,in_x86_pmaxsb
  353. ,in_x86_pmaxuw
  354. ,in_x86_pmaxsd
  355. ,in_x86_pmaxud
  356. ,in_x86_ptest
  357. ,in_x86_pcmpeqq
  358. ,in_x86_packusdw
  359. ,in_x86_pcmpgtq
  360. : //var r0:xmm;r1:xmm;
  361. begin
  362. case inlinenumber of
  363. in_x86_pcmpgtq: begin op:=A_pcmpgtq end;
  364. in_x86_packusdw: begin op:=A_packusdw end;
  365. in_x86_pcmpeqq: begin op:=A_pcmpeqq end;
  366. in_x86_ptest: begin op:=A_ptest end;
  367. in_x86_pmaxud: begin op:=A_pmaxud end;
  368. in_x86_pmaxsd: begin op:=A_pmaxsd end;
  369. in_x86_pmaxuw: begin op:=A_pmaxuw end;
  370. in_x86_pmaxsb: begin op:=A_pmaxsb end;
  371. in_x86_pminud: begin op:=A_pminud end;
  372. in_x86_pminsd: begin op:=A_pminsd end;
  373. in_x86_pminuw: begin op:=A_pminuw end;
  374. in_x86_pminsb: begin op:=A_pminsb end;
  375. in_x86_pmuldq: begin op:=A_pmuldq end;
  376. in_x86_pmulld: begin op:=A_pmulld end;
  377. in_x86_phminposuw: begin op:=A_phminposuw end;
  378. in_x86_phaddd: begin op:=A_phaddd end;
  379. in_x86_phaddw: begin op:=A_phaddw end;
  380. in_x86_phaddsw: begin op:=A_phaddsw end;
  381. in_x86_phsubd: begin op:=A_phsubd end;
  382. in_x86_phsubsw: begin op:=A_phsubsw end;
  383. in_x86_phsubw: begin op:=A_phsubw end;
  384. in_x86_pmaddubsw: begin op:=A_pmaddubsw end;
  385. in_x86_pmulhrsw: begin op:=A_pmulhrsw end;
  386. in_x86_pshufb: begin op:=A_pshufb end;
  387. in_x86_psignd: begin op:=A_psignd end;
  388. in_x86_psignw: begin op:=A_psignw end;
  389. in_x86_psignb: begin op:=A_psignb end;
  390. in_x86_hsubpd: begin op:=A_hsubpd end;
  391. in_x86_hsubps: begin op:=A_hsubps end;
  392. in_x86_haddpd: begin op:=A_haddpd end;
  393. in_x86_haddps: begin op:=A_haddps end;
  394. in_x86_addsubpd: begin op:=A_addsubpd end;
  395. in_x86_addsubps: begin op:=A_addsubps end;
  396. in_x86_punpcklqdq: begin op:=A_punpcklqdq end;
  397. in_x86_punpckhqdq: begin op:=A_punpckhqdq end;
  398. in_x86_psadbw_sse2: begin op:=A_psadbw end;
  399. in_x86_pmaxub_sse2: begin op:=A_pmaxub end;
  400. in_x86_pmaxsw_sse2: begin op:=A_pmaxsw end;
  401. in_x86_pminsw_sse2: begin op:=A_pminsw end;
  402. in_x86_pminub_sse2: begin op:=A_pminub end;
  403. in_x86_pavgw_sse2: begin op:=A_pavgw end;
  404. in_x86_pavgb_sse2: begin op:=A_pavgb end;
  405. in_x86_punpckldq: begin op:=A_punpckldq end;
  406. in_x86_punpcklwd: begin op:=A_punpcklwd end;
  407. in_x86_punpcklbw: begin op:=A_punpcklbw end;
  408. in_x86_punpckhdq: begin op:=A_punpckhdq end;
  409. in_x86_punpckhwd: begin op:=A_punpckhwd end;
  410. in_x86_punpckhbw: begin op:=A_punpckhbw end;
  411. in_x86_psubusw: begin op:=A_psubusw end;
  412. in_x86_psubusb: begin op:=A_psubusb end;
  413. in_x86_pmaddwd: begin op:=A_pmaddwd end;
  414. in_x86_psubsw: begin op:=A_psubsw end;
  415. in_x86_psubsb: begin op:=A_psubsb end;
  416. in_x86_psubq: begin op:=A_psubq end;
  417. in_x86_psubd: begin op:=A_psubd end;
  418. in_x86_psubw: begin op:=A_psubw end;
  419. in_x86_psubb: begin op:=A_psubb end;
  420. in_x86_psrlq_sse2: begin op:=A_psrlq end;
  421. in_x86_psrld_sse2: begin op:=A_psrld end;
  422. in_x86_psrlw_sse2: begin op:=A_psrlw end;
  423. in_x86_psraw_sse2: begin op:=A_psraw end;
  424. in_x86_psrad_sse2: begin op:=A_psrad end;
  425. in_x86_psllq_sse2: begin op:=A_psllq end;
  426. in_x86_pslld_sse2: begin op:=A_pslld end;
  427. in_x86_psllw_sse2: begin op:=A_psllw end;
  428. in_x86_pmuludq: begin op:=A_pmuludq end;
  429. in_x86_pmulhuw_sse2: begin op:=A_pmulhuw end;
  430. in_x86_pmulhw: begin op:=A_pmulhw end;
  431. in_x86_pmullw: begin op:=A_pmullw end;
  432. in_x86_pcmpgtd: begin op:=A_pcmpgtd end;
  433. in_x86_pcmpgtw: begin op:=A_pcmpgtw end;
  434. in_x86_pcmpgtb: begin op:=A_pcmpgtb end;
  435. in_x86_pcmpeqd: begin op:=A_pcmpeqd end;
  436. in_x86_pcmpeqw: begin op:=A_pcmpeqw end;
  437. in_x86_pcmpeqb: begin op:=A_pcmpeqb end;
  438. in_x86_pxor: begin op:=A_pxor end;
  439. in_x86_por: begin op:=A_por end;
  440. in_x86_pandn: begin op:=A_pandn end;
  441. in_x86_pand: begin op:=A_pand end;
  442. in_x86_paddusw: begin op:=A_paddusw end;
  443. in_x86_paddusb: begin op:=A_paddusb end;
  444. in_x86_paddsw: begin op:=A_paddsw end;
  445. in_x86_paddsb: begin op:=A_paddsb end;
  446. in_x86_paddq: begin op:=A_paddq end;
  447. in_x86_paddd: begin op:=A_paddd end;
  448. in_x86_paddw: begin op:=A_paddw end;
  449. in_x86_paddb: begin op:=A_paddb end;
  450. in_x86_packuswb: begin op:=A_packuswb end;
  451. in_x86_packsswb: begin op:=A_packsswb end;
  452. in_x86_packssdw: begin op:=A_packssdw end;
  453. in_x86_cvttps2dq: begin op:=A_cvttps2dq end;
  454. in_x86_cvttpd2dq: begin op:=A_cvttpd2dq end;
  455. in_x86_cvtss2sd: begin op:=A_cvtss2sd end;
  456. in_x86_cvtsd2ss: begin op:=A_cvtsd2ss end;
  457. in_x86_cvtps2pd: begin op:=A_cvtps2pd end;
  458. in_x86_cvtps2dq: begin op:=A_cvtps2dq end;
  459. in_x86_cvtpd2ps: begin op:=A_cvtpd2ps end;
  460. in_x86_cvtpd2dq: begin op:=A_cvtpd2dq end;
  461. in_x86_cvtdq2ps: begin op:=A_cvtdq2ps end;
  462. in_x86_cvtdq2pd: begin op:=A_cvtdq2pd end;
  463. in_x86_unpcklpd: begin op:=A_unpcklpd end;
  464. in_x86_unpckhpd: begin op:=A_unpckhpd end;
  465. in_x86_ucomisd: begin op:=A_ucomisd end;
  466. in_x86_comisd: begin op:=A_comisd end;
  467. in_x86_xorpd: begin op:=A_xorpd end;
  468. in_x86_orpd: begin op:=A_orpd end;
  469. in_x86_andnpd: begin op:=A_andnpd end;
  470. in_x86_andpd: begin op:=A_andpd end;
  471. in_x86_subsd: begin op:=A_subsd end;
  472. in_x86_subpd: begin op:=A_subpd end;
  473. in_x86_mulsd: begin op:=A_mulsd end;
  474. in_x86_mulpd: begin op:=A_mulpd end;
  475. in_x86_minsd: begin op:=A_minsd end;
  476. in_x86_minpd: begin op:=A_minpd end;
  477. in_x86_maxsd: begin op:=A_maxsd end;
  478. in_x86_maxpd: begin op:=A_maxpd end;
  479. in_x86_divsd: begin op:=A_divsd end;
  480. in_x86_divpd: begin op:=A_divpd end;
  481. in_x86_addsd: begin op:=A_addsd end;
  482. in_x86_addpd: begin op:=A_addpd end;
  483. in_x86_unpcklps: begin op:=A_unpcklps end;
  484. in_x86_unpckhps: begin op:=A_unpckhps end;
  485. in_x86_andnps: begin op:=A_andnps end;
  486. in_x86_xorps: begin op:=A_xorps end;
  487. in_x86_orps: begin op:=A_orps end;
  488. in_x86_andps: begin op:=A_andps end;
  489. in_x86_rsqrtps: begin op:=A_rsqrtps end;
  490. in_x86_minps: begin op:=A_minps end;
  491. in_x86_maxps: begin op:=A_maxps end;
  492. in_x86_sqrtps: begin op:=A_sqrtps end;
  493. in_x86_rcpps: begin op:=A_rcpps end;
  494. in_x86_divps: begin op:=A_divps end;
  495. in_x86_mulps: begin op:=A_mulps end;
  496. in_x86_subps: begin op:=A_subps end;
  497. in_x86_addps: begin op:=A_addps end;
  498. in_x86_rsqrtss: begin op:=A_rsqrtss end;
  499. in_x86_minss: begin op:=A_minss end;
  500. in_x86_maxss: begin op:=A_maxss end;
  501. in_x86_sqrtss: begin op:=A_sqrtss end;
  502. in_x86_rcpss: begin op:=A_rcpss end;
  503. in_x86_divss: begin op:=A_divss end;
  504. in_x86_mulss: begin op:=A_mulss end;
  505. in_x86_subss: begin op:=A_subss end;
  506. in_x86_addss: begin op:=A_addss end;
  507. in_x86_movhlps: begin op:=A_movhlps end;
  508. in_x86_movlhps: begin op:=A_movlhps; end;
  509. else
  510. Internalerror(2020010201);
  511. end;
  512. GetParameters(2);
  513. for i := 1 to 2 do secondpass(paraarray[i]);
  514. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  515. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  516. location:=paraarray[1].location;
  517. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  518. end;
  519. in_x86_addss_from_mem
  520. ,in_x86_subss_from_mem
  521. ,in_x86_mulss_from_mem
  522. ,in_x86_divss_from_mem
  523. ,in_x86_rcpss_from_mem
  524. ,in_x86_sqrtss_from_mem
  525. ,in_x86_maxss_from_mem
  526. ,in_x86_minss_from_mem
  527. ,in_x86_rsqrtss_from_mem
  528. ,in_x86_cvtsi2ss_from_mem
  529. ,in_x86_cvtsi2sd_from_mem
  530. ,in_x86_cvtss2sd_from_mem
  531. : //var r0:xmm;r1:ptr32;
  532. begin
  533. case inlinenumber of
  534. in_x86_cvtss2sd_from_mem: begin op:=A_cvtss2sd end;
  535. in_x86_cvtsi2sd_from_mem: begin op:=A_cvtsi2sd end;
  536. in_x86_cvtsi2ss_from_mem: begin op:=A_cvtsi2ss end;
  537. in_x86_rsqrtss_from_mem: begin op:=A_rsqrtss end;
  538. in_x86_minss_from_mem: begin op:=A_minss end;
  539. in_x86_maxss_from_mem: begin op:=A_maxss end;
  540. in_x86_sqrtss_from_mem: begin op:=A_sqrtss end;
  541. in_x86_rcpss_from_mem: begin op:=A_rcpss end;
  542. in_x86_divss_from_mem: begin op:=A_divss end;
  543. in_x86_mulss_from_mem: begin op:=A_mulss end;
  544. in_x86_subss_from_mem: begin op:=A_subss end;
  545. in_x86_addss_from_mem: begin op:=A_addss; end;
  546. else
  547. Internalerror(2020010201);
  548. end;
  549. GetParameters(2);
  550. for i := 1 to 2 do secondpass(paraarray[i]);
  551. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  552. location_make_ref(paraarray[2].location);
  553. location:=paraarray[1].location;
  554. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  555. end;
  556. in_x86_addps_from_mem
  557. ,in_x86_subps_from_mem
  558. ,in_x86_mulps_from_mem
  559. ,in_x86_divps_from_mem
  560. ,in_x86_rcpps_from_mem
  561. ,in_x86_sqrtps_from_mem
  562. ,in_x86_maxps_from_mem
  563. ,in_x86_minps_from_mem
  564. ,in_x86_rsqrtps_from_mem
  565. ,in_x86_andps_from_mem
  566. ,in_x86_orps_from_mem
  567. ,in_x86_xorps_from_mem
  568. ,in_x86_andnps_from_mem
  569. ,in_x86_unpckhps_from_mem
  570. ,in_x86_unpcklps_from_mem
  571. ,in_x86_addpd_from_mem
  572. ,in_x86_divpd_from_mem
  573. ,in_x86_maxpd_from_mem
  574. ,in_x86_minpd_from_mem
  575. ,in_x86_mulpd_from_mem
  576. ,in_x86_subpd_from_mem
  577. ,in_x86_andpd_from_mem
  578. ,in_x86_andnpd_from_mem
  579. ,in_x86_orpd_from_mem
  580. ,in_x86_xorpd_from_mem
  581. ,in_x86_unpckhpd_from_mem
  582. ,in_x86_unpcklpd_from_mem
  583. ,in_x86_cvtdq2ps_from_mem
  584. ,in_x86_cvtpd2dq_from_mem
  585. ,in_x86_cvtpd2ps_from_mem
  586. ,in_x86_cvtps2dq_from_mem
  587. ,in_x86_cvttpd2dq_from_mem
  588. ,in_x86_cvttps2dq_from_mem
  589. ,in_x86_packssdw_from_mem
  590. ,in_x86_packsswb_from_mem
  591. ,in_x86_packuswb_from_mem
  592. ,in_x86_paddb_from_mem
  593. ,in_x86_paddw_from_mem
  594. ,in_x86_paddd_from_mem
  595. ,in_x86_paddq_from_mem
  596. ,in_x86_paddsb_from_mem
  597. ,in_x86_paddsw_from_mem
  598. ,in_x86_paddusb_from_mem
  599. ,in_x86_paddusw_from_mem
  600. ,in_x86_pand_from_mem
  601. ,in_x86_pandn_from_mem
  602. ,in_x86_por_from_mem
  603. ,in_x86_pxor_from_mem
  604. ,in_x86_pcmpeqb_from_mem
  605. ,in_x86_pcmpeqw_from_mem
  606. ,in_x86_pcmpeqd_from_mem
  607. ,in_x86_pcmpgtb_from_mem
  608. ,in_x86_pcmpgtw_from_mem
  609. ,in_x86_pcmpgtd_from_mem
  610. ,in_x86_pmullw_from_mem
  611. ,in_x86_pmulhw_from_mem
  612. ,in_x86_pmulhuw_from_mem
  613. ,in_x86_pmuludq_from_mem
  614. ,in_x86_psllw_from_mem
  615. ,in_x86_pslld_from_mem
  616. ,in_x86_psllq_from_mem
  617. ,in_x86_psrad_from_mem
  618. ,in_x86_psraw_from_mem
  619. ,in_x86_psrlw_from_mem
  620. ,in_x86_psrld_from_mem
  621. ,in_x86_psrlq_from_mem
  622. ,in_x86_psubb_from_mem
  623. ,in_x86_psubw_from_mem
  624. ,in_x86_psubd_from_mem
  625. ,in_x86_psubq_from_mem
  626. ,in_x86_psubsb_from_mem
  627. ,in_x86_psubsw_from_mem
  628. ,in_x86_pmaddwd_from_mem
  629. ,in_x86_psubusb_from_mem
  630. ,in_x86_psubusw_from_mem
  631. ,in_x86_punpckhbw_from_mem
  632. ,in_x86_punpckhwd_from_mem
  633. ,in_x86_punpckhdq_from_mem
  634. ,in_x86_punpcklbw_from_mem
  635. ,in_x86_punpcklwd_from_mem
  636. ,in_x86_punpckldq_from_mem
  637. ,in_x86_pavgb_from_mem
  638. ,in_x86_pavgw_from_mem
  639. ,in_x86_pminub_from_mem
  640. ,in_x86_pminsw_from_mem
  641. ,in_x86_pmaxsw_from_mem
  642. ,in_x86_pmaxub_from_mem
  643. ,in_x86_psadbw_from_mem
  644. ,in_x86_punpckhqdq_from_mem
  645. ,in_x86_punpcklqdq_from_mem
  646. ,in_x86_addsubps_from_mem
  647. ,in_x86_addsubpd_from_mem
  648. ,in_x86_haddps_from_mem
  649. ,in_x86_haddpd_from_mem
  650. ,in_x86_hsubps_from_mem
  651. ,in_x86_hsubpd_from_mem
  652. ,in_x86_psignb_from_mem
  653. ,in_x86_psignw_from_mem
  654. ,in_x86_psignd_from_mem
  655. ,in_x86_pshufb_from_mem
  656. ,in_x86_pmulhrsw_from_mem
  657. ,in_x86_pmaddubsw_from_mem
  658. ,in_x86_phsubw_from_mem
  659. ,in_x86_phsubsw_from_mem
  660. ,in_x86_phsubd_from_mem
  661. ,in_x86_phaddsw_from_mem
  662. ,in_x86_phaddw_from_mem
  663. ,in_x86_phaddd_from_mem
  664. ,in_x86_phminposuw_from_mem
  665. ,in_x86_pmulld_from_mem
  666. ,in_x86_pmuldq_from_mem
  667. ,in_x86_pminsb_from_mem
  668. ,in_x86_pminuw_from_mem
  669. ,in_x86_pminsd_from_mem
  670. ,in_x86_pminud_from_mem
  671. ,in_x86_pmaxsb_from_mem
  672. ,in_x86_pmaxuw_from_mem
  673. ,in_x86_pmaxsd_from_mem
  674. ,in_x86_pmaxud_from_mem
  675. ,in_x86_ptest_from_mem
  676. ,in_x86_pcmpeqq_from_mem
  677. ,in_x86_packusdw_from_mem
  678. ,in_x86_pcmpgtq_from_mem
  679. : //var r0:xmm;r1:ptr128;
  680. begin
  681. case inlinenumber of
  682. in_x86_pcmpgtq_from_mem: begin op:=A_pcmpgtq end;
  683. in_x86_packusdw_from_mem: begin op:=A_packusdw end;
  684. in_x86_pcmpeqq_from_mem: begin op:=A_pcmpeqq end;
  685. in_x86_ptest_from_mem: begin op:=A_ptest end;
  686. in_x86_pmaxud_from_mem: begin op:=A_pmaxud end;
  687. in_x86_pmaxsd_from_mem: begin op:=A_pmaxsd end;
  688. in_x86_pmaxuw_from_mem: begin op:=A_pmaxuw end;
  689. in_x86_pmaxsb_from_mem: begin op:=A_pmaxsb end;
  690. in_x86_pminud_from_mem: begin op:=A_pminud end;
  691. in_x86_pminsd_from_mem: begin op:=A_pminsd end;
  692. in_x86_pminuw_from_mem: begin op:=A_pminuw end;
  693. in_x86_pminsb_from_mem: begin op:=A_pminsb end;
  694. in_x86_pmuldq_from_mem: begin op:=A_pmuldq end;
  695. in_x86_pmulld_from_mem: begin op:=A_pmulld end;
  696. in_x86_phminposuw_from_mem: begin op:=A_phminposuw end;
  697. in_x86_phaddd_from_mem: begin op:=A_phaddd end;
  698. in_x86_phaddw_from_mem: begin op:=A_phaddw end;
  699. in_x86_phaddsw_from_mem: begin op:=A_phaddsw end;
  700. in_x86_phsubd_from_mem: begin op:=A_phsubd end;
  701. in_x86_phsubsw_from_mem: begin op:=A_phsubsw end;
  702. in_x86_phsubw_from_mem: begin op:=A_phsubw end;
  703. in_x86_pmaddubsw_from_mem: begin op:=A_pmaddubsw end;
  704. in_x86_pmulhrsw_from_mem: begin op:=A_pmulhrsw end;
  705. in_x86_pshufb_from_mem: begin op:=A_pshufb end;
  706. in_x86_psignd_from_mem: begin op:=A_psignd end;
  707. in_x86_psignw_from_mem: begin op:=A_psignw end;
  708. in_x86_psignb_from_mem: begin op:=A_psignb end;
  709. in_x86_hsubpd_from_mem: begin op:=A_hsubpd end;
  710. in_x86_hsubps_from_mem: begin op:=A_hsubps end;
  711. in_x86_haddpd_from_mem: begin op:=A_haddpd end;
  712. in_x86_haddps_from_mem: begin op:=A_haddps end;
  713. in_x86_addsubpd_from_mem: begin op:=A_addsubpd end;
  714. in_x86_addsubps_from_mem: begin op:=A_addsubps end;
  715. in_x86_punpcklqdq_from_mem: begin op:=A_punpcklqdq end;
  716. in_x86_punpckhqdq_from_mem: begin op:=A_punpckhqdq end;
  717. in_x86_psadbw_from_mem: begin op:=A_psadbw end;
  718. in_x86_pmaxub_from_mem: begin op:=A_pmaxub end;
  719. in_x86_pmaxsw_from_mem: begin op:=A_pmaxsw end;
  720. in_x86_pminsw_from_mem: begin op:=A_pminsw end;
  721. in_x86_pminub_from_mem: begin op:=A_pminub end;
  722. in_x86_pavgw_from_mem: begin op:=A_pavgw end;
  723. in_x86_pavgb_from_mem: begin op:=A_pavgb end;
  724. in_x86_punpckldq_from_mem: begin op:=A_punpckldq end;
  725. in_x86_punpcklwd_from_mem: begin op:=A_punpcklwd end;
  726. in_x86_punpcklbw_from_mem: begin op:=A_punpcklbw end;
  727. in_x86_punpckhdq_from_mem: begin op:=A_punpckhdq end;
  728. in_x86_punpckhwd_from_mem: begin op:=A_punpckhwd end;
  729. in_x86_punpckhbw_from_mem: begin op:=A_punpckhbw end;
  730. in_x86_psubusw_from_mem: begin op:=A_psubusw end;
  731. in_x86_psubusb_from_mem: begin op:=A_psubusb end;
  732. in_x86_pmaddwd_from_mem: begin op:=A_pmaddwd end;
  733. in_x86_psubsw_from_mem: begin op:=A_psubsw end;
  734. in_x86_psubsb_from_mem: begin op:=A_psubsb end;
  735. in_x86_psubq_from_mem: begin op:=A_psubq end;
  736. in_x86_psubd_from_mem: begin op:=A_psubd end;
  737. in_x86_psubw_from_mem: begin op:=A_psubw end;
  738. in_x86_psubb_from_mem: begin op:=A_psubb end;
  739. in_x86_psrlq_from_mem: begin op:=A_psrlq end;
  740. in_x86_psrld_from_mem: begin op:=A_psrld end;
  741. in_x86_psrlw_from_mem: begin op:=A_psrlw end;
  742. in_x86_psraw_from_mem: begin op:=A_psraw end;
  743. in_x86_psrad_from_mem: begin op:=A_psrad end;
  744. in_x86_psllq_from_mem: begin op:=A_psllq end;
  745. in_x86_pslld_from_mem: begin op:=A_pslld end;
  746. in_x86_psllw_from_mem: begin op:=A_psllw end;
  747. in_x86_pmuludq_from_mem: begin op:=A_pmuludq end;
  748. in_x86_pmulhuw_from_mem: begin op:=A_pmulhuw end;
  749. in_x86_pmulhw_from_mem: begin op:=A_pmulhw end;
  750. in_x86_pmullw_from_mem: begin op:=A_pmullw end;
  751. in_x86_pcmpgtd_from_mem: begin op:=A_pcmpgtd end;
  752. in_x86_pcmpgtw_from_mem: begin op:=A_pcmpgtw end;
  753. in_x86_pcmpgtb_from_mem: begin op:=A_pcmpgtb end;
  754. in_x86_pcmpeqd_from_mem: begin op:=A_pcmpeqd end;
  755. in_x86_pcmpeqw_from_mem: begin op:=A_pcmpeqw end;
  756. in_x86_pcmpeqb_from_mem: begin op:=A_pcmpeqb end;
  757. in_x86_pxor_from_mem: begin op:=A_pxor end;
  758. in_x86_por_from_mem: begin op:=A_por end;
  759. in_x86_pandn_from_mem: begin op:=A_pandn end;
  760. in_x86_pand_from_mem: begin op:=A_pand end;
  761. in_x86_paddusw_from_mem: begin op:=A_paddusw end;
  762. in_x86_paddusb_from_mem: begin op:=A_paddusb end;
  763. in_x86_paddsw_from_mem: begin op:=A_paddsw end;
  764. in_x86_paddsb_from_mem: begin op:=A_paddsb end;
  765. in_x86_paddq_from_mem: begin op:=A_paddq end;
  766. in_x86_paddd_from_mem: begin op:=A_paddd end;
  767. in_x86_paddw_from_mem: begin op:=A_paddw end;
  768. in_x86_paddb_from_mem: begin op:=A_paddb end;
  769. in_x86_packuswb_from_mem: begin op:=A_packuswb end;
  770. in_x86_packsswb_from_mem: begin op:=A_packsswb end;
  771. in_x86_packssdw_from_mem: begin op:=A_packssdw end;
  772. in_x86_cvttps2dq_from_mem: begin op:=A_cvttps2dq end;
  773. in_x86_cvttpd2dq_from_mem: begin op:=A_cvttpd2dq end;
  774. in_x86_cvtps2dq_from_mem: begin op:=A_cvtps2dq end;
  775. in_x86_cvtpd2ps_from_mem: begin op:=A_cvtpd2ps end;
  776. in_x86_cvtpd2dq_from_mem: begin op:=A_cvtpd2dq end;
  777. in_x86_cvtdq2ps_from_mem: begin op:=A_cvtdq2ps end;
  778. in_x86_unpcklpd_from_mem: begin op:=A_unpcklpd end;
  779. in_x86_unpckhpd_from_mem: begin op:=A_unpckhpd end;
  780. in_x86_xorpd_from_mem: begin op:=A_xorpd end;
  781. in_x86_orpd_from_mem: begin op:=A_orpd end;
  782. in_x86_andnpd_from_mem: begin op:=A_andnpd end;
  783. in_x86_andpd_from_mem: begin op:=A_andpd end;
  784. in_x86_subpd_from_mem: begin op:=A_subpd end;
  785. in_x86_mulpd_from_mem: begin op:=A_mulpd end;
  786. in_x86_minpd_from_mem: begin op:=A_minpd end;
  787. in_x86_maxpd_from_mem: begin op:=A_maxpd end;
  788. in_x86_divpd_from_mem: begin op:=A_divpd end;
  789. in_x86_addpd_from_mem: begin op:=A_addpd end;
  790. in_x86_unpcklps_from_mem: begin op:=A_unpcklps end;
  791. in_x86_unpckhps_from_mem: begin op:=A_unpckhps end;
  792. in_x86_andnps_from_mem: begin op:=A_andnps end;
  793. in_x86_xorps_from_mem: begin op:=A_xorps end;
  794. in_x86_orps_from_mem: begin op:=A_orps end;
  795. in_x86_andps_from_mem: begin op:=A_andps end;
  796. in_x86_rsqrtps_from_mem: begin op:=A_rsqrtps end;
  797. in_x86_minps_from_mem: begin op:=A_minps end;
  798. in_x86_maxps_from_mem: begin op:=A_maxps end;
  799. in_x86_sqrtps_from_mem: begin op:=A_sqrtps end;
  800. in_x86_rcpps_from_mem: begin op:=A_rcpps end;
  801. in_x86_divps_from_mem: begin op:=A_divps end;
  802. in_x86_mulps_from_mem: begin op:=A_mulps end;
  803. in_x86_subps_from_mem: begin op:=A_subps end;
  804. in_x86_addps_from_mem: begin op:=A_addps; end;
  805. else
  806. Internalerror(2020010201);
  807. end;
  808. GetParameters(2);
  809. for i := 1 to 2 do secondpass(paraarray[i]);
  810. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  811. location_make_ref(paraarray[2].location);
  812. location:=paraarray[1].location;
  813. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  814. end;
  815. in_x86_cmpss
  816. ,in_x86_cmpps
  817. ,in_x86_shufps
  818. ,in_x86_cmppd
  819. ,in_x86_cmpsd
  820. ,in_x86_shufpd
  821. ,in_x86_palignr
  822. ,in_x86_dpps
  823. ,in_x86_dppd
  824. ,in_x86_blendps
  825. ,in_x86_blendpd
  826. ,in_x86_insertps
  827. ,in_x86_mpsadbw
  828. ,in_x86_pblendw
  829. ,in_x86_pcmpestri
  830. ,in_x86_pcmpestrm
  831. ,in_x86_pcmpistri
  832. ,in_x86_pcmpistrm
  833. : //var r0:xmm;r1:xmm;imm:i32;
  834. begin
  835. case inlinenumber of
  836. in_x86_pcmpistrm: begin op:=A_pcmpistrm end;
  837. in_x86_pcmpistri: begin op:=A_pcmpistri end;
  838. in_x86_pcmpestrm: begin op:=A_pcmpestrm end;
  839. in_x86_pcmpestri: begin op:=A_pcmpestri end;
  840. in_x86_pblendw: begin op:=A_pblendw end;
  841. in_x86_mpsadbw: begin op:=A_mpsadbw end;
  842. in_x86_insertps: begin op:=A_insertps end;
  843. in_x86_blendpd: begin op:=A_blendpd end;
  844. in_x86_blendps: begin op:=A_blendps end;
  845. in_x86_dppd: begin op:=A_dppd end;
  846. in_x86_dpps: begin op:=A_dpps end;
  847. in_x86_palignr: begin op:=A_palignr end;
  848. in_x86_shufpd: begin op:=A_shufpd end;
  849. in_x86_cmpsd: begin op:=A_cmpsd end;
  850. in_x86_cmppd: begin op:=A_cmppd end;
  851. in_x86_shufps: begin op:=A_shufps end;
  852. in_x86_cmpps: begin op:=A_cmpps end;
  853. in_x86_cmpss: begin op:=A_cmpss; end;
  854. else
  855. Internalerror(2020010201);
  856. end;
  857. GetParameters(3);
  858. for i := 1 to 3 do secondpass(paraarray[i]);
  859. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  860. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  861. location:=paraarray[1].location;
  862. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.register));
  863. end;
  864. in_x86_cmpss_from_mem
  865. ,in_x86_insertps_from_mem
  866. ,in_x86_pinsrd_from_mem
  867. : //var r0:xmm;r1:ptr32;imm:i32;
  868. begin
  869. case inlinenumber of
  870. in_x86_pinsrd_from_mem: begin op:=A_pinsrd end;
  871. in_x86_insertps_from_mem: begin op:=A_insertps end;
  872. in_x86_cmpss_from_mem: begin op:=A_cmpss; end;
  873. else
  874. Internalerror(2020010201);
  875. end;
  876. GetParameters(3);
  877. for i := 1 to 3 do secondpass(paraarray[i]);
  878. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  879. location_make_ref(paraarray[2].location);
  880. location:=paraarray[1].location;
  881. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  882. end;
  883. in_x86_cmpps_from_mem
  884. ,in_x86_shufps_from_mem
  885. ,in_x86_cmppd_from_mem
  886. ,in_x86_shufpd_from_mem
  887. ,in_x86_palignr_from_mem
  888. ,in_x86_dpps_from_mem
  889. ,in_x86_dppd_from_mem
  890. ,in_x86_blendps_from_mem
  891. ,in_x86_blendpd_from_mem
  892. ,in_x86_mpsadbw_from_mem
  893. ,in_x86_pblendw_from_mem
  894. ,in_x86_pcmpestri_from_mem
  895. ,in_x86_pcmpestrm_from_mem
  896. ,in_x86_pcmpistri_from_mem
  897. ,in_x86_pcmpistrm_from_mem
  898. : //var r0:xmm;r1:ptr128;imm:i32;
  899. begin
  900. case inlinenumber of
  901. in_x86_pcmpistrm_from_mem: begin op:=A_pcmpistrm end;
  902. in_x86_pcmpistri_from_mem: begin op:=A_pcmpistri end;
  903. in_x86_pcmpestrm_from_mem: begin op:=A_pcmpestrm end;
  904. in_x86_pcmpestri_from_mem: begin op:=A_pcmpestri end;
  905. in_x86_pblendw_from_mem: begin op:=A_pblendw end;
  906. in_x86_mpsadbw_from_mem: begin op:=A_mpsadbw end;
  907. in_x86_blendpd_from_mem: begin op:=A_blendpd end;
  908. in_x86_blendps_from_mem: begin op:=A_blendps end;
  909. in_x86_dppd_from_mem: begin op:=A_dppd end;
  910. in_x86_dpps_from_mem: begin op:=A_dpps end;
  911. in_x86_palignr_from_mem: begin op:=A_palignr end;
  912. in_x86_shufpd_from_mem: begin op:=A_shufpd end;
  913. in_x86_cmppd_from_mem: begin op:=A_cmppd end;
  914. in_x86_shufps_from_mem: begin op:=A_shufps end;
  915. in_x86_cmpps_from_mem: begin op:=A_cmpps; end;
  916. else
  917. Internalerror(2020010201);
  918. end;
  919. GetParameters(3);
  920. for i := 1 to 3 do secondpass(paraarray[i]);
  921. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  922. location_make_ref(paraarray[2].location);
  923. location:=paraarray[1].location;
  924. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  925. end;
  926. in_x86_cvtsi2ss
  927. : //var r0:xmm;r1:reg;
  928. begin
  929. case inlinenumber of
  930. in_x86_cvtsi2ss: begin op:=A_cvtsi2ss; end;
  931. else
  932. Internalerror(2020010201);
  933. end;
  934. GetParameters(2);
  935. for i := 1 to 2 do secondpass(paraarray[i]);
  936. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  937. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[2].location, paraarray[2].resultdef,uinttype,true);
  938. location:=paraarray[1].location;
  939. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  940. end;
  941. in_x86_cvtss2si
  942. ,in_x86_cvttss2si
  943. : //out r0:reg;r1:xmm;
  944. begin
  945. case inlinenumber of
  946. in_x86_cvttss2si: begin op:=A_cvttss2si end;
  947. in_x86_cvtss2si: begin op:=A_cvtss2si; end;
  948. else
  949. Internalerror(2020010201);
  950. end;
  951. GetParameters(1);
  952. for i := 1 to 1 do secondpass(paraarray[i]);
  953. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  954. location_reset(location,LOC_REGISTER,OS_INT);
  955. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
  956. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  957. end;
  958. in_x86_cvtss2si_from_mem
  959. ,in_x86_cvttss2si_from_mem
  960. : //out r0:reg;r1:ptr32;
  961. begin
  962. case inlinenumber of
  963. in_x86_cvttss2si_from_mem: begin op:=A_cvttss2si end;
  964. in_x86_cvtss2si_from_mem: begin op:=A_cvtss2si; end;
  965. else
  966. Internalerror(2020010201);
  967. end;
  968. GetParameters(1);
  969. for i := 1 to 1 do secondpass(paraarray[i]);
  970. location_make_ref(paraarray[1].location);
  971. location_reset(location,LOC_REGISTER,OS_INT);
  972. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
  973. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  974. end;
  975. in_x86_cvtpi2ps
  976. ,in_x86_cvtpi2pd
  977. : //var r0:xmm;r1:mm;
  978. begin
  979. case inlinenumber of
  980. in_x86_cvtpi2pd: begin op:=A_cvtpi2pd end;
  981. in_x86_cvtpi2ps: begin op:=A_cvtpi2ps; end;
  982. else
  983. Internalerror(2020010201);
  984. end;
  985. GetParameters(2);
  986. for i := 1 to 2 do secondpass(paraarray[i]);
  987. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  988. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  989. location:=paraarray[1].location;
  990. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  991. end;
  992. in_x86_cvtps2pi
  993. ,in_x86_cvttps2pi
  994. ,in_x86_movdq2q
  995. : //out r0:mm;r1:xmm;
  996. begin
  997. case inlinenumber of
  998. in_x86_movdq2q: begin op:=A_movdq2q end;
  999. in_x86_cvttps2pi: begin op:=A_cvttps2pi end;
  1000. in_x86_cvtps2pi: begin op:=A_cvtps2pi; end;
  1001. else
  1002. Internalerror(2020010201);
  1003. end;
  1004. GetParameters(1);
  1005. for i := 1 to 1 do secondpass(paraarray[i]);
  1006. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1007. location_reset(location,LOC_MMXREGISTER,OS_M64);
  1008. location.register:=tcgx86(cg).getmmxregister(current_asmdata.CurrAsmList);
  1009. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1010. end;
  1011. in_x86_cvtps2pi_from_mem
  1012. ,in_x86_cvttps2pi_from_mem
  1013. : //out r0:mm;r1:ptr64;
  1014. begin
  1015. case inlinenumber of
  1016. in_x86_cvttps2pi_from_mem: begin op:=A_cvttps2pi end;
  1017. in_x86_cvtps2pi_from_mem: begin op:=A_cvtps2pi; end;
  1018. else
  1019. Internalerror(2020010201);
  1020. end;
  1021. GetParameters(1);
  1022. for i := 1 to 1 do secondpass(paraarray[i]);
  1023. location_make_ref(paraarray[1].location);
  1024. location_reset(location,LOC_MMXREGISTER,OS_M64);
  1025. location.register:=tcgx86(cg).getmmxregister(current_asmdata.CurrAsmList);
  1026. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  1027. end;
  1028. in_x86_pmulhuw_mmx
  1029. ,in_x86_psadbw_mmx
  1030. ,in_x86_pavgb_mmx
  1031. ,in_x86_pavgw_mmx
  1032. ,in_x86_pmaxub_mmx
  1033. ,in_x86_pminub_mmx
  1034. ,in_x86_pmaxsw_mmx
  1035. ,in_x86_pminsw_mmx
  1036. : //var r0:mm;r1:mm;
  1037. begin
  1038. case inlinenumber of
  1039. in_x86_pminsw_mmx: begin op:=A_pminsw end;
  1040. in_x86_pmaxsw_mmx: begin op:=A_pmaxsw end;
  1041. in_x86_pminub_mmx: begin op:=A_pminub end;
  1042. in_x86_pmaxub_mmx: begin op:=A_pmaxub end;
  1043. in_x86_pavgw_mmx: begin op:=A_pavgw end;
  1044. in_x86_pavgb_mmx: begin op:=A_pavgb end;
  1045. in_x86_psadbw_mmx: begin op:=A_psadbw end;
  1046. in_x86_pmulhuw_mmx: begin op:=A_pmulhuw; end;
  1047. else
  1048. Internalerror(2020010201);
  1049. end;
  1050. GetParameters(2);
  1051. for i := 1 to 2 do secondpass(paraarray[i]);
  1052. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1053. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1054. location:=paraarray[1].location;
  1055. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1056. end;
  1057. in_x86_pmulhuw_mmx_from_mem
  1058. ,in_x86_psadbw_mmx_from_mem
  1059. ,in_x86_pavgb_mmx_from_mem
  1060. ,in_x86_pavgw_mmx_from_mem
  1061. ,in_x86_pmaxub_mmx_from_mem
  1062. ,in_x86_pminub_mmx_from_mem
  1063. ,in_x86_pmaxsw_mmx_from_mem
  1064. ,in_x86_pminsw_mmx_from_mem
  1065. : //var r0:mm;r1:ptr64;
  1066. begin
  1067. case inlinenumber of
  1068. in_x86_pminsw_mmx_from_mem: begin op:=A_pminsw end;
  1069. in_x86_pmaxsw_mmx_from_mem: begin op:=A_pmaxsw end;
  1070. in_x86_pminub_mmx_from_mem: begin op:=A_pminub end;
  1071. in_x86_pmaxub_mmx_from_mem: begin op:=A_pmaxub end;
  1072. in_x86_pavgw_mmx_from_mem: begin op:=A_pavgw end;
  1073. in_x86_pavgb_mmx_from_mem: begin op:=A_pavgb end;
  1074. in_x86_psadbw_mmx_from_mem: begin op:=A_psadbw end;
  1075. in_x86_pmulhuw_mmx_from_mem: begin op:=A_pmulhuw; end;
  1076. else
  1077. Internalerror(2020010201);
  1078. end;
  1079. GetParameters(2);
  1080. for i := 1 to 2 do secondpass(paraarray[i]);
  1081. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1082. location_make_ref(paraarray[2].location);
  1083. location:=paraarray[1].location;
  1084. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  1085. end;
  1086. in_x86_pextrw_mmx
  1087. : //out r0:reg;r1:mm;imm:i32;
  1088. begin
  1089. case inlinenumber of
  1090. in_x86_pextrw_mmx: begin op:=A_pextrw; end;
  1091. else
  1092. Internalerror(2020010201);
  1093. end;
  1094. GetParameters(2);
  1095. for i := 1 to 2 do secondpass(paraarray[i]);
  1096. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1097. location_reset(location,LOC_REGISTER,OS_INT);
  1098. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
  1099. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1100. end;
  1101. in_x86_pinsrw_mmx
  1102. : //var r0:mm;r1:reg;imm:i32;
  1103. begin
  1104. case inlinenumber of
  1105. in_x86_pinsrw_mmx: begin op:=A_pinsrw; end;
  1106. else
  1107. Internalerror(2020010201);
  1108. end;
  1109. GetParameters(3);
  1110. for i := 1 to 3 do secondpass(paraarray[i]);
  1111. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1112. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[2].location, paraarray[2].resultdef,uinttype,true);
  1113. location:=paraarray[1].location;
  1114. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.register));
  1115. end;
  1116. in_x86_pmovmskb_mmx
  1117. : //out r0:reg;r1:mm;
  1118. begin
  1119. case inlinenumber of
  1120. in_x86_pmovmskb_mmx: begin op:=A_pmovmskb; end;
  1121. else
  1122. Internalerror(2020010201);
  1123. end;
  1124. GetParameters(1);
  1125. for i := 1 to 1 do secondpass(paraarray[i]);
  1126. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1127. location_reset(location,LOC_REGISTER,OS_INT);
  1128. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_INT);
  1129. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1130. end;
  1131. in_x86_pshufw
  1132. : //out r0:mm;r1:mm;imm:i32;
  1133. begin
  1134. case inlinenumber of
  1135. in_x86_pshufw: begin op:=A_pshufw; end;
  1136. else
  1137. Internalerror(2020010201);
  1138. end;
  1139. GetParameters(2);
  1140. for i := 1 to 2 do secondpass(paraarray[i]);
  1141. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1142. location_reset(location,LOC_MMXREGISTER,OS_M64);
  1143. location.register:=tcgx86(cg).getmmxregister(current_asmdata.CurrAsmList);
  1144. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1145. end;
  1146. in_x86_pshufw_from_mem
  1147. : //out r0:mm;r1:ptr64;imm:i32;
  1148. begin
  1149. case inlinenumber of
  1150. in_x86_pshufw_from_mem: begin op:=A_pshufw; end;
  1151. else
  1152. Internalerror(2020010201);
  1153. end;
  1154. GetParameters(2);
  1155. for i := 1 to 2 do secondpass(paraarray[i]);
  1156. location_make_ref(paraarray[1].location);
  1157. location_reset(location,LOC_MMXREGISTER,OS_M64);
  1158. location.register:=tcgx86(cg).getmmxregister(current_asmdata.CurrAsmList);
  1159. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.reference,location.register));
  1160. end;
  1161. in_x86_movmskpd
  1162. ,in_x86_movd_to_reg
  1163. : //out r0:r32;r1:xmm;
  1164. begin
  1165. case inlinenumber of
  1166. in_x86_movd_to_reg: begin op:=A_movd end;
  1167. in_x86_movmskpd: begin op:=A_movmskpd; end;
  1168. else
  1169. Internalerror(2020010201);
  1170. end;
  1171. GetParameters(1);
  1172. for i := 1 to 1 do secondpass(paraarray[i]);
  1173. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1174. location_reset(location,LOC_REGISTER,OS_32);
  1175. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_32);
  1176. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1177. end;
  1178. in_x86_movsd_to_val
  1179. : //out r0:f64;r1:xmm;
  1180. begin
  1181. case inlinenumber of
  1182. in_x86_movsd_to_val: begin op:=A_movsd; end;
  1183. else
  1184. Internalerror(2020010201);
  1185. end;
  1186. GetParameters(1);
  1187. for i := 1 to 1 do secondpass(paraarray[i]);
  1188. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1189. location_reset(location,LOC_MMREGISTER,OS_M128);
  1190. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1191. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1192. end;
  1193. in_x86_movsd_from_val
  1194. : //out r0:xmm;r1:f64;
  1195. begin
  1196. case inlinenumber of
  1197. in_x86_movsd_from_val: begin op:=A_movsd; end;
  1198. else
  1199. Internalerror(2020010201);
  1200. end;
  1201. GetParameters(1);
  1202. for i := 1 to 1 do secondpass(paraarray[i]);
  1203. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1204. location_reset(location,LOC_MMREGISTER,OS_M128);
  1205. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1206. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1207. end;
  1208. in_x86_sqrtpd
  1209. ,in_x86_sqrtsd
  1210. ,in_x86_movddup
  1211. ,in_x86_movsldup
  1212. ,in_x86_movshdup
  1213. ,in_x86_pabsb
  1214. ,in_x86_pabsw
  1215. ,in_x86_pabsd
  1216. ,in_x86_pmovsxbw
  1217. ,in_x86_pmovzxbw
  1218. ,in_x86_pmovsxbd
  1219. ,in_x86_pmovzxbd
  1220. ,in_x86_pmovsxbq
  1221. ,in_x86_pmovzxbq
  1222. ,in_x86_pmovsxwd
  1223. ,in_x86_pmovzxwd
  1224. ,in_x86_pmovsxwq
  1225. ,in_x86_pmovzxwq
  1226. ,in_x86_pmovsxdq
  1227. ,in_x86_pmovzxdq
  1228. : //out r0:xmm;r1:xmm;
  1229. begin
  1230. case inlinenumber of
  1231. in_x86_pmovzxdq: begin op:=A_pmovzxdq end;
  1232. in_x86_pmovsxdq: begin op:=A_pmovsxdq end;
  1233. in_x86_pmovzxwq: begin op:=A_pmovzxwq end;
  1234. in_x86_pmovsxwq: begin op:=A_pmovsxwq end;
  1235. in_x86_pmovzxwd: begin op:=A_pmovzxwd end;
  1236. in_x86_pmovsxwd: begin op:=A_pmovsxwd end;
  1237. in_x86_pmovzxbq: begin op:=A_pmovzxbq end;
  1238. in_x86_pmovsxbq: begin op:=A_pmovsxbq end;
  1239. in_x86_pmovzxbd: begin op:=A_pmovzxbd end;
  1240. in_x86_pmovsxbd: begin op:=A_pmovsxbd end;
  1241. in_x86_pmovzxbw: begin op:=A_pmovzxbw end;
  1242. in_x86_pmovsxbw: begin op:=A_pmovsxbw end;
  1243. in_x86_pabsd: begin op:=A_pabsd end;
  1244. in_x86_pabsw: begin op:=A_pabsw end;
  1245. in_x86_pabsb: begin op:=A_pabsb end;
  1246. in_x86_movshdup: begin op:=A_movshdup end;
  1247. in_x86_movsldup: begin op:=A_movsldup end;
  1248. in_x86_movddup: begin op:=A_movddup end;
  1249. in_x86_sqrtsd: begin op:=A_sqrtsd end;
  1250. in_x86_sqrtpd: begin op:=A_sqrtpd; end;
  1251. else
  1252. Internalerror(2020010201);
  1253. end;
  1254. GetParameters(1);
  1255. for i := 1 to 1 do secondpass(paraarray[i]);
  1256. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1257. location_reset(location,LOC_MMREGISTER,OS_M128);
  1258. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1259. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1260. end;
  1261. in_x86_sqrtsd_from_mem
  1262. ,in_x86_movq_from_mem
  1263. ,in_x86_movddup_from_mem
  1264. ,in_x86_pmovsxbw_from_mem
  1265. ,in_x86_pmovzxbw_from_mem
  1266. ,in_x86_pmovsxwd_from_mem
  1267. ,in_x86_pmovzxwd_from_mem
  1268. ,in_x86_pmovsxdq_from_mem
  1269. ,in_x86_pmovzxdq_from_mem
  1270. : //out r0:xmm;r1:ptr64;
  1271. begin
  1272. case inlinenumber of
  1273. in_x86_pmovzxdq_from_mem: begin op:=A_pmovzxdq end;
  1274. in_x86_pmovsxdq_from_mem: begin op:=A_pmovsxdq end;
  1275. in_x86_pmovzxwd_from_mem: begin op:=A_pmovzxwd end;
  1276. in_x86_pmovsxwd_from_mem: begin op:=A_pmovsxwd end;
  1277. in_x86_pmovzxbw_from_mem: begin op:=A_pmovzxbw end;
  1278. in_x86_pmovsxbw_from_mem: begin op:=A_pmovsxbw end;
  1279. in_x86_movddup_from_mem: begin op:=A_movddup end;
  1280. in_x86_movq_from_mem: begin op:=A_movq end;
  1281. in_x86_sqrtsd_from_mem: begin op:=A_sqrtsd; end;
  1282. else
  1283. Internalerror(2020010201);
  1284. end;
  1285. GetParameters(1);
  1286. for i := 1 to 1 do secondpass(paraarray[i]);
  1287. location_make_ref(paraarray[1].location);
  1288. location_reset(location,LOC_MMREGISTER,OS_M128);
  1289. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1290. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  1291. end;
  1292. in_x86_cmpsd_from_mem
  1293. : //var r0:xmm;r1:ptr64;imm:i32;
  1294. begin
  1295. case inlinenumber of
  1296. in_x86_cmpsd_from_mem: begin op:=A_cmpsd; end;
  1297. else
  1298. Internalerror(2020010201);
  1299. end;
  1300. GetParameters(3);
  1301. for i := 1 to 3 do secondpass(paraarray[i]);
  1302. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1303. location_make_ref(paraarray[2].location);
  1304. location:=paraarray[1].location;
  1305. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  1306. end;
  1307. in_x86_cvtpd2pi
  1308. ,in_x86_cvttpd2pi
  1309. : //var r0:mm;r1:xmm;
  1310. begin
  1311. case inlinenumber of
  1312. in_x86_cvttpd2pi: begin op:=A_cvttpd2pi end;
  1313. in_x86_cvtpd2pi: begin op:=A_cvtpd2pi; end;
  1314. else
  1315. Internalerror(2020010201);
  1316. end;
  1317. GetParameters(2);
  1318. for i := 1 to 2 do secondpass(paraarray[i]);
  1319. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1320. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1321. location:=paraarray[1].location;
  1322. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1323. end;
  1324. in_x86_cvtpd2pi_from_mem
  1325. ,in_x86_cvttpd2pi_from_mem
  1326. : //var r0:mm;r1:ptr128;
  1327. begin
  1328. case inlinenumber of
  1329. in_x86_cvttpd2pi_from_mem: begin op:=A_cvttpd2pi end;
  1330. in_x86_cvtpd2pi_from_mem: begin op:=A_cvtpd2pi; end;
  1331. else
  1332. Internalerror(2020010201);
  1333. end;
  1334. GetParameters(2);
  1335. for i := 1 to 2 do secondpass(paraarray[i]);
  1336. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1337. location_make_ref(paraarray[2].location);
  1338. location:=paraarray[1].location;
  1339. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  1340. end;
  1341. in_x86_cvtsd2si
  1342. ,in_x86_cvttsd2si
  1343. : //var r0:sreg;r1:xmm;
  1344. begin
  1345. case inlinenumber of
  1346. in_x86_cvttsd2si: begin op:=A_cvttsd2si end;
  1347. in_x86_cvtsd2si: begin op:=A_cvtsd2si; end;
  1348. else
  1349. Internalerror(2020010201);
  1350. end;
  1351. GetParameters(2);
  1352. for i := 1 to 2 do secondpass(paraarray[i]);
  1353. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[1].location, paraarray[1].resultdef,sinttype,false);
  1354. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1355. location:=paraarray[1].location;
  1356. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1357. end;
  1358. in_x86_cvtsd2si_from_mem
  1359. ,in_x86_cvttsd2si_from_mem
  1360. : //var r0:sreg;r1:ptr64;
  1361. begin
  1362. case inlinenumber of
  1363. in_x86_cvttsd2si_from_mem: begin op:=A_cvttsd2si end;
  1364. in_x86_cvtsd2si_from_mem: begin op:=A_cvtsd2si; end;
  1365. else
  1366. Internalerror(2020010201);
  1367. end;
  1368. GetParameters(2);
  1369. for i := 1 to 2 do secondpass(paraarray[i]);
  1370. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[1].location, paraarray[1].resultdef,sinttype,false);
  1371. location_make_ref(paraarray[2].location);
  1372. location:=paraarray[1].location;
  1373. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  1374. end;
  1375. in_x86_cvtsi2sd
  1376. : //var r0:xmm;r1:r32;
  1377. begin
  1378. case inlinenumber of
  1379. in_x86_cvtsi2sd: begin op:=A_cvtsi2sd; end;
  1380. else
  1381. Internalerror(2020010201);
  1382. end;
  1383. GetParameters(2);
  1384. for i := 1 to 2 do secondpass(paraarray[i]);
  1385. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1386. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[2].location, paraarray[2].resultdef,u32inttype,true);
  1387. location:=paraarray[1].location;
  1388. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1389. end;
  1390. in_x86_movd_from_reg
  1391. : //out r0:xmm;r1:r32;
  1392. begin
  1393. case inlinenumber of
  1394. in_x86_movd_from_reg: begin op:=A_movd; end;
  1395. else
  1396. Internalerror(2020010201);
  1397. end;
  1398. GetParameters(1);
  1399. for i := 1 to 1 do secondpass(paraarray[i]);
  1400. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[1].location, paraarray[1].resultdef,u32inttype,true);
  1401. location_reset(location,LOC_MMREGISTER,OS_M128);
  1402. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1403. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1404. end;
  1405. in_x86_pmovmskb
  1406. : //var r0:r32;r1:xmm;
  1407. begin
  1408. case inlinenumber of
  1409. in_x86_pmovmskb: begin op:=A_pmovmskb; end;
  1410. else
  1411. Internalerror(2020010201);
  1412. end;
  1413. GetParameters(2);
  1414. for i := 1 to 2 do secondpass(paraarray[i]);
  1415. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[1].location, paraarray[1].resultdef,u32inttype,false);
  1416. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1417. location:=paraarray[1].location;
  1418. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1419. end;
  1420. in_x86_pextrw_sse2
  1421. : //out r0:r16;r1:xmm;imm:i32;
  1422. begin
  1423. case inlinenumber of
  1424. in_x86_pextrw_sse2: begin op:=A_pextrw; end;
  1425. else
  1426. Internalerror(2020010201);
  1427. end;
  1428. GetParameters(2);
  1429. for i := 1 to 2 do secondpass(paraarray[i]);
  1430. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1431. location_reset(location,LOC_REGISTER,OS_16);
  1432. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_16);
  1433. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1434. end;
  1435. in_x86_pinsrw_sse2
  1436. ,in_x86_pinsrb
  1437. ,in_x86_pinsrd
  1438. : //var r0:xmm;r1:r32;imm:i32;
  1439. begin
  1440. case inlinenumber of
  1441. in_x86_pinsrd: begin op:=A_pinsrd end;
  1442. in_x86_pinsrb: begin op:=A_pinsrb end;
  1443. in_x86_pinsrw_sse2: begin op:=A_pinsrw; end;
  1444. else
  1445. Internalerror(2020010201);
  1446. end;
  1447. GetParameters(3);
  1448. for i := 1 to 3 do secondpass(paraarray[i]);
  1449. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1450. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[2].location, paraarray[2].resultdef,u32inttype,true);
  1451. location:=paraarray[1].location;
  1452. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.register));
  1453. end;
  1454. in_x86_pinsrw_from_mem
  1455. : //var r0:xmm;r1:ptr16;imm:i32;
  1456. begin
  1457. case inlinenumber of
  1458. in_x86_pinsrw_from_mem: begin op:=A_pinsrw; end;
  1459. else
  1460. Internalerror(2020010201);
  1461. end;
  1462. GetParameters(3);
  1463. for i := 1 to 3 do secondpass(paraarray[i]);
  1464. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1465. location_make_ref(paraarray[2].location);
  1466. location:=paraarray[1].location;
  1467. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  1468. end;
  1469. in_x86_psllw_sse2_imm
  1470. ,in_x86_pslld_sse2_imm
  1471. ,in_x86_psllq_sse2_imm
  1472. ,in_x86_psrad_sse2_imm
  1473. ,in_x86_psraw_sse2_imm
  1474. ,in_x86_psrlw_sse2_imm
  1475. ,in_x86_psrld_sse2_imm
  1476. ,in_x86_psrlq_sse2_imm
  1477. ,in_x86_pslldq
  1478. ,in_x86_psrldq
  1479. : //var r0:xmm;imm:i32;
  1480. begin
  1481. case inlinenumber of
  1482. in_x86_psrldq: begin op:=A_psrldq end;
  1483. in_x86_pslldq: begin op:=A_pslldq end;
  1484. in_x86_psrlq_sse2_imm: begin op:=A_psrlq end;
  1485. in_x86_psrld_sse2_imm: begin op:=A_psrld end;
  1486. in_x86_psrlw_sse2_imm: begin op:=A_psrlw end;
  1487. in_x86_psraw_sse2_imm: begin op:=A_psraw end;
  1488. in_x86_psrad_sse2_imm: begin op:=A_psrad end;
  1489. in_x86_psllq_sse2_imm: begin op:=A_psllq end;
  1490. in_x86_pslld_sse2_imm: begin op:=A_pslld end;
  1491. in_x86_psllw_sse2_imm: begin op:=A_psllw; end;
  1492. else
  1493. Internalerror(2020010201);
  1494. end;
  1495. GetParameters(2);
  1496. for i := 1 to 2 do secondpass(paraarray[i]);
  1497. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1498. location:=paraarray[1].location;
  1499. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register));
  1500. end;
  1501. in_x86_maskmovdqu
  1502. : //addr:edi_ptr;r0:xmm;r1:xmm;
  1503. begin
  1504. case inlinenumber of
  1505. in_x86_maskmovdqu: begin op:=A_maskmovdqu; end;
  1506. else
  1507. Internalerror(2020010201);
  1508. end;
  1509. GetParameters(3);
  1510. for i := 1 to 3 do secondpass(paraarray[i]);
  1511. hlcg.getcpuregister(current_asmdata.CurrAsmList,{$if defined(cpu64bitalu)}NR_RDI{$else}NR_EDI{$endif});
  1512. hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,paraarray[1].resultdef,voidpointertype,paraarray[1].location,{$if defined(cpu64bitalu)}NR_RDI{$else}NR_EDI{$endif});
  1513. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1514. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[3].location, true);
  1515. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[3].location.register,paraarray[2].location.register));
  1516. hlcg.ungetcpuregister(current_asmdata.CurrAsmList,{$if defined(cpu64bitalu)}NR_RDI{$else}NR_EDI{$endif});
  1517. end;
  1518. in_x86_movq2dq
  1519. : //out r0:xmm;r1:mm;
  1520. begin
  1521. case inlinenumber of
  1522. in_x86_movq2dq: begin op:=A_movq2dq; end;
  1523. else
  1524. Internalerror(2020010201);
  1525. end;
  1526. GetParameters(1);
  1527. for i := 1 to 1 do secondpass(paraarray[i]);
  1528. location_force_mmxreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1529. location_reset(location,LOC_MMREGISTER,OS_M128);
  1530. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1531. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[1].location.register,location.register));
  1532. end;
  1533. in_x86_pshufhw
  1534. ,in_x86_pshuflw
  1535. ,in_x86_pshufd
  1536. ,in_x86_roundps
  1537. ,in_x86_roundss
  1538. ,in_x86_roundpd
  1539. ,in_x86_roundsd
  1540. : //out r0:xmm;r1:xmm;imm:i32;
  1541. begin
  1542. case inlinenumber of
  1543. in_x86_roundsd: begin op:=A_roundsd end;
  1544. in_x86_roundpd: begin op:=A_roundpd end;
  1545. in_x86_roundss: begin op:=A_roundss end;
  1546. in_x86_roundps: begin op:=A_roundps end;
  1547. in_x86_pshufd: begin op:=A_pshufd end;
  1548. in_x86_pshuflw: begin op:=A_pshuflw end;
  1549. in_x86_pshufhw: begin op:=A_pshufhw; end;
  1550. else
  1551. Internalerror(2020010201);
  1552. end;
  1553. GetParameters(2);
  1554. for i := 1 to 2 do secondpass(paraarray[i]);
  1555. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1556. location_reset(location,LOC_MMREGISTER,OS_M128);
  1557. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1558. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1559. end;
  1560. in_x86_pshufhw_from_mem
  1561. ,in_x86_pshuflw_from_mem
  1562. ,in_x86_pshufd_from_mem
  1563. ,in_x86_roundps_from_mem
  1564. ,in_x86_roundpd_from_mem
  1565. : //out r0:xmm;r1:ptr128;imm:i32;
  1566. begin
  1567. case inlinenumber of
  1568. in_x86_roundpd_from_mem: begin op:=A_roundpd end;
  1569. in_x86_roundps_from_mem: begin op:=A_roundps end;
  1570. in_x86_pshufd_from_mem: begin op:=A_pshufd end;
  1571. in_x86_pshuflw_from_mem: begin op:=A_pshuflw end;
  1572. in_x86_pshufhw_from_mem: begin op:=A_pshufhw; end;
  1573. else
  1574. Internalerror(2020010201);
  1575. end;
  1576. GetParameters(2);
  1577. for i := 1 to 2 do secondpass(paraarray[i]);
  1578. location_make_ref(paraarray[1].location);
  1579. location_reset(location,LOC_MMREGISTER,OS_M128);
  1580. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1581. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.reference,location.register));
  1582. end;
  1583. in_x86_blendvps
  1584. ,in_x86_blendvpd
  1585. ,in_x86_pblendvb
  1586. : //var r0:xmm;r1:xmm;mask:implicit_xmm0;
  1587. begin
  1588. case inlinenumber of
  1589. in_x86_pblendvb: begin op:=A_pblendvb end;
  1590. in_x86_blendvpd: begin op:=A_blendvpd end;
  1591. in_x86_blendvps: begin op:=A_blendvps; end;
  1592. else
  1593. Internalerror(2020010201);
  1594. end;
  1595. GetParameters(3);
  1596. for i := 1 to 3 do secondpass(paraarray[i]);
  1597. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1598. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1599. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[3].location, true);
  1600. hlcg.getcpuregister(current_asmdata.CurrAsmList,NR_XMM0);
  1601. hlcg.a_loadmm_loc_reg(current_asmdata.CurrAsmList,paraarray[3].resultdef,x86_m128type,paraarray[3].location,NR_XMM0,nil);
  1602. location:=paraarray[1].location;
  1603. current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(op,S_NO,paraarray[2].location.register,paraarray[1].location.register));
  1604. hlcg.ungetcpuregister(current_asmdata.CurrAsmList,NR_XMM0);
  1605. end;
  1606. in_x86_blendvps_from_mem
  1607. ,in_x86_blendvpd_from_mem
  1608. ,in_x86_pblendvb_from_mem
  1609. : //var r0:xmm;r1:ptr128;mask:implicit_xmm0;
  1610. begin
  1611. case inlinenumber of
  1612. in_x86_pblendvb_from_mem: begin op:=A_pblendvb end;
  1613. in_x86_blendvpd_from_mem: begin op:=A_blendvpd end;
  1614. in_x86_blendvps_from_mem: begin op:=A_blendvps; end;
  1615. else
  1616. Internalerror(2020010201);
  1617. end;
  1618. GetParameters(3);
  1619. for i := 1 to 3 do secondpass(paraarray[i]);
  1620. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1621. location_make_ref(paraarray[2].location);
  1622. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[3].location, true);
  1623. hlcg.getcpuregister(current_asmdata.CurrAsmList,NR_XMM0);
  1624. hlcg.a_loadmm_loc_reg(current_asmdata.CurrAsmList,paraarray[3].resultdef,x86_m128type,paraarray[3].location,NR_XMM0,nil);
  1625. location:=paraarray[1].location;
  1626. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[2].location.reference,paraarray[1].location.register));
  1627. hlcg.ungetcpuregister(current_asmdata.CurrAsmList,NR_XMM0);
  1628. end;
  1629. in_x86_roundss_from_mem
  1630. : //out r0:xmm;r1:ptr32;imm:i32;
  1631. begin
  1632. case inlinenumber of
  1633. in_x86_roundss_from_mem: begin op:=A_roundss; end;
  1634. else
  1635. Internalerror(2020010201);
  1636. end;
  1637. GetParameters(2);
  1638. for i := 1 to 2 do secondpass(paraarray[i]);
  1639. location_make_ref(paraarray[1].location);
  1640. location_reset(location,LOC_MMREGISTER,OS_M128);
  1641. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1642. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.reference,location.register));
  1643. end;
  1644. in_x86_roundsd_from_mem
  1645. : //out r0:xmm;r1:ptr64;imm:i32;
  1646. begin
  1647. case inlinenumber of
  1648. in_x86_roundsd_from_mem: begin op:=A_roundsd; end;
  1649. else
  1650. Internalerror(2020010201);
  1651. end;
  1652. GetParameters(2);
  1653. for i := 1 to 2 do secondpass(paraarray[i]);
  1654. location_make_ref(paraarray[1].location);
  1655. location_reset(location,LOC_MMREGISTER,OS_M128);
  1656. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1657. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.reference,location.register));
  1658. end;
  1659. in_x86_extractps
  1660. ,in_x86_pextrd
  1661. : //out r0:r32;r1:xmm;imm:i32;
  1662. begin
  1663. case inlinenumber of
  1664. in_x86_pextrd: begin op:=A_pextrd end;
  1665. in_x86_extractps: begin op:=A_extractps; end;
  1666. else
  1667. Internalerror(2020010201);
  1668. end;
  1669. GetParameters(2);
  1670. for i := 1 to 2 do secondpass(paraarray[i]);
  1671. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1672. location_reset(location,LOC_REGISTER,OS_32);
  1673. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_32);
  1674. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1675. end;
  1676. in_x86_extractps_from_mem
  1677. ,in_x86_pextrd_to_mem
  1678. : //r0:ptr32;r1:xmm;imm:i32;
  1679. begin
  1680. case inlinenumber of
  1681. in_x86_pextrd_to_mem: begin op:=A_pextrd end;
  1682. in_x86_extractps_from_mem: begin op:=A_extractps; end;
  1683. else
  1684. Internalerror(2020010201);
  1685. end;
  1686. GetParameters(3);
  1687. for i := 1 to 3 do secondpass(paraarray[i]);
  1688. location_make_ref(paraarray[1].location);
  1689. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1690. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_ref(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.reference));
  1691. end;
  1692. in_x86_pinsrb_from_mem
  1693. : //var r0:xmm;r1:ptr8;imm:i32;
  1694. begin
  1695. case inlinenumber of
  1696. in_x86_pinsrb_from_mem: begin op:=A_pinsrb; end;
  1697. else
  1698. Internalerror(2020010201);
  1699. end;
  1700. GetParameters(3);
  1701. for i := 1 to 3 do secondpass(paraarray[i]);
  1702. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1703. location_make_ref(paraarray[2].location);
  1704. location:=paraarray[1].location;
  1705. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  1706. end;
  1707. {$ifdef X86_64}
  1708. in_x86_pinsrq
  1709. : //var r0:xmm;r1:reg;imm:i32;
  1710. begin
  1711. case inlinenumber of
  1712. in_x86_pinsrq: begin op:=A_pinsrq; end;
  1713. else
  1714. Internalerror(2020010201);
  1715. end;
  1716. GetParameters(3);
  1717. for i := 1 to 3 do secondpass(paraarray[i]);
  1718. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1719. hlcg.location_force_reg(current_asmdata.CurrAsmList, paraarray[2].location, paraarray[2].resultdef,uinttype,true);
  1720. location:=paraarray[1].location;
  1721. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.register));
  1722. end;
  1723. {$endif}
  1724. {$ifdef X86_64}
  1725. in_x86_pinsrq_from_mem
  1726. : //var r0:xmm;r1:ptr64;imm:i32;
  1727. begin
  1728. case inlinenumber of
  1729. in_x86_pinsrq_from_mem: begin op:=A_pinsrq; end;
  1730. else
  1731. Internalerror(2020010201);
  1732. end;
  1733. GetParameters(3);
  1734. for i := 1 to 3 do secondpass(paraarray[i]);
  1735. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, false);
  1736. location_make_ref(paraarray[2].location);
  1737. location:=paraarray[1].location;
  1738. current_asmdata.CurrAsmList.concat(taicpu.op_const_ref_reg(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.reference,paraarray[1].location.register));
  1739. end;
  1740. {$endif}
  1741. in_x86_pextrb
  1742. : //out r0:r8;r1:xmm;imm:i32;
  1743. begin
  1744. case inlinenumber of
  1745. in_x86_pextrb: begin op:=A_pextrb; end;
  1746. else
  1747. Internalerror(2020010201);
  1748. end;
  1749. GetParameters(2);
  1750. for i := 1 to 2 do secondpass(paraarray[i]);
  1751. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1752. location_reset(location,LOC_REGISTER,OS_8);
  1753. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_8);
  1754. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1755. end;
  1756. in_x86_pextrb_to_mem
  1757. : //r0:ptr8;r1:xmm;imm:i32;
  1758. begin
  1759. case inlinenumber of
  1760. in_x86_pextrb_to_mem: begin op:=A_pextrb; end;
  1761. else
  1762. Internalerror(2020010201);
  1763. end;
  1764. GetParameters(3);
  1765. for i := 1 to 3 do secondpass(paraarray[i]);
  1766. location_make_ref(paraarray[1].location);
  1767. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1768. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_ref(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.reference));
  1769. end;
  1770. in_x86_pextrw_sse41_to_mem
  1771. : //r0:ptr16;r1:xmm;imm:i32;
  1772. begin
  1773. case inlinenumber of
  1774. in_x86_pextrw_sse41_to_mem: begin op:=A_pextrw; end;
  1775. else
  1776. Internalerror(2020010201);
  1777. end;
  1778. GetParameters(3);
  1779. for i := 1 to 3 do secondpass(paraarray[i]);
  1780. location_make_ref(paraarray[1].location);
  1781. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1782. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_ref(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.reference));
  1783. end;
  1784. {$ifdef X86_64}
  1785. in_x86_pextrq
  1786. : //out r0:r32;r1:xmm;imm:i32;
  1787. begin
  1788. case inlinenumber of
  1789. in_x86_pextrq: begin op:=A_pextrq; end;
  1790. else
  1791. Internalerror(2020010201);
  1792. end;
  1793. GetParameters(2);
  1794. for i := 1 to 2 do secondpass(paraarray[i]);
  1795. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[1].location, true);
  1796. location_reset(location,LOC_REGISTER,OS_32);
  1797. location.register:=cg.getintregister(current_asmdata.CurrAsmList, OS_32);
  1798. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_reg(op,S_NO,GetConstInt(paraarray[2]),paraarray[1].location.register,location.register));
  1799. end;
  1800. {$endif}
  1801. {$ifdef X86_64}
  1802. in_x86_pextrq_to_mem
  1803. : //r0:ptr64;r1:xmm;imm:i32;
  1804. begin
  1805. case inlinenumber of
  1806. in_x86_pextrq_to_mem: begin op:=A_pextrq; end;
  1807. else
  1808. Internalerror(2020010201);
  1809. end;
  1810. GetParameters(3);
  1811. for i := 1 to 3 do secondpass(paraarray[i]);
  1812. location_make_ref(paraarray[1].location);
  1813. location_force_mmreg(current_asmdata.CurrAsmList, paraarray[2].location, true);
  1814. current_asmdata.CurrAsmList.concat(taicpu.op_const_reg_ref(op,S_NO,GetConstInt(paraarray[3]),paraarray[2].location.register,paraarray[1].location.reference));
  1815. end;
  1816. {$endif}
  1817. in_x86_pmovsxbq_from_mem
  1818. ,in_x86_pmovzxbq_from_mem
  1819. : //out r0:xmm;r1:ptr16;
  1820. begin
  1821. case inlinenumber of
  1822. in_x86_pmovzxbq_from_mem: begin op:=A_pmovzxbq end;
  1823. in_x86_pmovsxbq_from_mem: begin op:=A_pmovsxbq; end;
  1824. else
  1825. Internalerror(2020010201);
  1826. end;
  1827. GetParameters(1);
  1828. for i := 1 to 1 do secondpass(paraarray[i]);
  1829. location_make_ref(paraarray[1].location);
  1830. location_reset(location,LOC_MMREGISTER,OS_M128);
  1831. location.register:=cg.getmmregister(current_asmdata.CurrAsmList, OS_M128);
  1832. current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_NO,paraarray[1].location.reference,location.register));
  1833. end;