Lines Matching full:env

129 static HReg lookupIRTemp ( ISelEnv* env, IRTemp tmp )  in lookupIRTemp()  argument
132 vassert(tmp < env->n_vregmap); in lookupIRTemp()
133 return env->vregmap[tmp]; in lookupIRTemp()
136 static void lookupIRTemp64 ( HReg* vrHI, HReg* vrLO, ISelEnv* env, IRTemp tmp ) in lookupIRTemp64() argument
139 vassert(tmp < env->n_vregmap); in lookupIRTemp64()
140 vassert(! hregIsInvalid(env->vregmapHI[tmp])); in lookupIRTemp64()
141 *vrLO = env->vregmap[tmp]; in lookupIRTemp64()
142 *vrHI = env->vregmapHI[tmp]; in lookupIRTemp64()
145 static void addInstr ( ISelEnv* env, ARMInstr* instr ) in addInstr() argument
147 addHInstr(env->code, instr); in addInstr()
154 static HReg newVRegI ( ISelEnv* env ) in newVRegI() argument
156 HReg reg = mkHReg(True/*virtual reg*/, HRcInt32, 0/*enc*/, env->vreg_ctr); in newVRegI()
157 env->vreg_ctr++; in newVRegI()
161 static HReg newVRegD ( ISelEnv* env ) in newVRegD() argument
163 HReg reg = mkHReg(True/*virtual reg*/, HRcFlt64, 0/*enc*/, env->vreg_ctr); in newVRegD()
164 env->vreg_ctr++; in newVRegD()
168 static HReg newVRegF ( ISelEnv* env ) in newVRegF() argument
170 HReg reg = mkHReg(True/*virtual reg*/, HRcFlt32, 0/*enc*/, env->vreg_ctr); in newVRegF()
171 env->vreg_ctr++; in newVRegF()
175 static HReg newVRegV ( ISelEnv* env ) in newVRegV() argument
177 HReg reg = mkHReg(True/*virtual reg*/, HRcVec128, 0/*enc*/, env->vreg_ctr); in newVRegV()
178 env->vreg_ctr++; in newVRegV()
209 static ARMAMode1* iselIntExpr_AMode1_wrk ( ISelEnv* env, IRExpr* e );
210 static ARMAMode1* iselIntExpr_AMode1 ( ISelEnv* env, IRExpr* e );
212 static ARMAMode2* iselIntExpr_AMode2_wrk ( ISelEnv* env, IRExpr* e );
213 static ARMAMode2* iselIntExpr_AMode2 ( ISelEnv* env, IRExpr* e );
215 static ARMAModeV* iselIntExpr_AModeV_wrk ( ISelEnv* env, IRExpr* e );
216 static ARMAModeV* iselIntExpr_AModeV ( ISelEnv* env, IRExpr* e );
218 static ARMAModeN* iselIntExpr_AModeN_wrk ( ISelEnv* env, IRExpr* e );
219 static ARMAModeN* iselIntExpr_AModeN ( ISelEnv* env, IRExpr* e );
222 ( /*OUT*/Bool* didInv, Bool mayInv, ISelEnv* env, IRExpr* e );
224 ( /*OUT*/Bool* didInv, Bool mayInv, ISelEnv* env, IRExpr* e );
226 static ARMRI5* iselIntExpr_RI5_wrk ( ISelEnv* env, IRExpr* e );
227 static ARMRI5* iselIntExpr_RI5 ( ISelEnv* env, IRExpr* e );
229 static ARMCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e );
230 static ARMCondCode iselCondCode ( ISelEnv* env, IRExpr* e );
232 static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e );
233 static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
236 ISelEnv* env, IRExpr* e );
238 ISelEnv* env, IRExpr* e );
240 static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
241 static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
243 static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
244 static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
246 static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e );
247 static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e );
249 static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e );
250 static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e );
290 static void set_VFP_rounding_default ( ISelEnv* env ) in set_VFP_rounding_default() argument
295 HReg rTmp = newVRegI(env); in set_VFP_rounding_default()
296 addInstr(env, ARMInstr_Imm32(rTmp, DEFAULT_FPSCR)); in set_VFP_rounding_default()
297 addInstr(env, ARMInstr_FPSCR(True/*toFPSCR*/, rTmp)); in set_VFP_rounding_default()
306 void set_VFP_rounding_mode ( ISelEnv* env, IRExpr* mode ) in set_VFP_rounding_mode() argument
322 HReg irrm = iselIntExpr_R(env, mode); in set_VFP_rounding_mode()
323 HReg tL = newVRegI(env); in set_VFP_rounding_mode()
324 HReg tR = newVRegI(env); in set_VFP_rounding_mode()
325 HReg t3 = newVRegI(env); in set_VFP_rounding_mode()
334 addInstr(env, ARMInstr_Shift(ARMsh_SHL, tL, irrm, ARMRI5_I5(1))); in set_VFP_rounding_mode()
335 addInstr(env, ARMInstr_Shift(ARMsh_SHR, tR, irrm, ARMRI5_I5(1))); in set_VFP_rounding_mode()
336 addInstr(env, ARMInstr_Alu(ARMalu_AND, tL, tL, ARMRI84_I84(2,0))); in set_VFP_rounding_mode()
337 addInstr(env, ARMInstr_Alu(ARMalu_AND, tR, tR, ARMRI84_I84(1,0))); in set_VFP_rounding_mode()
338 addInstr(env, ARMInstr_Alu(ARMalu_OR, t3, tL, ARMRI84_R(tR))); in set_VFP_rounding_mode()
339 addInstr(env, ARMInstr_Shift(ARMsh_SHL, t3, t3, ARMRI5_I5(22))); in set_VFP_rounding_mode()
340 addInstr(env, ARMInstr_FPSCR(True/*toFPSCR*/, t3)); in set_VFP_rounding_mode()
382 ISelEnv* env, in doHelperCall() argument
526 aTy = typeOfIRExpr(env->type_env, arg); in doHelperCall()
532 addInstr(env, mk_iMOVds_RR( argregs[nextArgReg], in doHelperCall()
533 iselIntExpr_R(env, arg) )); in doHelperCall()
544 addInstr(env, ARMInstr_Imm32( argregs[nextArgReg], 0xAA )); in doHelperCall()
550 iselInt64Expr(&raHi, &raLo, env, arg); in doHelperCall()
551 addInstr(env, mk_iMOVds_RR( argregs[nextArgReg], raLo )); in doHelperCall()
553 addInstr(env, mk_iMOVds_RR( argregs[nextArgReg], raHi )); in doHelperCall()
558 addInstr(env, mk_iMOVds_RR( argregs[nextArgReg], in doHelperCall()
583 aTy = typeOfIRExpr(env->type_env, arg); in doHelperCall()
589 tmpregs[nextArgReg] = iselIntExpr_R(env, args[i]); in doHelperCall()
599 iselInt64Expr(&raHi, &raLo, env, args[i]); in doHelperCall()
629 cc = iselCondCode( env, guard ); in doHelperCall()
636 addInstr(env, ARMInstr_Imm32( argregs[i], 0xAA )); in doHelperCall()
641 addInstr( env, mk_iMOVds_RR( argregs[i], tmpregs[i] ) ); in doHelperCall()
704 addInstr(env, ARMInstr_Call( cc, target, nextArgReg, *retloc )); in doHelperCall()
758 static ARMAMode1* iselIntExpr_AMode1 ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AMode1() argument
760 ARMAMode1* am = iselIntExpr_AMode1_wrk(env, e); in iselIntExpr_AMode1()
765 static ARMAMode1* iselIntExpr_AMode1_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AMode1_wrk() argument
767 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_AMode1_wrk()
782 reg = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_AMode1_wrk()
790 HReg reg = iselIntExpr_R(env, e); in iselIntExpr_AMode1_wrk()
824 static ARMAMode2* iselIntExpr_AMode2 ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AMode2() argument
826 ARMAMode2* am = iselIntExpr_AMode2_wrk(env, e); in iselIntExpr_AMode2()
831 static ARMAMode2* iselIntExpr_AMode2_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AMode2_wrk() argument
833 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_AMode2_wrk()
848 reg = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_AMode2_wrk()
856 HReg reg = iselIntExpr_R(env, e); in iselIntExpr_AMode2_wrk()
878 static ARMAModeV* iselIntExpr_AModeV ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AModeV() argument
880 ARMAModeV* am = iselIntExpr_AModeV_wrk(env, e); in iselIntExpr_AModeV()
885 static ARMAModeV* iselIntExpr_AModeV_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AModeV_wrk() argument
887 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_AModeV_wrk()
900 reg = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_AModeV_wrk()
908 HReg reg = iselIntExpr_R(env, e); in iselIntExpr_AModeV_wrk()
916 static ARMAModeN* iselIntExpr_AModeN ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AModeN() argument
918 return iselIntExpr_AModeN_wrk(env, e); in iselIntExpr_AModeN()
921 static ARMAModeN* iselIntExpr_AModeN_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_AModeN_wrk() argument
923 HReg reg = iselIntExpr_R(env, e); in iselIntExpr_AModeN_wrk()
938 ISelEnv* env, IRExpr* e ) in iselIntExpr_RI84() argument
943 ri = iselIntExpr_RI84_wrk(didInv, mayInv, env, e); in iselIntExpr_RI84()
959 ISelEnv* env, IRExpr* e ) in iselIntExpr_RI84_wrk() argument
961 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_RI84_wrk()
988 HReg r = iselIntExpr_R ( env, e ); in iselIntExpr_RI84_wrk()
998 static ARMRI5* iselIntExpr_RI5 ( ISelEnv* env, IRExpr* e ) in iselIntExpr_RI5() argument
1000 ARMRI5* ri = iselIntExpr_RI5_wrk(env, e); in iselIntExpr_RI5()
1015 static ARMRI5* iselIntExpr_RI5_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_RI5_wrk() argument
1017 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_RI5_wrk()
1037 HReg r = iselIntExpr_R ( env, e ); in iselIntExpr_RI5_wrk()
1049 static ARMCondCode iselCondCode ( ISelEnv* env, IRExpr* e ) in iselCondCode() argument
1051 ARMCondCode cc = iselCondCode_wrk(env,e); in iselCondCode()
1056 static ARMCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e ) in iselCondCode_wrk() argument
1059 vassert(typeOfIRExpr(env->type_env,e) == Ity_I1); in iselCondCode_wrk()
1063 HReg rTmp = lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselCondCode_wrk()
1066 addInstr(env, ARMInstr_CmpOrTst(False/*test*/, rTmp, one)); in iselCondCode_wrk()
1073 return 1 ^ iselCondCode(env, e->Iex.Unop.arg); in iselCondCode_wrk()
1080 HReg rTmp = iselIntExpr_R(env, e->Iex.Unop.arg); in iselCondCode_wrk()
1082 addInstr(env, ARMInstr_CmpOrTst(False/*test*/, rTmp, one)); in iselCondCode_wrk()
1090 HReg r1 = iselIntExpr_R(env, e->Iex.Unop.arg); in iselCondCode_wrk()
1092 addInstr(env, ARMInstr_CmpOrTst(False/*!isCmp*/, r1, xFF)); in iselCondCode_wrk()
1100 HReg r1 = iselIntExpr_R(env, e->Iex.Unop.arg); in iselCondCode_wrk()
1102 addInstr(env, ARMInstr_CmpOrTst(True/*isCmp*/, r1, zero)); in iselCondCode_wrk()
1111 HReg tmp = newVRegI(env); in iselCondCode_wrk()
1113 iselInt64Expr(&tHi, &tLo, env, e->Iex.Unop.arg); in iselCondCode_wrk()
1114 addInstr(env, ARMInstr_Alu(ARMalu_OR, tmp, tHi, ARMRI84_R(tLo))); in iselCondCode_wrk()
1115 addInstr(env, ARMInstr_CmpOrTst(True/*isCmp*/, tmp, zero)); in iselCondCode_wrk()
1127 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselCondCode_wrk()
1129 env, e->Iex.Binop.arg2); in iselCondCode_wrk()
1130 addInstr(env, ARMInstr_CmpOrTst(True/*isCmp*/, argL, argR)); in iselCondCode_wrk()
1149 r = newVRegI(env); in iselCondCode_wrk()
1150 addInstr(env, ARMInstr_Imm32(r, 0)); in iselCondCode_wrk()
1151 addInstr(env, ARMInstr_CmpOrTst(True/*isCmp*/, r, ARMRI84_R(r))); in iselCondCode_wrk()
1173 static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e ) in iselIntExpr_R() argument
1175 HReg r = iselIntExpr_R_wrk(env, e); in iselIntExpr_R()
1186 static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e ) in iselIntExpr_R_wrk() argument
1188 IRType ty = typeOfIRExpr(env->type_env,e); in iselIntExpr_R_wrk()
1195 return lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselIntExpr_R_wrk()
1200 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1206 ARMAMode1* amode = iselIntExpr_AMode1 ( env, e->Iex.Load.addr ); in iselIntExpr_R_wrk()
1207 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, True/*isLoad*/, dst, amode)); in iselIntExpr_R_wrk()
1211 ARMAMode2* amode = iselIntExpr_AMode2 ( env, e->Iex.Load.addr ); in iselIntExpr_R_wrk()
1212 addInstr(env, ARMInstr_LdSt16(ARMcc_AL, in iselIntExpr_R_wrk()
1218 ARMAMode1* amode = iselIntExpr_AMode1 ( env, e->Iex.Load.addr ); in iselIntExpr_R_wrk()
1219 addInstr(env, ARMInstr_LdSt8U(ARMcc_AL, True/*isLoad*/, dst, amode)); in iselIntExpr_R_wrk()
1232 //zz HReg junk = newVRegF(env); in iselIntExpr_R_wrk()
1233 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1234 //zz HReg srcL = iselDblExpr(env, triop->arg2); in iselIntExpr_R_wrk()
1235 //zz HReg srcR = iselDblExpr(env, triop->arg3); in iselIntExpr_R_wrk()
1238 //zz addInstr(env, X86Instr_FpBinary( in iselIntExpr_R_wrk()
1245 //zz addInstr(env, X86Instr_FpStSW_AX()); in iselIntExpr_R_wrk()
1246 //zz addInstr(env, mk_iMOVsd_RR(hregX86_EAX(), dst)); in iselIntExpr_R_wrk()
1247 //zz addInstr(env, X86Instr_Alu32R(Xalu_AND, X86RMI_Imm(0x4700), dst)); in iselIntExpr_R_wrk()
1264 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1265 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1267 env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1268 addInstr(env, ARMInstr_Alu(didInv ? ARMalu_BIC : ARMalu_AND, in iselIntExpr_R_wrk()
1277 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1278 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1280 env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1281 addInstr(env, ARMInstr_Alu(aop, dst, argL, argR)); in iselIntExpr_R_wrk()
1293 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1294 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1295 ARMRI5* argR = iselIntExpr_RI5(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1296 addInstr(env, ARMInstr_Shift(sop, dst, argL, argR)); in iselIntExpr_R_wrk()
1305 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1306 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1307 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1308 addInstr(env, mk_iMOVds_RR(hregARM_R2(), argL)); in iselIntExpr_R_wrk()
1309 addInstr(env, mk_iMOVds_RR(hregARM_R3(), argR)); in iselIntExpr_R_wrk()
1310 addInstr(env, ARMInstr_Mul(ARMmul_PLAIN)); in iselIntExpr_R_wrk()
1311 addInstr(env, mk_iMOVds_RR(dst, hregARM_R0())); in iselIntExpr_R_wrk()
1318 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1319 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1320 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1321 addInstr(env, ARMInstr_CmpOrTst(True/*isCmp*/, argL, in iselIntExpr_R_wrk()
1323 addInstr(env, mk_iMOVds_RR(dst, argL)); in iselIntExpr_R_wrk()
1324 addInstr(env, ARMInstr_CMov(ARMcc_LO, dst, ARMRI84_R(argR))); in iselIntExpr_R_wrk()
1329 HReg dL = iselDblExpr(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1330 HReg dR = iselDblExpr(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1331 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1334 addInstr(env, ARMInstr_VCmpD(dL, dR)); in iselIntExpr_R_wrk()
1336 addInstr(env, ARMInstr_Imm32(dst, 0)); in iselIntExpr_R_wrk()
1337 addInstr(env, ARMInstr_CMov(ARMcc_EQ, dst, ARMRI84_I84(0x40,0))); //EQ in iselIntExpr_R_wrk()
1338 addInstr(env, ARMInstr_CMov(ARMcc_MI, dst, ARMRI84_I84(0x01,0))); //LT in iselIntExpr_R_wrk()
1339 addInstr(env, ARMInstr_CMov(ARMcc_GT, dst, ARMRI84_I84(0x00,0))); //GT in iselIntExpr_R_wrk()
1340 addInstr(env, ARMInstr_CMov(ARMcc_VS, dst, ARMRI84_I84(0x45,0))); //UN in iselIntExpr_R_wrk()
1352 HReg valD = iselDblExpr(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1353 set_VFP_rounding_mode(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1355 HReg valF = newVRegF(env); in iselIntExpr_R_wrk()
1356 addInstr(env, ARMInstr_VCvtID(False/*!iToD*/, syned, in iselIntExpr_R_wrk()
1358 set_VFP_rounding_default(env); in iselIntExpr_R_wrk()
1360 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1361 addInstr(env, ARMInstr_VXferS(False/*!toS*/, valF, dst)); in iselIntExpr_R_wrk()
1368 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselIntExpr_R_wrk()
1369 HReg res = newVRegI(env); in iselIntExpr_R_wrk()
1370 HReg arg = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1373 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselIntExpr_R_wrk()
1384 addInstr(env, ARMInstr_NUnaryS(ARMneon_GETELEMS, in iselIntExpr_R_wrk()
1394 && !(env->hwcaps & VEX_HWCAPS_ARM_NEON)) { in iselIntExpr_R_wrk()
1402 iselInt64Expr(&rHi, &rLo, env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1410 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselIntExpr_R_wrk()
1411 HReg res = newVRegI(env); in iselIntExpr_R_wrk()
1412 HReg arg = iselNeonExpr(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1415 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselIntExpr_R_wrk()
1426 addInstr(env, ARMInstr_NUnaryS(ARMneon_GETELEMS, in iselIntExpr_R_wrk()
1492 HReg regL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselIntExpr_R_wrk()
1493 HReg regR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselIntExpr_R_wrk()
1494 HReg res = newVRegI(env); in iselIntExpr_R_wrk()
1495 addInstr(env, mk_iMOVds_RR(hregARM_R0(), regL)); in iselIntExpr_R_wrk()
1496 addInstr(env, mk_iMOVds_RR(hregARM_R1(), regR)); in iselIntExpr_R_wrk()
1497 addInstr(env, ARMInstr_Call( ARMcc_AL, (Addr)fn, in iselIntExpr_R_wrk()
1499 addInstr(env, mk_iMOVds_RR(res, hregARM_R0())); in iselIntExpr_R_wrk()
1516 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1517 //zz HReg src = iselIntExpr_R(env, expr32); in iselIntExpr_R_wrk()
1518 //zz addInstr(env, mk_iMOVsd_RR(src,dst) ); in iselIntExpr_R_wrk()
1519 //zz addInstr(env, X86Instr_Alu32R(Xalu_AND, in iselIntExpr_R_wrk()
1532 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1533 //zz X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] ); in iselIntExpr_R_wrk()
1534 //zz addInstr(env, X86Instr_LoadEX(1,False,amode,dst)); in iselIntExpr_R_wrk()
1546 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1547 //zz X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] ); in iselIntExpr_R_wrk()
1548 //zz addInstr(env, X86Instr_LoadEX(1,True,amode,dst)); in iselIntExpr_R_wrk()
1560 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1561 //zz X86AMode* amode = iselIntExpr_AMode ( env, mi.bindee[0] ); in iselIntExpr_R_wrk()
1562 //zz addInstr(env, X86Instr_LoadEX(2,False,amode,dst)); in iselIntExpr_R_wrk()
1573 //zz dst = newVRegI(env); in iselIntExpr_R_wrk()
1576 //zz addInstr(env, X86Instr_LoadEX(1,False,amode,dst)); in iselIntExpr_R_wrk()
1587 //zz dst = newVRegI(env); in iselIntExpr_R_wrk()
1590 //zz addInstr(env, X86Instr_LoadEX(2,False,amode,dst)); in iselIntExpr_R_wrk()
1597 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1598 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1599 addInstr(env, ARMInstr_Alu(ARMalu_AND, in iselIntExpr_R_wrk()
1606 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1607 //zz HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1609 //zz addInstr(env, mk_iMOVsd_RR(src,dst) ); in iselIntExpr_R_wrk()
1610 //zz addInstr(env, X86Instr_Alu32R(Xalu_AND, in iselIntExpr_R_wrk()
1617 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1618 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1620 addInstr(env, ARMInstr_Shift(ARMsh_SHL, dst, src, amt)); in iselIntExpr_R_wrk()
1621 addInstr(env, ARMInstr_Shift(ARMsh_SHR, dst, dst, amt)); in iselIntExpr_R_wrk()
1626 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1627 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1629 addInstr(env, ARMInstr_Shift(ARMsh_SHL, dst, src, amt)); in iselIntExpr_R_wrk()
1630 addInstr(env, ARMInstr_Shift(ARMsh_SAR, dst, dst, amt)); in iselIntExpr_R_wrk()
1636 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1637 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1638 addInstr(env, ARMInstr_Unary(ARMun_NOT, dst, src)); in iselIntExpr_R_wrk()
1643 iselInt64Expr(&rHi,&rLo, env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1648 iselInt64Expr(&rHi,&rLo, env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1653 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselIntExpr_R_wrk()
1654 HReg tHi = newVRegI(env); in iselIntExpr_R_wrk()
1655 HReg tLo = newVRegI(env); in iselIntExpr_R_wrk()
1656 HReg tmp = iselNeon64Expr(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1657 addInstr(env, ARMInstr_VXferD(False, tmp, tHi, tLo)); in iselIntExpr_R_wrk()
1661 iselInt64Expr(&rHi,&rLo, env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1672 HReg dst = lookupIRTemp(env, e->Iex.Unop.arg->Iex.RdTmp.tmp); in iselIntExpr_R_wrk()
1677 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1678 ARMCondCode cond = iselCondCode(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1679 addInstr(env, ARMInstr_Mov(dst, ARMRI84_I84(0,0))); in iselIntExpr_R_wrk()
1680 addInstr(env, ARMInstr_CMov(cond, dst, ARMRI84_I84(1,0))); in iselIntExpr_R_wrk()
1685 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1686 ARMCondCode cond = iselCondCode(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1691 addInstr(env, ARMInstr_Mov(dst, ARMRI84_I84(0,0))); in iselIntExpr_R_wrk()
1692 addInstr(env, ARMInstr_CMov(cond, dst, ARMRI84_I84(1,0))); in iselIntExpr_R_wrk()
1693 addInstr(env, ARMInstr_Shift(ARMsh_SHL, dst, dst, amt)); in iselIntExpr_R_wrk()
1694 addInstr(env, ARMInstr_Shift(ARMsh_SAR, dst, dst, amt)); in iselIntExpr_R_wrk()
1703 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1704 //zz X86CondCode cond = iselCondCode(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1705 //zz addInstr(env, X86Instr_Set32(cond,dst)); in iselIntExpr_R_wrk()
1706 //zz addInstr(env, X86Instr_Sh32(Xsh_SHL, 31, dst)); in iselIntExpr_R_wrk()
1707 //zz addInstr(env, X86Instr_Sh32(Xsh_SAR, 31, dst)); in iselIntExpr_R_wrk()
1712 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1713 //zz HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1714 //zz addInstr(env, X86Instr_Bsfr32(True,src,dst)); in iselIntExpr_R_wrk()
1719 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1720 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1721 addInstr(env, ARMInstr_Unary(ARMun_CLZ, dst, src)); in iselIntExpr_R_wrk()
1726 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1727 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1728 addInstr(env, ARMInstr_Unary(ARMun_NEG, dst, src)); in iselIntExpr_R_wrk()
1729 addInstr(env, ARMInstr_Alu(ARMalu_OR, dst, dst, ARMRI84_R(src))); in iselIntExpr_R_wrk()
1730 addInstr(env, ARMInstr_Shift(ARMsh_SAR, dst, dst, ARMRI5_I5(31))); in iselIntExpr_R_wrk()
1735 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1736 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1737 addInstr(env, ARMInstr_Unary(ARMun_NEG, dst, src)); in iselIntExpr_R_wrk()
1738 addInstr(env, ARMInstr_Alu(ARMalu_OR, dst, dst, ARMRI84_R(src))); in iselIntExpr_R_wrk()
1743 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1744 //zz HReg vec = iselVecExpr(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1746 //zz sub_from_esp(env, 16); in iselIntExpr_R_wrk()
1747 //zz addInstr(env, X86Instr_SseLdSt(False/*store*/, vec, esp0)); in iselIntExpr_R_wrk()
1748 //zz addInstr(env, X86Instr_Alu32R( Xalu_MOV, X86RMI_Mem(esp0), dst )); in iselIntExpr_R_wrk()
1749 //zz add_to_esp(env, 16); in iselIntExpr_R_wrk()
1754 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1755 HReg src = iselFltExpr(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1756 addInstr(env, ARMInstr_VXferS(False/*!toS*/, src, dst)); in iselIntExpr_R_wrk()
1765 return iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1783 HReg arg = iselIntExpr_R(env, e->Iex.Unop.arg); in iselIntExpr_R_wrk()
1784 HReg res = newVRegI(env); in iselIntExpr_R_wrk()
1785 addInstr(env, mk_iMOVds_RR(hregARM_R0(), arg)); in iselIntExpr_R_wrk()
1786 addInstr(env, ARMInstr_Call( ARMcc_AL, (Addr)fn, in iselIntExpr_R_wrk()
1788 addInstr(env, mk_iMOVds_RR(res, hregARM_R0())); in iselIntExpr_R_wrk()
1800 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1801 addInstr(env, ARMInstr_LdSt32( in iselIntExpr_R_wrk()
1808 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1809 //zz addInstr(env, X86Instr_LoadEX( in iselIntExpr_R_wrk()
1822 //zz env, e->Iex.GetI.descr, in iselIntExpr_R_wrk()
1824 //zz HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1826 //zz addInstr(env, X86Instr_LoadEX( 1, False, am, dst )); in iselIntExpr_R_wrk()
1830 //zz addInstr(env, X86Instr_Alu32R(Xalu_MOV, X86RMI_Mem(am), dst)); in iselIntExpr_R_wrk()
1838 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1850 Bool ok = doHelperCall( &addToSp, &rloc, env, NULL/*guard*/, in iselIntExpr_R_wrk()
1858 addInstr(env, mk_iMOVds_RR(dst, hregARM_R0())); in iselIntExpr_R_wrk()
1868 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1875 addInstr(env, ARMInstr_Imm32(dst, u)); in iselIntExpr_R_wrk()
1884 HReg r1 = iselIntExpr_R(env, e->Iex.ITE.iftrue); in iselIntExpr_R_wrk()
1885 ARMRI84* r0 = iselIntExpr_RI84(NULL, False, env, e->Iex.ITE.iffalse); in iselIntExpr_R_wrk()
1886 HReg dst = newVRegI(env); in iselIntExpr_R_wrk()
1887 addInstr(env, mk_iMOVds_RR(dst, r1)); in iselIntExpr_R_wrk()
1888 cc = iselCondCode(env, e->Iex.ITE.cond); in iselIntExpr_R_wrk()
1889 addInstr(env, ARMInstr_CMov(cc ^ 1, dst, r0)); in iselIntExpr_R_wrk()
1913 static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e ) in iselInt64Expr() argument
1915 iselInt64Expr_wrk(rHi, rLo, env, e); in iselInt64Expr()
1926 static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e ) in iselInt64Expr_wrk() argument
1929 vassert(typeOfIRExpr(env->type_env,e) == Ity_I64); in iselInt64Expr_wrk()
1936 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
1937 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
1939 addInstr(env, ARMInstr_Imm32(tHi, wHi)); in iselInt64Expr_wrk()
1940 addInstr(env, ARMInstr_Imm32(tLo, wLo)); in iselInt64Expr_wrk()
1948 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselInt64Expr_wrk()
1949 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
1950 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
1951 HReg tmp = iselNeon64Expr(env, e); in iselInt64Expr_wrk()
1952 addInstr(env, ARMInstr_VXferD(False, tmp, tHi, tLo)); in iselInt64Expr_wrk()
1956 lookupIRTemp64( rHi, rLo, env, e->Iex.RdTmp.tmp); in iselInt64Expr_wrk()
1965 rA = iselIntExpr_R(env, e->Iex.Load.addr); in iselInt64Expr_wrk()
1966 tHi = newVRegI(env); in iselInt64Expr_wrk()
1967 tLo = newVRegI(env); in iselInt64Expr_wrk()
1968 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, True/*isLoad*/, in iselInt64Expr_wrk()
1970 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, True/*isLoad*/, in iselInt64Expr_wrk()
1981 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
1982 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
1983 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, True/*isLoad*/, tHi, am4)); in iselInt64Expr_wrk()
1984 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, True/*isLoad*/, tLo, am0)); in iselInt64Expr_wrk()
1997 HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselInt64Expr_wrk()
1998 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselInt64Expr_wrk()
1999 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
2000 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
2003 addInstr(env, mk_iMOVds_RR(hregARM_R2(), argL)); in iselInt64Expr_wrk()
2004 addInstr(env, mk_iMOVds_RR(hregARM_R3(), argR)); in iselInt64Expr_wrk()
2005 addInstr(env, ARMInstr_Mul(mop)); in iselInt64Expr_wrk()
2006 addInstr(env, mk_iMOVds_RR(tHi, hregARM_R1())); in iselInt64Expr_wrk()
2007 addInstr(env, mk_iMOVds_RR(tLo, hregARM_R0())); in iselInt64Expr_wrk()
2015 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
2016 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
2017 iselInt64Expr(&xHi, &xLo, env, e->Iex.Binop.arg1); in iselInt64Expr_wrk()
2018 iselInt64Expr(&yHi, &yLo, env, e->Iex.Binop.arg2); in iselInt64Expr_wrk()
2019 addInstr(env, ARMInstr_Alu(ARMalu_OR, tHi, xHi, ARMRI84_R(yHi))); in iselInt64Expr_wrk()
2020 addInstr(env, ARMInstr_Alu(ARMalu_OR, tLo, xLo, ARMRI84_R(yLo))); in iselInt64Expr_wrk()
2028 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
2029 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
2030 iselInt64Expr(&xHi, &xLo, env, e->Iex.Binop.arg1); in iselInt64Expr_wrk()
2031 iselInt64Expr(&yHi, &yLo, env, e->Iex.Binop.arg2); in iselInt64Expr_wrk()
2032 addInstr(env, ARMInstr_Alu(ARMalu_ADDS, tLo, xLo, ARMRI84_R(yLo))); in iselInt64Expr_wrk()
2033 addInstr(env, ARMInstr_Alu(ARMalu_ADC, tHi, xHi, ARMRI84_R(yHi))); in iselInt64Expr_wrk()
2041 *rHi = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselInt64Expr_wrk()
2042 *rLo = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselInt64Expr_wrk()
2057 HReg dstHi = newVRegI(env); in iselInt64Expr_wrk()
2058 HReg dstLo = newVRegI(env); in iselInt64Expr_wrk()
2059 HReg src = iselDblExpr(env, e->Iex.Unop.arg); in iselInt64Expr_wrk()
2060 addInstr(env, ARMInstr_VXferD(False/*!toD*/, src, dstHi, dstLo)); in iselInt64Expr_wrk()
2069 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
2070 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
2071 HReg zero = newVRegI(env); in iselInt64Expr_wrk()
2073 iselInt64Expr(&yHi, &yLo, env, e->Iex.Unop.arg); in iselInt64Expr_wrk()
2075 addInstr(env, ARMInstr_Imm32(zero, 0)); in iselInt64Expr_wrk()
2077 addInstr(env, ARMInstr_Alu(ARMalu_SUBS, in iselInt64Expr_wrk()
2080 addInstr(env, ARMInstr_Alu(ARMalu_SBC, in iselInt64Expr_wrk()
2085 addInstr(env, ARMInstr_Alu(ARMalu_OR, tHi, tHi, ARMRI84_R(yHi))); in iselInt64Expr_wrk()
2086 addInstr(env, ARMInstr_Alu(ARMalu_OR, tLo, tLo, ARMRI84_R(yLo))); in iselInt64Expr_wrk()
2095 HReg tmp1 = newVRegI(env); in iselInt64Expr_wrk()
2096 HReg tmp2 = newVRegI(env); in iselInt64Expr_wrk()
2098 iselInt64Expr(&srcHi, &srcLo, env, e->Iex.Unop.arg); in iselInt64Expr_wrk()
2100 addInstr(env, ARMInstr_Alu(ARMalu_OR, in iselInt64Expr_wrk()
2103 addInstr(env, ARMInstr_Unary(ARMun_NEG, tmp2, tmp1)); in iselInt64Expr_wrk()
2104 addInstr(env, ARMInstr_Alu(ARMalu_OR, in iselInt64Expr_wrk()
2106 addInstr(env, ARMInstr_Shift(ARMsh_SAR, in iselInt64Expr_wrk()
2114 HReg dst = newVRegI(env); in iselInt64Expr_wrk()
2115 ARMCondCode cond = iselCondCode(env, e->Iex.Unop.arg); in iselInt64Expr_wrk()
2120 addInstr(env, ARMInstr_Mov(dst, ARMRI84_I84(0,0))); in iselInt64Expr_wrk()
2121 addInstr(env, ARMInstr_CMov(cond, dst, ARMRI84_I84(1,0))); in iselInt64Expr_wrk()
2122 addInstr(env, ARMInstr_Shift(ARMsh_SHL, dst, dst, amt)); in iselInt64Expr_wrk()
2123 addInstr(env, ARMInstr_Shift(ARMsh_SAR, dst, dst, amt)); in iselInt64Expr_wrk()
2139 tyC = typeOfIRExpr(env->type_env,e->Iex.ITE.cond); in iselInt64Expr_wrk()
2141 iselInt64Expr(&r1hi, &r1lo, env, e->Iex.ITE.iftrue); in iselInt64Expr_wrk()
2142 iselInt64Expr(&r0hi, &r0lo, env, e->Iex.ITE.iffalse); in iselInt64Expr_wrk()
2143 dstHi = newVRegI(env); in iselInt64Expr_wrk()
2144 dstLo = newVRegI(env); in iselInt64Expr_wrk()
2145 addInstr(env, mk_iMOVds_RR(dstHi, r1hi)); in iselInt64Expr_wrk()
2146 addInstr(env, mk_iMOVds_RR(dstLo, r1lo)); in iselInt64Expr_wrk()
2147 cc = iselCondCode(env, e->Iex.ITE.cond); in iselInt64Expr_wrk()
2148 addInstr(env, ARMInstr_CMov(cc ^ 1, dstHi, ARMRI84_R(r0hi))); in iselInt64Expr_wrk()
2149 addInstr(env, ARMInstr_CMov(cc ^ 1, dstLo, ARMRI84_R(r0lo))); in iselInt64Expr_wrk()
2158 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselInt64Expr_wrk()
2159 HReg tHi = newVRegI(env); in iselInt64Expr_wrk()
2160 HReg tLo = newVRegI(env); in iselInt64Expr_wrk()
2161 HReg tmp = iselNeon64Expr(env, e); in iselInt64Expr_wrk()
2162 addInstr(env, ARMInstr_VXferD(False, tmp, tHi, tLo)); in iselInt64Expr_wrk()
2177 static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e ) in iselNeon64Expr() argument
2180 vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON); in iselNeon64Expr()
2181 r = iselNeon64Expr_wrk( env, e ); in iselNeon64Expr()
2188 static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e ) in iselNeon64Expr_wrk() argument
2190 IRType ty = typeOfIRExpr(env->type_env, e); in iselNeon64Expr_wrk()
2196 return lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselNeon64Expr_wrk()
2201 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2202 iselInt64Expr(&rHi, &rLo, env, e); in iselNeon64Expr_wrk()
2203 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
2209 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2210 ARMAModeN* am = iselIntExpr_AModeN(env, e->Iex.Load.addr); in iselNeon64Expr_wrk()
2212 addInstr(env, ARMInstr_NLdStD(True, res, am)); in iselNeon64Expr_wrk()
2218 HReg addr = newVRegI(env); in iselNeon64Expr_wrk()
2219 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2221 addInstr(env, ARMInstr_Add32(addr, hregARM_R8(), e->Iex.Get.offset)); in iselNeon64Expr_wrk()
2222 addInstr(env, ARMInstr_NLdStD(True, res, mkARMAModeN_R(addr))); in iselNeon64Expr_wrk()
2234 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2235 iselInt64Expr(&rHi, &rLo, env, e); in iselNeon64Expr_wrk()
2236 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
2241 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2242 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2243 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2244 addInstr(env, ARMInstr_NBinary(ARMneon_VAND, in iselNeon64Expr_wrk()
2249 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2250 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2251 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2252 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeon64Expr_wrk()
2257 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2258 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2259 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2260 addInstr(env, ARMInstr_NBinary(ARMneon_VXOR, in iselNeon64Expr_wrk()
2267 HReg rHi = iselIntExpr_R(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2268 HReg rLo = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2269 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2270 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
2278 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2279 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2280 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2289 addInstr(env, ARMInstr_NBinary(ARMneon_VADD, in iselNeon64Expr_wrk()
2294 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2295 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2296 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2298 addInstr(env, ARMInstr_NBinary(ARMneon_VADDFP, in iselNeon64Expr_wrk()
2303 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2304 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2305 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2307 addInstr(env, ARMInstr_NBinary(ARMneon_VRECPS, in iselNeon64Expr_wrk()
2312 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2313 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2314 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2316 addInstr(env, ARMInstr_NBinary(ARMneon_VRSQRTS, in iselNeon64Expr_wrk()
2328 HReg rD = newVRegD(env); in iselNeon64Expr_wrk()
2329 HReg rM = newVRegD(env); in iselNeon64Expr_wrk()
2330 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2331 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2343 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, False)); in iselNeon64Expr_wrk()
2344 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, False)); in iselNeon64Expr_wrk()
2345 addInstr(env, ARMInstr_NDual(ARMneon_TRN, rD, rM, size, False)); in iselNeon64Expr_wrk()
2354 HReg rD = newVRegD(env); in iselNeon64Expr_wrk()
2355 HReg rM = newVRegD(env); in iselNeon64Expr_wrk()
2356 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2357 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2367 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, False)); in iselNeon64Expr_wrk()
2368 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, False)); in iselNeon64Expr_wrk()
2369 addInstr(env, ARMInstr_NDual(ARMneon_ZIP, rD, rM, size, False)); in iselNeon64Expr_wrk()
2378 HReg rD = newVRegD(env); in iselNeon64Expr_wrk()
2379 HReg rM = newVRegD(env); in iselNeon64Expr_wrk()
2380 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2381 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2391 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, False)); in iselNeon64Expr_wrk()
2392 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, False)); in iselNeon64Expr_wrk()
2393 addInstr(env, ARMInstr_NDual(ARMneon_UZP, rD, rM, size, False)); in iselNeon64Expr_wrk()
2401 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2402 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2403 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2412 addInstr(env, ARMInstr_NBinary(ARMneon_VQADDU, in iselNeon64Expr_wrk()
2420 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2421 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2422 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2431 addInstr(env, ARMInstr_NBinary(ARMneon_VQADDS, in iselNeon64Expr_wrk()
2439 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2440 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2441 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2450 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeon64Expr_wrk()
2455 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2456 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2457 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2459 addInstr(env, ARMInstr_NBinary(ARMneon_VSUBFP, in iselNeon64Expr_wrk()
2467 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2468 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2469 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2478 addInstr(env, ARMInstr_NBinary(ARMneon_VQSUBU, in iselNeon64Expr_wrk()
2486 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2487 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2488 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2497 addInstr(env, ARMInstr_NBinary(ARMneon_VQSUBS, in iselNeon64Expr_wrk()
2504 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2505 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2506 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2514 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXU, in iselNeon64Expr_wrk()
2521 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2522 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2523 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2531 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXS, in iselNeon64Expr_wrk()
2538 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2539 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2540 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2548 addInstr(env, ARMInstr_NBinary(ARMneon_VMINU, in iselNeon64Expr_wrk()
2555 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2556 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2557 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2565 addInstr(env, ARMInstr_NBinary(ARMneon_VMINS, in iselNeon64Expr_wrk()
2572 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2573 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2574 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2575 HReg argR2 = newVRegD(env); in iselNeon64Expr_wrk()
2576 HReg zero = newVRegD(env); in iselNeon64Expr_wrk()
2585 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0,0))); in iselNeon64Expr_wrk()
2586 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeon64Expr_wrk()
2588 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeon64Expr_wrk()
2596 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2597 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2598 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2607 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeon64Expr_wrk()
2614 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2615 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2616 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2617 HReg argR2 = newVRegD(env); in iselNeon64Expr_wrk()
2618 HReg zero = newVRegD(env); in iselNeon64Expr_wrk()
2626 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0,0))); in iselNeon64Expr_wrk()
2627 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeon64Expr_wrk()
2629 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
2636 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2637 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2638 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2646 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
2654 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2655 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2656 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2665 addInstr(env, ARMInstr_NShift(ARMneon_VQSHL, in iselNeon64Expr_wrk()
2673 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2674 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2675 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2684 addInstr(env, ARMInstr_NShift(ARMneon_VQSAL, in iselNeon64Expr_wrk()
2692 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2693 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2696 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeon64Expr_wrk()
2708 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNUU, in iselNeon64Expr_wrk()
2716 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2717 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2720 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeon64Expr_wrk()
2732 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNUS, in iselNeon64Expr_wrk()
2740 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2741 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2744 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeon64Expr_wrk()
2756 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNSS, in iselNeon64Expr_wrk()
2764 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2765 HReg tmp = newVRegD(env); in iselNeon64Expr_wrk()
2766 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2767 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2768 HReg argR2 = newVRegI(env); in iselNeon64Expr_wrk()
2777 addInstr(env, ARMInstr_Unary(ARMun_NEG, argR2, argR)); in iselNeon64Expr_wrk()
2778 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, tmp, argR2, 0, False)); in iselNeon64Expr_wrk()
2779 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
2787 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2788 HReg tmp = newVRegD(env); in iselNeon64Expr_wrk()
2789 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2797 addInstr(env, ARMInstr_NShl64(res, argL, nshift)); in iselNeon64Expr_wrk()
2802 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2811 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, in iselNeon64Expr_wrk()
2813 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
2821 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2822 HReg tmp = newVRegD(env); in iselNeon64Expr_wrk()
2823 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2824 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2825 HReg argR2 = newVRegI(env); in iselNeon64Expr_wrk()
2834 addInstr(env, ARMInstr_Unary(ARMun_NEG, argR2, argR)); in iselNeon64Expr_wrk()
2835 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, tmp, argR2, 0, False)); in iselNeon64Expr_wrk()
2836 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeon64Expr_wrk()
2843 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2844 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2845 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2853 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTU, in iselNeon64Expr_wrk()
2860 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2861 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2862 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2870 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTS, in iselNeon64Expr_wrk()
2877 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2878 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2879 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2887 addInstr(env, ARMInstr_NBinary(ARMneon_VCEQ, in iselNeon64Expr_wrk()
2894 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2895 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2896 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2904 addInstr(env, ARMInstr_NBinary(ARMneon_VMUL, in iselNeon64Expr_wrk()
2909 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2910 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2911 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2913 addInstr(env, ARMInstr_NBinary(ARMneon_VMULFP, in iselNeon64Expr_wrk()
2919 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2920 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2921 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2928 addInstr(env, ARMInstr_NBinary(ARMneon_VQDMULH, in iselNeon64Expr_wrk()
2935 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2936 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2937 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2944 addInstr(env, ARMInstr_NBinary(ARMneon_VQRDMULH, in iselNeon64Expr_wrk()
2952 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2953 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2954 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2962 addInstr(env, ARMInstr_NBinary(ARMneon_VPADD, in iselNeon64Expr_wrk()
2967 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2968 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2969 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2971 addInstr(env, ARMInstr_NBinary(ARMneon_VPADDFP, in iselNeon64Expr_wrk()
2978 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2979 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2980 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
2988 addInstr(env, ARMInstr_NBinary(ARMneon_VPMINU, in iselNeon64Expr_wrk()
2995 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
2996 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
2997 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3005 addInstr(env, ARMInstr_NBinary(ARMneon_VPMINS, in iselNeon64Expr_wrk()
3012 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3013 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3014 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3022 addInstr(env, ARMInstr_NBinary(ARMneon_VPMAXU, in iselNeon64Expr_wrk()
3029 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3030 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3031 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3039 addInstr(env, ARMInstr_NBinary(ARMneon_VPMAXS, in iselNeon64Expr_wrk()
3044 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3045 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3046 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3047 addInstr(env, ARMInstr_NBinary(ARMneon_VTBL, in iselNeon64Expr_wrk()
3052 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3053 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3054 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3056 addInstr(env, ARMInstr_NBinary(ARMneon_VMULP, in iselNeon64Expr_wrk()
3061 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3062 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3063 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3064 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXF, in iselNeon64Expr_wrk()
3069 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3070 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3071 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3072 addInstr(env, ARMInstr_NBinary(ARMneon_VMINF, in iselNeon64Expr_wrk()
3077 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3078 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3079 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3080 addInstr(env, ARMInstr_NBinary(ARMneon_VPMAXF, in iselNeon64Expr_wrk()
3085 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3086 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3087 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3088 addInstr(env, ARMInstr_NBinary(ARMneon_VPMINF, in iselNeon64Expr_wrk()
3093 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3094 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3095 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3096 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTF, in iselNeon64Expr_wrk()
3101 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3102 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3103 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3104 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEF, in iselNeon64Expr_wrk()
3109 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3110 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3111 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeon64Expr_wrk()
3112 addInstr(env, ARMInstr_NBinary(ARMneon_VCEQF, in iselNeon64Expr_wrk()
3120 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3121 HReg arg = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3125 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeon64Expr_wrk()
3139 addInstr(env, ARMInstr_NUnary(op, res, arg, imm6, False)); in iselNeon64Expr_wrk()
3147 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3148 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3153 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeon64Expr_wrk()
3168 addInstr(env, ARMInstr_NUnary(ARMneon_VDUP, in iselNeon64Expr_wrk()
3184 HReg rLo = iselIntExpr_R(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3185 HReg rHi = newVRegI(env); in iselNeon64Expr_wrk()
3186 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3187 addInstr(env, ARMInstr_Imm32(rHi, 0)); in iselNeon64Expr_wrk()
3188 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
3194 HReg rLo = iselIntExpr_R(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3195 HReg rHi = newVRegI(env); in iselNeon64Expr_wrk()
3196 addInstr(env, mk_iMOVds_RR(rHi, rLo)); in iselNeon64Expr_wrk()
3197 addInstr(env, ARMInstr_Shift(ARMsh_SAR, rHi, rHi, ARMRI5_I5(31))); in iselNeon64Expr_wrk()
3198 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3199 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
3211 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3212 iselInt64Expr(&rHi, &rLo, env, e); in iselNeon64Expr_wrk()
3213 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
3246 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3247 HReg arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3248 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 0, False)); in iselNeon64Expr_wrk()
3251 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3252 HReg arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3253 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 1, False)); in iselNeon64Expr_wrk()
3256 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3257 HReg arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3258 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 2, False)); in iselNeon64Expr_wrk()
3261 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3262 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3263 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3264 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeon64Expr_wrk()
3268 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3269 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3270 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3271 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeon64Expr_wrk()
3275 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3276 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3277 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3278 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeon64Expr_wrk()
3282 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3283 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3284 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3285 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeon64Expr_wrk()
3289 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3290 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3291 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3292 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeon64Expr_wrk()
3296 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3297 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3298 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3299 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeon64Expr_wrk()
3303 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3304 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3305 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, res, arg, 4, False)); in iselNeon64Expr_wrk()
3327 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeon64Expr_wrk()
3331 res = newVRegD(env); in iselNeon64Expr_wrk()
3332 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3333 addInstr(env, ARMInstr_NUnaryS( in iselNeon64Expr_wrk()
3346 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeon64Expr_wrk()
3350 res = newVRegD(env); in iselNeon64Expr_wrk()
3351 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3352 addInstr(env, ARMInstr_NUnaryS( in iselNeon64Expr_wrk()
3365 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeon64Expr_wrk()
3369 res = newVRegD(env); in iselNeon64Expr_wrk()
3370 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3371 addInstr(env, ARMInstr_NUnaryS( in iselNeon64Expr_wrk()
3381 arg = iselIntExpr_R(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3382 res = newVRegD(env); in iselNeon64Expr_wrk()
3389 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, res, arg, size, False)); in iselNeon64Expr_wrk()
3395 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3396 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3404 addInstr(env, ARMInstr_NUnary(ARMneon_ABS, res, arg, size, False)); in iselNeon64Expr_wrk()
3410 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3411 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3419 addInstr(env, ARMInstr_NUnary(ARMneon_REV64, in iselNeon64Expr_wrk()
3425 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3426 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3433 addInstr(env, ARMInstr_NUnary(ARMneon_REV32, in iselNeon64Expr_wrk()
3438 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3439 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3441 addInstr(env, ARMInstr_NUnary(ARMneon_REV16, in iselNeon64Expr_wrk()
3446 HReg x_lsh = newVRegD(env); in iselNeon64Expr_wrk()
3447 HReg x_rsh = newVRegD(env); in iselNeon64Expr_wrk()
3448 HReg lsh_amt = newVRegD(env); in iselNeon64Expr_wrk()
3449 HReg rsh_amt = newVRegD(env); in iselNeon64Expr_wrk()
3450 HReg zero = newVRegD(env); in iselNeon64Expr_wrk()
3451 HReg tmp = newVRegD(env); in iselNeon64Expr_wrk()
3452 HReg tmp2 = newVRegD(env); in iselNeon64Expr_wrk()
3453 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3454 HReg x = newVRegD(env); in iselNeon64Expr_wrk()
3455 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3456 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, tmp2, arg, 2, False)); in iselNeon64Expr_wrk()
3457 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, x, tmp2, 4, False)); in iselNeon64Expr_wrk()
3458 addInstr(env, ARMInstr_NeonImm(lsh_amt, ARMNImm_TI(0, 32))); in iselNeon64Expr_wrk()
3459 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0, 0))); in iselNeon64Expr_wrk()
3460 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeon64Expr_wrk()
3462 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
3464 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeon64Expr_wrk()
3466 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeon64Expr_wrk()
3468 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeon64Expr_wrk()
3475 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3476 HReg tmp = newVRegD(env); in iselNeon64Expr_wrk()
3477 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3485 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, tmp, arg, size, False)); in iselNeon64Expr_wrk()
3486 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, res, tmp, 4, False)); in iselNeon64Expr_wrk()
3492 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3493 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3501 addInstr(env, ARMInstr_NUnary(ARMneon_COPYN, in iselNeon64Expr_wrk()
3508 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3509 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3517 addInstr(env, ARMInstr_NUnary(ARMneon_COPYQNSS, in iselNeon64Expr_wrk()
3524 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3525 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3533 addInstr(env, ARMInstr_NUnary(ARMneon_COPYQNUS, in iselNeon64Expr_wrk()
3540 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3541 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3549 addInstr(env, ARMInstr_NUnary(ARMneon_COPYQNUU, in iselNeon64Expr_wrk()
3556 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3557 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3565 addInstr(env, ARMInstr_NUnary(ARMneon_PADDLS, in iselNeon64Expr_wrk()
3572 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3573 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3581 addInstr(env, ARMInstr_NUnary(ARMneon_PADDLU, in iselNeon64Expr_wrk()
3586 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3587 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3589 addInstr(env, ARMInstr_NUnary(ARMneon_CNT, in iselNeon64Expr_wrk()
3596 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3597 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3605 addInstr(env, ARMInstr_NUnary(ARMneon_CLZ, in iselNeon64Expr_wrk()
3612 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3613 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3621 addInstr(env, ARMInstr_NUnary(ARMneon_CLS, in iselNeon64Expr_wrk()
3626 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3627 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3628 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTFtoS, in iselNeon64Expr_wrk()
3633 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3634 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3635 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTFtoU, in iselNeon64Expr_wrk()
3640 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3641 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3642 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTStoF, in iselNeon64Expr_wrk()
3647 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3648 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3649 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTUtoF, in iselNeon64Expr_wrk()
3654 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3655 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3656 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTF32toF16, in iselNeon64Expr_wrk()
3661 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3662 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3663 addInstr(env, ARMInstr_NUnary(ARMneon_VRECIPF, in iselNeon64Expr_wrk()
3668 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3669 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeon64Expr_wrk()
3670 addInstr(env, ARMInstr_NUnary(ARMneon_VRECIP, in iselNeon64Expr_wrk()
3682 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3683 HReg argL = iselNeon64Expr(env, mi.bindee[0]); in iselNeon64Expr_wrk()
3684 HReg argR = iselNeon64Expr(env, mi.bindee[1]); in iselNeon64Expr_wrk()
3685 addInstr(env, ARMInstr_NBinary(ARMneon_VABDFP, in iselNeon64Expr_wrk()
3689 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3690 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3691 addInstr(env, ARMInstr_NUnary(ARMneon_VABSFP, in iselNeon64Expr_wrk()
3697 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3698 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3699 addInstr(env, ARMInstr_NUnary(ARMneon_VRSQRTEFP, in iselNeon64Expr_wrk()
3704 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3705 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3706 addInstr(env, ARMInstr_NUnary(ARMneon_VRSQRTE, in iselNeon64Expr_wrk()
3711 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3712 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeon64Expr_wrk()
3713 addInstr(env, ARMInstr_NUnary(ARMneon_VNEGF, in iselNeon64Expr_wrk()
3727 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3728 HReg argL = iselNeon64Expr(env, triop->arg2); in iselNeon64Expr_wrk()
3729 HReg argR = iselNeon64Expr(env, triop->arg1); in iselNeon64Expr_wrk()
3732 typeOfIRExpr(env->type_env, triop->arg3) != Ity_I8) { in iselNeon64Expr_wrk()
3741 addInstr(env, ARMInstr_NBinary(ARMneon_VEXT, in iselNeon64Expr_wrk()
3748 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3749 HReg dreg = iselNeon64Expr(env, triop->arg1); in iselNeon64Expr_wrk()
3750 HReg arg = iselIntExpr_R(env, triop->arg3); in iselNeon64Expr_wrk()
3753 typeOfIRExpr(env->type_env, triop->arg2) != Ity_I8) { in iselNeon64Expr_wrk()
3764 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, res, dreg, 4, False)); in iselNeon64Expr_wrk()
3765 addInstr(env, ARMInstr_NUnaryS(ARMneon_SETELEM, in iselNeon64Expr_wrk()
3779 HReg res = newVRegD(env); in iselNeon64Expr_wrk()
3780 iselInt64Expr(&rHi, &rLo, env, e); in iselNeon64Expr_wrk()
3781 addInstr(env, ARMInstr_VXferD(True/*toD*/, res, rHi, rLo)); in iselNeon64Expr_wrk()
3790 static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e ) in iselNeonExpr() argument
3793 vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON); in iselNeonExpr()
3794 r = iselNeonExpr_wrk( env, e ); in iselNeonExpr()
3801 static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e ) in iselNeonExpr_wrk() argument
3803 IRType ty = typeOfIRExpr(env->type_env, e); in iselNeonExpr_wrk()
3809 return lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselNeonExpr_wrk()
3818 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3819 addInstr(env, ARMInstr_NeonImm(res, ARMNImm_TI(6, 0))); in iselNeonExpr_wrk()
3823 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3824 addInstr(env, ARMInstr_NeonImm(res, ARMNImm_TI(6, 255))); in iselNeonExpr_wrk()
3832 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3833 ARMAModeN* am = iselIntExpr_AModeN(env, e->Iex.Load.addr); in iselNeonExpr_wrk()
3835 addInstr(env, ARMInstr_NLdStQ(True, res, am)); in iselNeonExpr_wrk()
3840 HReg addr = newVRegI(env); in iselNeonExpr_wrk()
3841 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3843 addInstr(env, ARMInstr_Add32(addr, hregARM_R8(), e->Iex.Get.offset)); in iselNeonExpr_wrk()
3844 addInstr(env, ARMInstr_NLdStQ(True, res, mkARMAModeN_R(addr))); in iselNeonExpr_wrk()
3879 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3880 HReg arg = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3881 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 0, True)); in iselNeonExpr_wrk()
3884 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3885 HReg arg = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3886 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 1, True)); in iselNeonExpr_wrk()
3889 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3890 HReg arg = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3891 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, res, arg, 2, True)); in iselNeonExpr_wrk()
3894 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3895 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3896 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3897 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeonExpr_wrk()
3901 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3902 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3903 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3904 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeonExpr_wrk()
3908 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3909 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3910 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3911 addInstr(env, ARMInstr_NBinary(ARMneon_VCGES, in iselNeonExpr_wrk()
3915 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3916 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3917 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3918 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeonExpr_wrk()
3922 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3923 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3924 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3925 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeonExpr_wrk()
3929 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3930 HReg argL = iselNeonExpr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3931 HReg argR = iselNeonExpr(env, mi.bindee[1]); in iselNeonExpr_wrk()
3932 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEU, in iselNeonExpr_wrk()
3936 HReg res = newVRegV(env); in iselNeonExpr_wrk()
3937 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
3938 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, res, arg, 4, True)); in iselNeonExpr_wrk()
3960 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeonExpr_wrk()
3964 res = newVRegV(env); in iselNeonExpr_wrk()
3965 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3966 addInstr(env, ARMInstr_NUnaryS( in iselNeonExpr_wrk()
3979 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeonExpr_wrk()
3983 res = newVRegV(env); in iselNeonExpr_wrk()
3984 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeonExpr_wrk()
3985 addInstr(env, ARMInstr_NUnaryS( in iselNeonExpr_wrk()
3998 typeOfIRExpr(env->type_env, mi.bindee[1]) == Ity_I8) { in iselNeonExpr_wrk()
4002 res = newVRegV(env); in iselNeonExpr_wrk()
4003 arg = iselNeon64Expr(env, mi.bindee[0]); in iselNeonExpr_wrk()
4004 addInstr(env, ARMInstr_NUnaryS( in iselNeonExpr_wrk()
4014 arg = iselIntExpr_R(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4015 res = newVRegV(env); in iselNeonExpr_wrk()
4022 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, res, arg, size, True)); in iselNeonExpr_wrk()
4028 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4029 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4037 addInstr(env, ARMInstr_NUnary(ARMneon_ABS, res, arg, size, True)); in iselNeonExpr_wrk()
4043 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4044 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4052 addInstr(env, ARMInstr_NUnary(ARMneon_REV64, in iselNeonExpr_wrk()
4058 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4059 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4066 addInstr(env, ARMInstr_NUnary(ARMneon_REV32, in iselNeonExpr_wrk()
4071 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4072 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4074 addInstr(env, ARMInstr_NUnary(ARMneon_REV16, in iselNeonExpr_wrk()
4079 HReg x_lsh = newVRegV(env); in iselNeonExpr_wrk()
4080 HReg x_rsh = newVRegV(env); in iselNeonExpr_wrk()
4081 HReg lsh_amt = newVRegV(env); in iselNeonExpr_wrk()
4082 HReg rsh_amt = newVRegV(env); in iselNeonExpr_wrk()
4083 HReg zero = newVRegV(env); in iselNeonExpr_wrk()
4084 HReg tmp = newVRegV(env); in iselNeonExpr_wrk()
4085 HReg tmp2 = newVRegV(env); in iselNeonExpr_wrk()
4086 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4087 HReg x = newVRegV(env); in iselNeonExpr_wrk()
4088 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4089 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, tmp2, arg, 2, True)); in iselNeonExpr_wrk()
4090 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, x, tmp2, 4, True)); in iselNeonExpr_wrk()
4091 addInstr(env, ARMInstr_NeonImm(lsh_amt, ARMNImm_TI(0, 32))); in iselNeonExpr_wrk()
4092 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0, 0))); in iselNeonExpr_wrk()
4093 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeonExpr_wrk()
4095 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4097 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4099 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeonExpr_wrk()
4101 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeonExpr_wrk()
4108 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4109 HReg tmp = newVRegV(env); in iselNeonExpr_wrk()
4110 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4118 addInstr(env, ARMInstr_NUnary(ARMneon_EQZ, tmp, arg, size, True)); in iselNeonExpr_wrk()
4119 addInstr(env, ARMInstr_NUnary(ARMneon_NOT, res, tmp, 4, True)); in iselNeonExpr_wrk()
4125 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4126 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4134 addInstr(env, ARMInstr_NUnary(ARMneon_COPYLU, in iselNeonExpr_wrk()
4141 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4142 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4150 addInstr(env, ARMInstr_NUnary(ARMneon_COPYLS, in iselNeonExpr_wrk()
4157 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4158 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4166 addInstr(env, ARMInstr_NUnary(ARMneon_PADDLS, in iselNeonExpr_wrk()
4173 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4174 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4182 addInstr(env, ARMInstr_NUnary(ARMneon_PADDLU, in iselNeonExpr_wrk()
4187 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4188 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4190 addInstr(env, ARMInstr_NUnary(ARMneon_CNT, res, arg, size, True)); in iselNeonExpr_wrk()
4196 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4197 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4205 addInstr(env, ARMInstr_NUnary(ARMneon_CLZ, res, arg, size, True)); in iselNeonExpr_wrk()
4211 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4212 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4220 addInstr(env, ARMInstr_NUnary(ARMneon_CLS, res, arg, size, True)); in iselNeonExpr_wrk()
4224 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4225 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4226 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTFtoS, in iselNeonExpr_wrk()
4231 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4232 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4233 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTFtoU, in iselNeonExpr_wrk()
4238 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4239 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4240 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTStoF, in iselNeonExpr_wrk()
4245 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4246 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4247 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTUtoF, in iselNeonExpr_wrk()
4252 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4253 HReg arg = iselNeon64Expr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4254 addInstr(env, ARMInstr_NUnary(ARMneon_VCVTF16toF32, in iselNeonExpr_wrk()
4259 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4260 HReg argL = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4261 addInstr(env, ARMInstr_NUnary(ARMneon_VRECIPF, in iselNeonExpr_wrk()
4266 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4267 HReg argL = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4268 addInstr(env, ARMInstr_NUnary(ARMneon_VRECIP, in iselNeonExpr_wrk()
4273 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4274 HReg argL = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4275 addInstr(env, ARMInstr_NUnary(ARMneon_VABSFP, in iselNeonExpr_wrk()
4280 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4281 HReg argL = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4282 addInstr(env, ARMInstr_NUnary(ARMneon_VRSQRTEFP, in iselNeonExpr_wrk()
4287 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4288 HReg argL = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4289 addInstr(env, ARMInstr_NUnary(ARMneon_VRSQRTE, in iselNeonExpr_wrk()
4294 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4295 HReg arg = iselNeonExpr(env, e->Iex.Unop.arg); in iselNeonExpr_wrk()
4296 addInstr(env, ARMInstr_NUnary(ARMneon_VNEGF, in iselNeonExpr_wrk()
4312 typeOfIRExpr(env->type_env, e->Iex.Binop.arg1) == Ity_I64 && in iselNeonExpr_wrk()
4313 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) == Ity_I64 && in iselNeonExpr_wrk()
4319 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4320 addInstr(env, ARMInstr_NeonImm(res, imm)); in iselNeonExpr_wrk()
4325 HReg tmp1 = newVRegV(env); in iselNeonExpr_wrk()
4326 HReg tmp2 = newVRegV(env); in iselNeonExpr_wrk()
4327 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4329 addInstr(env, ARMInstr_NeonImm(tmp1, ARMNImm_TI(9,0x0f))); in iselNeonExpr_wrk()
4330 addInstr(env, ARMInstr_NeonImm(tmp2, imm)); in iselNeonExpr_wrk()
4331 addInstr(env, ARMInstr_NBinary(ARMneon_VAND, in iselNeonExpr_wrk()
4338 HReg tmp1 = newVRegV(env); in iselNeonExpr_wrk()
4339 HReg tmp2 = newVRegV(env); in iselNeonExpr_wrk()
4340 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4342 addInstr(env, ARMInstr_NeonImm(tmp1, ARMNImm_TI(9,0xf0))); in iselNeonExpr_wrk()
4343 addInstr(env, ARMInstr_NeonImm(tmp2, imm)); in iselNeonExpr_wrk()
4344 addInstr(env, ARMInstr_NBinary(ARMneon_VAND, in iselNeonExpr_wrk()
4357 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4364 addInstr(env, ARMInstr_Alu(ARMalu_SUB, hregARM_R13(), in iselNeonExpr_wrk()
4368 iselInt64Expr(&w1, &w0, env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4369 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*store*/, in iselNeonExpr_wrk()
4371 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*store*/, in iselNeonExpr_wrk()
4375 iselInt64Expr(&w3, &w2, env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4376 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*store*/, in iselNeonExpr_wrk()
4378 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*store*/, in iselNeonExpr_wrk()
4382 addInstr(env, ARMInstr_NLdStQ(True/*load*/, res, in iselNeonExpr_wrk()
4386 addInstr(env, ARMInstr_Alu(ARMalu_ADD, hregARM_R13(), in iselNeonExpr_wrk()
4392 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4393 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4394 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4395 addInstr(env, ARMInstr_NBinary(ARMneon_VAND, in iselNeonExpr_wrk()
4400 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4401 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4402 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4403 addInstr(env, ARMInstr_NBinary(ARMneon_VORR, in iselNeonExpr_wrk()
4408 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4409 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4410 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4411 addInstr(env, ARMInstr_NBinary(ARMneon_VXOR, in iselNeonExpr_wrk()
4444 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4445 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4446 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4457 addInstr(env, ARMInstr_NBinary(ARMneon_VADD, in iselNeonExpr_wrk()
4462 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4463 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4464 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4466 addInstr(env, ARMInstr_NBinary(ARMneon_VRECPS, in iselNeonExpr_wrk()
4471 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4472 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4473 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4475 addInstr(env, ARMInstr_NBinary(ARMneon_VRSQRTS, in iselNeonExpr_wrk()
4487 HReg rD = newVRegV(env); in iselNeonExpr_wrk()
4488 HReg rM = newVRegV(env); in iselNeonExpr_wrk()
4489 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4490 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4502 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, True)); in iselNeonExpr_wrk()
4503 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, True)); in iselNeonExpr_wrk()
4504 addInstr(env, ARMInstr_NDual(ARMneon_TRN, rD, rM, size, True)); in iselNeonExpr_wrk()
4515 HReg rD = newVRegV(env); in iselNeonExpr_wrk()
4516 HReg rM = newVRegV(env); in iselNeonExpr_wrk()
4517 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4518 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4530 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, True)); in iselNeonExpr_wrk()
4531 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, True)); in iselNeonExpr_wrk()
4532 addInstr(env, ARMInstr_NDual(ARMneon_ZIP, rD, rM, size, True)); in iselNeonExpr_wrk()
4543 HReg rD = newVRegV(env); in iselNeonExpr_wrk()
4544 HReg rM = newVRegV(env); in iselNeonExpr_wrk()
4545 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4546 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4558 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rM, argL, 4, True)); in iselNeonExpr_wrk()
4559 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, rD, argR, 4, True)); in iselNeonExpr_wrk()
4560 addInstr(env, ARMInstr_NDual(ARMneon_UZP, rD, rM, size, True)); in iselNeonExpr_wrk()
4568 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4569 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4570 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4581 addInstr(env, ARMInstr_NBinary(ARMneon_VQADDU, in iselNeonExpr_wrk()
4589 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4590 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4591 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4602 addInstr(env, ARMInstr_NBinary(ARMneon_VQADDS, in iselNeonExpr_wrk()
4610 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4611 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4612 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4623 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeonExpr_wrk()
4631 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4632 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4633 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4644 addInstr(env, ARMInstr_NBinary(ARMneon_VQSUBU, in iselNeonExpr_wrk()
4652 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4653 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4654 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4665 addInstr(env, ARMInstr_NBinary(ARMneon_VQSUBS, in iselNeonExpr_wrk()
4672 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4673 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4674 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4682 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXU, in iselNeonExpr_wrk()
4689 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4690 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4691 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4699 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXS, in iselNeonExpr_wrk()
4706 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4707 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4708 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4716 addInstr(env, ARMInstr_NBinary(ARMneon_VMINU, in iselNeonExpr_wrk()
4723 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4724 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4725 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4733 addInstr(env, ARMInstr_NBinary(ARMneon_VMINS, in iselNeonExpr_wrk()
4741 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4742 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4743 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4744 HReg argR2 = newVRegV(env); in iselNeonExpr_wrk()
4745 HReg zero = newVRegV(env); in iselNeonExpr_wrk()
4754 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0,0))); in iselNeonExpr_wrk()
4755 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeonExpr_wrk()
4757 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeonExpr_wrk()
4765 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4766 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4767 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4776 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeonExpr_wrk()
4784 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4785 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4786 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4787 HReg argR2 = newVRegV(env); in iselNeonExpr_wrk()
4788 HReg zero = newVRegV(env); in iselNeonExpr_wrk()
4797 addInstr(env, ARMInstr_NeonImm(zero, ARMNImm_TI(0,0))); in iselNeonExpr_wrk()
4798 addInstr(env, ARMInstr_NBinary(ARMneon_VSUB, in iselNeonExpr_wrk()
4800 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4808 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4809 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4810 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4819 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4827 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4828 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4829 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4838 addInstr(env, ARMInstr_NShift(ARMneon_VQSHL, in iselNeonExpr_wrk()
4846 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4847 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4848 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4857 addInstr(env, ARMInstr_NShift(ARMneon_VQSAL, in iselNeonExpr_wrk()
4865 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4866 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4869 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeonExpr_wrk()
4881 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNUU, in iselNeonExpr_wrk()
4889 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4890 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4893 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeonExpr_wrk()
4905 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNUS, in iselNeonExpr_wrk()
4913 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4914 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4917 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeonExpr_wrk()
4929 addInstr(env, ARMInstr_NUnary(ARMneon_VQSHLNSS, in iselNeonExpr_wrk()
4937 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4938 HReg tmp = newVRegV(env); in iselNeonExpr_wrk()
4939 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4940 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4941 HReg argR2 = newVRegI(env); in iselNeonExpr_wrk()
4950 addInstr(env, ARMInstr_Unary(ARMun_NEG, argR2, argR)); in iselNeonExpr_wrk()
4951 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, in iselNeonExpr_wrk()
4953 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4961 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4962 HReg tmp = newVRegV(env); in iselNeonExpr_wrk()
4963 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4964 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4973 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, tmp, argR, 0, True)); in iselNeonExpr_wrk()
4974 addInstr(env, ARMInstr_NShift(ARMneon_VSHL, in iselNeonExpr_wrk()
4982 HReg res = newVRegV(env); in iselNeonExpr_wrk()
4983 HReg tmp = newVRegV(env); in iselNeonExpr_wrk()
4984 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
4985 HReg argR = iselIntExpr_R(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
4986 HReg argR2 = newVRegI(env); in iselNeonExpr_wrk()
4995 addInstr(env, ARMInstr_Unary(ARMun_NEG, argR2, argR)); in iselNeonExpr_wrk()
4996 addInstr(env, ARMInstr_NUnary(ARMneon_DUP, tmp, argR2, 0, True)); in iselNeonExpr_wrk()
4997 addInstr(env, ARMInstr_NShift(ARMneon_VSAL, in iselNeonExpr_wrk()
5004 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5005 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5006 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5014 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTU, in iselNeonExpr_wrk()
5021 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5022 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5023 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5031 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTS, in iselNeonExpr_wrk()
5038 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5039 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5040 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5048 addInstr(env, ARMInstr_NBinary(ARMneon_VCEQ, in iselNeonExpr_wrk()
5055 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5056 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5057 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5065 addInstr(env, ARMInstr_NBinary(ARMneon_VMUL, in iselNeonExpr_wrk()
5072 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5073 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5074 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5082 addInstr(env, ARMInstr_NBinary(ARMneon_VMULLU, in iselNeonExpr_wrk()
5090 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5091 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5092 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5100 addInstr(env, ARMInstr_NBinary(ARMneon_VMULLS, in iselNeonExpr_wrk()
5107 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5108 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5109 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5116 addInstr(env, ARMInstr_NBinary(ARMneon_VQDMULH, in iselNeonExpr_wrk()
5123 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5124 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5125 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5132 addInstr(env, ARMInstr_NBinary(ARMneon_VQRDMULH, in iselNeonExpr_wrk()
5139 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5140 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5141 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5148 addInstr(env, ARMInstr_NBinary(ARMneon_VQDMULL, in iselNeonExpr_wrk()
5153 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5154 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5155 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5157 addInstr(env, ARMInstr_NBinary(ARMneon_VMULP, in iselNeonExpr_wrk()
5162 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5163 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5164 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5165 addInstr(env, ARMInstr_NBinary(ARMneon_VMAXF, in iselNeonExpr_wrk()
5170 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5171 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5172 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5173 addInstr(env, ARMInstr_NBinary(ARMneon_VMINF, in iselNeonExpr_wrk()
5178 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5179 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5180 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5181 addInstr(env, ARMInstr_NBinary(ARMneon_VPMAXF, in iselNeonExpr_wrk()
5186 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5187 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5188 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5189 addInstr(env, ARMInstr_NBinary(ARMneon_VPMINF, in iselNeonExpr_wrk()
5194 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5195 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5196 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5197 addInstr(env, ARMInstr_NBinary(ARMneon_VCGTF, in iselNeonExpr_wrk()
5202 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5203 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5204 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5205 addInstr(env, ARMInstr_NBinary(ARMneon_VCGEF, in iselNeonExpr_wrk()
5210 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5211 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5212 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5213 addInstr(env, ARMInstr_NBinary(ARMneon_VCEQF, in iselNeonExpr_wrk()
5219 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5220 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5221 HReg argR = iselNeon64Expr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5223 addInstr(env, ARMInstr_NBinary(ARMneon_VMULLP, in iselNeonExpr_wrk()
5231 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5232 HReg arg = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5236 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeonExpr_wrk()
5250 addInstr(env, ARMInstr_NUnary(op, res, arg, imm6, True)); in iselNeonExpr_wrk()
5258 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5259 HReg argL = iselNeon64Expr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5263 typeOfIRExpr(env->type_env, e->Iex.Binop.arg2) != Ity_I8) { in iselNeonExpr_wrk()
5278 addInstr(env, ARMInstr_NUnary(ARMneon_VDUP, in iselNeonExpr_wrk()
5286 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5287 HReg argL = iselNeonExpr(env, e->Iex.Binop.arg1); in iselNeonExpr_wrk()
5288 HReg argR = iselNeonExpr(env, e->Iex.Binop.arg2); in iselNeonExpr_wrk()
5296 addInstr(env, ARMInstr_NBinary(ARMneon_VPADD, in iselNeonExpr_wrk()
5311 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5312 HReg argL = iselNeonExpr(env, triop->arg2); in iselNeonExpr_wrk()
5313 HReg argR = iselNeonExpr(env, triop->arg1); in iselNeonExpr_wrk()
5316 typeOfIRExpr(env->type_env, triop->arg3) != Ity_I8) { in iselNeonExpr_wrk()
5325 addInstr(env, ARMInstr_NBinary(ARMneon_VEXT, in iselNeonExpr_wrk()
5332 HReg res = newVRegV(env); in iselNeonExpr_wrk()
5333 HReg argL = iselNeonExpr(env, triop->arg2); in iselNeonExpr_wrk()
5334 HReg argR = iselNeonExpr(env, triop->arg3); in iselNeonExpr_wrk()
5343 addInstr(env, ARMInstr_NBinary(op, res, argL, argR, size, True)); in iselNeonExpr_wrk()
5353 HReg r1 = iselNeonExpr(env, e->Iex.ITE.iftrue); in iselNeonExpr_wrk()
5354 HReg r0 = iselNeonExpr(env, e->Iex.ITE.iffalse); in iselNeonExpr_wrk()
5355 HReg dst = newVRegV(env); in iselNeonExpr_wrk()
5356 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, dst, r1, 4, True)); in iselNeonExpr_wrk()
5357 cc = iselCondCode(env, e->Iex.ITE.cond); in iselNeonExpr_wrk()
5358 addInstr(env, ARMInstr_NCMovQ(cc ^ 1, dst, r0)); in iselNeonExpr_wrk()
5376 static HReg iselDblExpr ( ISelEnv* env, IRExpr* e ) in iselDblExpr() argument
5378 HReg r = iselDblExpr_wrk( env, e ); in iselDblExpr()
5388 static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e ) in iselDblExpr_wrk() argument
5390 IRType ty = typeOfIRExpr(env->type_env,e); in iselDblExpr_wrk()
5395 return lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselDblExpr_wrk()
5402 HReg z32 = newVRegI(env); in iselDblExpr_wrk()
5403 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5404 addInstr(env, ARMInstr_Imm32(z32, 0)); in iselDblExpr_wrk()
5405 addInstr(env, ARMInstr_VXferD(True/*toD*/, dst, z32, z32)); in iselDblExpr_wrk()
5412 HReg res = newVRegD(env); in iselDblExpr_wrk()
5414 am = iselIntExpr_AModeV(env, e->Iex.Load.addr); in iselDblExpr_wrk()
5415 addInstr(env, ARMInstr_VLdStD(True/*isLoad*/, res, am)); in iselDblExpr_wrk()
5423 HReg res = newVRegD(env); in iselDblExpr_wrk()
5424 addInstr(env, ARMInstr_VLdStD(True/*isLoad*/, res, am)); in iselDblExpr_wrk()
5431 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselDblExpr_wrk()
5432 return iselNeon64Expr(env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5435 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5436 iselInt64Expr(&srcHi, &srcLo, env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5437 addInstr(env, ARMInstr_VXferD(True/*toD*/, dst, srcHi, srcLo)); in iselDblExpr_wrk()
5442 HReg src = iselDblExpr(env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5443 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5444 addInstr(env, ARMInstr_VUnaryD(ARMvfpu_NEG, dst, src)); in iselDblExpr_wrk()
5448 HReg src = iselDblExpr(env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5449 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5450 addInstr(env, ARMInstr_VUnaryD(ARMvfpu_ABS, dst, src)); in iselDblExpr_wrk()
5454 HReg src = iselFltExpr(env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5455 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5456 addInstr(env, ARMInstr_VCvtSD(True/*sToD*/, dst, src)); in iselDblExpr_wrk()
5461 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselDblExpr_wrk()
5462 HReg f32 = newVRegF(env); in iselDblExpr_wrk()
5463 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5466 addInstr(env, ARMInstr_VXferS(True/*toS*/, f32, src)); in iselDblExpr_wrk()
5468 addInstr(env, ARMInstr_VCvtID(True/*iToD*/, syned, in iselDblExpr_wrk()
5481 HReg src = iselDblExpr(env, e->Iex.Binop.arg2); in iselDblExpr_wrk()
5482 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5483 addInstr(env, ARMInstr_VUnaryD(ARMvfpu_SQRT, dst, src)); in iselDblExpr_wrk()
5500 HReg argL = iselDblExpr(env, triop->arg2); in iselDblExpr_wrk()
5501 HReg argR = iselDblExpr(env, triop->arg3); in iselDblExpr_wrk()
5502 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5510 addInstr(env, ARMInstr_VAluD(op, dst, argL, argR)); in iselDblExpr_wrk()
5520 && typeOfIRExpr(env->type_env,e->Iex.ITE.cond) == Ity_I1) { in iselDblExpr_wrk()
5521 HReg r1 = iselDblExpr(env, e->Iex.ITE.iftrue); in iselDblExpr_wrk()
5522 HReg r0 = iselDblExpr(env, e->Iex.ITE.iffalse); in iselDblExpr_wrk()
5523 HReg dst = newVRegD(env); in iselDblExpr_wrk()
5524 addInstr(env, ARMInstr_VUnaryD(ARMvfpu_COPY, dst, r1)); in iselDblExpr_wrk()
5525 ARMCondCode cc = iselCondCode(env, e->Iex.ITE.cond); in iselDblExpr_wrk()
5526 addInstr(env, ARMInstr_VCMovD(cc ^ 1, dst, r0)); in iselDblExpr_wrk()
5545 static HReg iselFltExpr ( ISelEnv* env, IRExpr* e ) in iselFltExpr() argument
5547 HReg r = iselFltExpr_wrk( env, e ); in iselFltExpr()
5557 static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e ) in iselFltExpr_wrk() argument
5559 IRType ty = typeOfIRExpr(env->type_env,e); in iselFltExpr_wrk()
5564 return lookupIRTemp(env, e->Iex.RdTmp.tmp); in iselFltExpr_wrk()
5569 HReg res = newVRegF(env); in iselFltExpr_wrk()
5571 am = iselIntExpr_AModeV(env, e->Iex.Load.addr); in iselFltExpr_wrk()
5572 addInstr(env, ARMInstr_VLdStS(True/*isLoad*/, res, am)); in iselFltExpr_wrk()
5580 HReg res = newVRegF(env); in iselFltExpr_wrk()
5581 addInstr(env, ARMInstr_VLdStS(True/*isLoad*/, res, am)); in iselFltExpr_wrk()
5588 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5589 HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); in iselFltExpr_wrk()
5590 addInstr(env, ARMInstr_VXferS(True/*toS*/, dst, src)); in iselFltExpr_wrk()
5594 HReg src = iselFltExpr(env, e->Iex.Unop.arg); in iselFltExpr_wrk()
5595 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5596 addInstr(env, ARMInstr_VUnaryS(ARMvfpu_NEG, dst, src)); in iselFltExpr_wrk()
5600 HReg src = iselFltExpr(env, e->Iex.Unop.arg); in iselFltExpr_wrk()
5601 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5602 addInstr(env, ARMInstr_VUnaryS(ARMvfpu_ABS, dst, src)); in iselFltExpr_wrk()
5614 HReg src = iselFltExpr(env, e->Iex.Binop.arg2); in iselFltExpr_wrk()
5615 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5616 addInstr(env, ARMInstr_VUnaryS(ARMvfpu_SQRT, dst, src)); in iselFltExpr_wrk()
5620 HReg valD = iselDblExpr(env, e->Iex.Binop.arg2); in iselFltExpr_wrk()
5621 set_VFP_rounding_mode(env, e->Iex.Binop.arg1); in iselFltExpr_wrk()
5622 HReg valS = newVRegF(env); in iselFltExpr_wrk()
5624 addInstr(env, ARMInstr_VCvtSD(False/*!sToD*/, valS, valD)); in iselFltExpr_wrk()
5625 set_VFP_rounding_default(env); in iselFltExpr_wrk()
5642 HReg argL = iselFltExpr(env, triop->arg2); in iselFltExpr_wrk()
5643 HReg argR = iselFltExpr(env, triop->arg3); in iselFltExpr_wrk()
5644 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5652 addInstr(env, ARMInstr_VAluS(op, dst, argL, argR)); in iselFltExpr_wrk()
5662 && typeOfIRExpr(env->type_env,e->Iex.ITE.cond) == Ity_I1) { in iselFltExpr_wrk()
5664 HReg r1 = iselFltExpr(env, e->Iex.ITE.iftrue); in iselFltExpr_wrk()
5665 HReg r0 = iselFltExpr(env, e->Iex.ITE.iffalse); in iselFltExpr_wrk()
5666 HReg dst = newVRegF(env); in iselFltExpr_wrk()
5667 addInstr(env, ARMInstr_VUnaryS(ARMvfpu_COPY, dst, r1)); in iselFltExpr_wrk()
5668 cc = iselCondCode(env, e->Iex.ITE.cond); in iselFltExpr_wrk()
5669 addInstr(env, ARMInstr_VCMovS(cc ^ 1, dst, r0)); in iselFltExpr_wrk()
5683 static void iselStmt ( ISelEnv* env, IRStmt* stmt ) in iselStmt() argument
5695 IRType tya = typeOfIRExpr(env->type_env, stmt->Ist.Store.addr); in iselStmt()
5696 IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Store.data); in iselStmt()
5703 HReg rD = iselIntExpr_R(env, stmt->Ist.Store.data); in iselStmt()
5704 ARMAMode1* am = iselIntExpr_AMode1(env, stmt->Ist.Store.addr); in iselStmt()
5705 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!isLoad*/, rD, am)); in iselStmt()
5709 HReg rD = iselIntExpr_R(env, stmt->Ist.Store.data); in iselStmt()
5710 ARMAMode2* am = iselIntExpr_AMode2(env, stmt->Ist.Store.addr); in iselStmt()
5711 addInstr(env, ARMInstr_LdSt16(ARMcc_AL, in iselStmt()
5717 HReg rD = iselIntExpr_R(env, stmt->Ist.Store.data); in iselStmt()
5718 ARMAMode1* am = iselIntExpr_AMode1(env, stmt->Ist.Store.addr); in iselStmt()
5719 addInstr(env, ARMInstr_LdSt8U(ARMcc_AL, False/*!isLoad*/, rD, am)); in iselStmt()
5723 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselStmt()
5724 HReg dD = iselNeon64Expr(env, stmt->Ist.Store.data); in iselStmt()
5725 ARMAModeN* am = iselIntExpr_AModeN(env, stmt->Ist.Store.addr); in iselStmt()
5726 addInstr(env, ARMInstr_NLdStD(False, dD, am)); in iselStmt()
5729 iselInt64Expr(&rDhi, &rDlo, env, stmt->Ist.Store.data); in iselStmt()
5730 rA = iselIntExpr_R(env, stmt->Ist.Store.addr); in iselStmt()
5731 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!load*/, rDhi, in iselStmt()
5733 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!load*/, rDlo, in iselStmt()
5739 HReg dD = iselDblExpr(env, stmt->Ist.Store.data); in iselStmt()
5740 ARMAModeV* am = iselIntExpr_AModeV(env, stmt->Ist.Store.addr); in iselStmt()
5741 addInstr(env, ARMInstr_VLdStD(False/*!isLoad*/, dD, am)); in iselStmt()
5745 HReg fD = iselFltExpr(env, stmt->Ist.Store.data); in iselStmt()
5746 ARMAModeV* am = iselIntExpr_AModeV(env, stmt->Ist.Store.addr); in iselStmt()
5747 addInstr(env, ARMInstr_VLdStS(False/*!isLoad*/, fD, am)); in iselStmt()
5751 HReg qD = iselNeonExpr(env, stmt->Ist.Store.data); in iselStmt()
5752 ARMAModeN* am = iselIntExpr_AModeN(env, stmt->Ist.Store.addr); in iselStmt()
5753 addInstr(env, ARMInstr_NLdStQ(False, qD, am)); in iselStmt()
5764 IRType tya = typeOfIRExpr(env->type_env, sg->addr); in iselStmt()
5765 IRType tyd = typeOfIRExpr(env->type_env, sg->data); in iselStmt()
5774 HReg rD = iselIntExpr_R(env, sg->data); in iselStmt()
5775 ARMAMode1* am = iselIntExpr_AMode1(env, sg->addr); in iselStmt()
5776 ARMCondCode cc = iselCondCode(env, sg->guard); in iselStmt()
5777 addInstr(env, (tyd == Ity_I32 ? ARMInstr_LdSt32 : ARMInstr_LdSt8U) in iselStmt()
5782 HReg rD = iselIntExpr_R(env, sg->data); in iselStmt()
5783 ARMAMode2* am = iselIntExpr_AMode2(env, sg->addr); in iselStmt()
5784 ARMCondCode cc = iselCondCode(env, sg->guard); in iselStmt()
5785 addInstr(env, ARMInstr_LdSt16(cc, in iselStmt()
5800 IRType tya = typeOfIRExpr(env->type_env, lg->addr); in iselStmt()
5809 HReg rAlt = iselIntExpr_R(env, lg->alt); in iselStmt()
5810 ARMAMode1* am = iselIntExpr_AMode1(env, lg->addr); in iselStmt()
5811 HReg rD = lookupIRTemp(env, lg->dst); in iselStmt()
5812 addInstr(env, mk_iMOVds_RR(rD, rAlt)); in iselStmt()
5813 ARMCondCode cc = iselCondCode(env, lg->guard); in iselStmt()
5814 addInstr(env, (lg->cvt == ILGop_Ident32 ? ARMInstr_LdSt32 in iselStmt()
5822 HReg rAlt = iselIntExpr_R(env, lg->alt); in iselStmt()
5823 ARMAMode2* am = iselIntExpr_AMode2(env, lg->addr); in iselStmt()
5824 HReg rD = lookupIRTemp(env, lg->dst); in iselStmt()
5825 addInstr(env, mk_iMOVds_RR(rD, rAlt)); in iselStmt()
5826 ARMCondCode cc = iselCondCode(env, lg->guard); in iselStmt()
5828 addInstr(env, ARMInstr_Ld8S(cc, rD, am)); in iselStmt()
5832 addInstr(env, ARMInstr_LdSt16(cc, True/*isLoad*/, sx, rD, am)); in iselStmt()
5845 IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.Put.data); in iselStmt()
5848 HReg rD = iselIntExpr_R(env, stmt->Ist.Put.data); in iselStmt()
5850 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!isLoad*/, rD, am)); in iselStmt()
5854 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselStmt()
5855 HReg addr = newVRegI(env); in iselStmt()
5856 HReg qD = iselNeon64Expr(env, stmt->Ist.Put.data); in iselStmt()
5857 addInstr(env, ARMInstr_Add32(addr, hregARM_R8(), in iselStmt()
5859 addInstr(env, ARMInstr_NLdStD(False, qD, mkARMAModeN_R(addr))); in iselStmt()
5866 iselInt64Expr(&rDhi, &rDlo, env, stmt->Ist.Put.data); in iselStmt()
5867 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!isLoad*/, in iselStmt()
5869 addInstr(env, ARMInstr_LdSt32(ARMcc_AL, False/*!isLoad*/, in iselStmt()
5878 HReg rD = iselDblExpr(env, stmt->Ist.Put.data); in iselStmt()
5879 addInstr(env, ARMInstr_VLdStD(False/*!isLoad*/, rD, am)); in iselStmt()
5886 HReg rD = iselFltExpr(env, stmt->Ist.Put.data); in iselStmt()
5887 addInstr(env, ARMInstr_VLdStS(False/*!isLoad*/, rD, am)); in iselStmt()
5891 HReg addr = newVRegI(env); in iselStmt()
5892 HReg qD = iselNeonExpr(env, stmt->Ist.Put.data); in iselStmt()
5893 addInstr(env, ARMInstr_Add32(addr, hregARM_R8(), in iselStmt()
5895 addInstr(env, ARMInstr_NLdStQ(False, qD, mkARMAModeN_R(addr))); in iselStmt()
5905 IRType ty = typeOfIRTemp(env->type_env, tmp); in iselStmt()
5909 env, stmt->Ist.WrTmp.data); in iselStmt()
5910 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5911 addInstr(env, ARMInstr_Mov(dst,ri84)); in iselStmt()
5922 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5923 ARMCondCode cond = iselCondCode(env, stmt->Ist.WrTmp.data); in iselStmt()
5924 addInstr(env, ARMInstr_Mov(dst, ARMRI84_I84(0,0))); in iselStmt()
5925 addInstr(env, ARMInstr_CMov(cond, dst, ARMRI84_I84(1,0))); in iselStmt()
5929 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselStmt()
5930 HReg src = iselNeon64Expr(env, stmt->Ist.WrTmp.data); in iselStmt()
5931 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5932 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, dst, src, 4, False)); in iselStmt()
5935 iselInt64Expr(&rHi,&rLo, env, stmt->Ist.WrTmp.data); in iselStmt()
5936 lookupIRTemp64( &dstHi, &dstLo, env, tmp); in iselStmt()
5937 addInstr(env, mk_iMOVds_RR(dstHi, rHi) ); in iselStmt()
5938 addInstr(env, mk_iMOVds_RR(dstLo, rLo) ); in iselStmt()
5943 HReg src = iselDblExpr(env, stmt->Ist.WrTmp.data); in iselStmt()
5944 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5945 addInstr(env, ARMInstr_VUnaryD(ARMvfpu_COPY, dst, src)); in iselStmt()
5949 HReg src = iselFltExpr(env, stmt->Ist.WrTmp.data); in iselStmt()
5950 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5951 addInstr(env, ARMInstr_VUnaryS(ARMvfpu_COPY, dst, src)); in iselStmt()
5955 HReg src = iselNeonExpr(env, stmt->Ist.WrTmp.data); in iselStmt()
5956 HReg dst = lookupIRTemp(env, tmp); in iselStmt()
5957 addInstr(env, ARMInstr_NUnary(ARMneon_COPY, dst, src, 4, True)); in iselStmt()
5971 retty = typeOfIRTemp(env->type_env, d->tmp); in iselStmt()
5990 doHelperCall( &addToSp, &rloc, env, d->guard, d->cee, retty, d->args ); in iselStmt()
6005 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselStmt()
6006 HReg tmp = lookupIRTemp(env, d->tmp); in iselStmt()
6007 addInstr(env, ARMInstr_VXferD(True, tmp, hregARM_R1(), in iselStmt()
6013 lookupIRTemp64( &dstHi, &dstLo, env, d->tmp); in iselStmt()
6014 addInstr(env, mk_iMOVds_RR(dstHi, hregARM_R1()) ); in iselStmt()
6015 addInstr(env, mk_iMOVds_RR(dstLo, hregARM_R0()) ); in iselStmt()
6024 HReg dst = lookupIRTemp(env, d->tmp); in iselStmt()
6025 addInstr(env, mk_iMOVds_RR(dst, hregARM_R0()) ); in iselStmt()
6042 HReg dst = lookupIRTemp(env, d->tmp); in iselStmt()
6043 HReg tmp = newVRegI(env); in iselStmt()
6045 addInstr(env, ARMInstr_Alu(ARMalu_ADD, in iselStmt()
6048 addInstr(env, ARMInstr_NLdStQ(True/*load*/, dst, am)); in iselStmt()
6049 addInstr(env, ARMInstr_Alu(ARMalu_ADD, in iselStmt()
6065 IRType ty = typeOfIRTemp(env->type_env, res); in iselStmt()
6068 HReg r_dst = lookupIRTemp(env, res); in iselStmt()
6069 HReg raddr = iselIntExpr_R(env, stmt->Ist.LLSC.addr); in iselStmt()
6076 addInstr(env, mk_iMOVds_RR(hregARM_R4(), raddr)); in iselStmt()
6077 addInstr(env, ARMInstr_LdrEX(szB)); in iselStmt()
6078 addInstr(env, mk_iMOVds_RR(r_dst, hregARM_R2())); in iselStmt()
6082 HReg raddr = iselIntExpr_R(env, stmt->Ist.LLSC.addr); in iselStmt()
6083 addInstr(env, mk_iMOVds_RR(hregARM_R4(), raddr)); in iselStmt()
6084 addInstr(env, ARMInstr_LdrEX(8)); in iselStmt()
6089 if (env->hwcaps & VEX_HWCAPS_ARM_NEON) { in iselStmt()
6090 HReg dst = lookupIRTemp(env, res); in iselStmt()
6091 addInstr(env, ARMInstr_VXferD(True, dst, hregARM_R3(), in iselStmt()
6095 lookupIRTemp64(&r_dst_hi, &r_dst_lo, env, res); in iselStmt()
6096 addInstr(env, mk_iMOVds_RR(r_dst_lo, hregARM_R2())); in iselStmt()
6097 addInstr(env, mk_iMOVds_RR(r_dst_hi, hregARM_R3())); in iselStmt()
6105 IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.LLSC.storedata); in iselStmt()
6108 HReg rD = iselIntExpr_R(env, stmt->Ist.LLSC.storedata); in iselStmt()
6109 HReg rA = iselIntExpr_R(env, stmt->Ist.LLSC.addr); in iselStmt()
6116 addInstr(env, mk_iMOVds_RR(hregARM_R2(), rD)); in iselStmt()
6117 addInstr(env, mk_iMOVds_RR(hregARM_R4(), rA)); in iselStmt()
6118 addInstr(env, ARMInstr_StrEX(szB)); in iselStmt()
6127 iselInt64Expr(&rDhi, &rDlo, env, stmt->Ist.LLSC.storedata); in iselStmt()
6128 HReg rA = iselIntExpr_R(env, stmt->Ist.LLSC.addr); in iselStmt()
6129 addInstr(env, mk_iMOVds_RR(hregARM_R2(), rDlo)); in iselStmt()
6130 addInstr(env, mk_iMOVds_RR(hregARM_R3(), rDhi)); in iselStmt()
6131 addInstr(env, mk_iMOVds_RR(hregARM_R4(), rA)); in iselStmt()
6132 addInstr(env, ARMInstr_StrEX(8)); in iselStmt()
6138 IRType ty = typeOfIRTemp(env->type_env, res); in iselStmt()
6139 HReg r_res = lookupIRTemp(env, res); in iselStmt()
6142 addInstr(env, ARMInstr_Alu(ARMalu_XOR, r_res, hregARM_R0(), one)); in iselStmt()
6144 addInstr(env, ARMInstr_Alu(ARMalu_AND, r_res, r_res, one)); in iselStmt()
6154 addInstr(env, ARMInstr_MFence()); in iselStmt()
6157 addInstr(env, ARMInstr_CLREX()); in iselStmt()
6178 ARMCondCode cc = iselCondCode(env, stmt->Ist.Exit.guard); in iselStmt()
6186 if (env->chainingAllowed) { in iselStmt()
6191 = stmt->Ist.Exit.dst->Ico.U32 > env->max_ga; in iselStmt()
6193 addInstr(env, ARMInstr_XDirect(stmt->Ist.Exit.dst->Ico.U32, in iselStmt()
6199 HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst)); in iselStmt()
6200 addInstr(env, ARMInstr_XAssisted(r, amR15T, cc, Ijk_Boring)); in iselStmt()
6215 HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst)); in iselStmt()
6216 addInstr(env, ARMInstr_XAssisted(r, amR15T, cc, in iselStmt()
6240 static void iselNext ( ISelEnv* env, in iselNext() argument
6258 if (env->chainingAllowed) { in iselNext()
6263 = cdst->Ico.U32 > env->max_ga; in iselNext()
6265 addInstr(env, ARMInstr_XDirect(cdst->Ico.U32, in iselNext()
6272 HReg r = iselIntExpr_R(env, next); in iselNext()
6273 addInstr(env, ARMInstr_XAssisted(r, amR15T, ARMcc_AL, in iselNext()
6283 HReg r = iselIntExpr_R(env, next); in iselNext()
6285 if (env->chainingAllowed) { in iselNext()
6286 addInstr(env, ARMInstr_XIndir(r, amR15T, ARMcc_AL)); in iselNext()
6288 addInstr(env, ARMInstr_XAssisted(r, amR15T, ARMcc_AL, in iselNext()
6307 HReg r = iselIntExpr_R(env, next); in iselNext()
6309 addInstr(env, ARMInstr_XAssisted(r, amR15T, ARMcc_AL, jk)); in iselNext()
6343 ISelEnv* env; in iselSB_ARM() local
6360 env = LibVEX_Alloc_inline(sizeof(ISelEnv)); in iselSB_ARM()
6361 env->vreg_ctr = 0; in iselSB_ARM()
6364 env->code = newHInstrArray(); in iselSB_ARM()
6366 /* Copy BB's type env. */ in iselSB_ARM()
6367 env->type_env = bb->tyenv; in iselSB_ARM()
6371 env->n_vregmap = bb->tyenv->types_used; in iselSB_ARM()
6372 env->vregmap = LibVEX_Alloc_inline(env->n_vregmap * sizeof(HReg)); in iselSB_ARM()
6373 env->vregmapHI = LibVEX_Alloc_inline(env->n_vregmap * sizeof(HReg)); in iselSB_ARM()
6376 env->chainingAllowed = chainingAllowed; in iselSB_ARM()
6377 env->hwcaps = hwcaps_host; in iselSB_ARM()
6378 env->max_ga = max_ga; in iselSB_ARM()
6383 for (i = 0; i < env->n_vregmap; i++) { in iselSB_ARM()
6404 env->vregmap[i] = hreg; in iselSB_ARM()
6405 env->vregmapHI[i] = hregHI; in iselSB_ARM()
6407 env->vreg_ctr = j; in iselSB_ARM()
6412 addInstr(env, ARMInstr_EvCheck(amCounter, amFailAddr)); in iselSB_ARM()
6419 addInstr(env, ARMInstr_ProfInc()); in iselSB_ARM()
6424 iselStmt(env, bb->stmts[i]); in iselSB_ARM()
6426 iselNext(env, bb->next, bb->jumpkind, bb->offsIP); in iselSB_ARM()
6429 env->code->n_vregs = env->vreg_ctr; in iselSB_ARM()
6430 return env->code; in iselSB_ARM()