x86mmsecond.inc 74 KB

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