Lines Matching refs:IRAtom
314 typedef IRExpr IRAtom;
318 static Bool isOriginalAtom ( MCEnv* mce, IRAtom* a1 )
331 static Bool isShadowAtom ( MCEnv* mce, IRAtom* a1 )
344 static Bool sameKindedAtoms ( IRAtom* a1, IRAtom* a2 )
441 static IRAtom* assignNew ( HChar cat, MCEnv* mce, IRType ty, IRExpr* e )
468 IRAtom* z64 = IRExpr_Const(IRConst_U64(0));
483 static IRAtom* mkDifD8 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
489 static IRAtom* mkDifD16 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
495 static IRAtom* mkDifD32 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
501 static IRAtom* mkDifD64 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
507 static IRAtom* mkDifDV128 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
513 static IRAtom* mkDifDV256 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
521 static IRAtom* mkUifU8 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
527 static IRAtom* mkUifU16 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
533 static IRAtom* mkUifU32 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
539 static IRAtom* mkUifU64 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
545 static IRAtom* mkUifU128 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
546 IRAtom *tmp1, *tmp2, *tmp3, *tmp4, *tmp5, *tmp6;
559 static IRAtom* mkUifUV128 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
565 static IRAtom* mkUifUV256 ( MCEnv* mce, IRAtom* a1, IRAtom* a2 ) {
571 static IRAtom* mkUifU ( MCEnv* mce, IRType vty, IRAtom* a1, IRAtom* a2 ) {
587 static IRAtom* mkLeft8 ( MCEnv* mce, IRAtom* a1 ) {
592 static IRAtom* mkLeft16 ( MCEnv* mce, IRAtom* a1 ) {
597 static IRAtom* mkLeft32 ( MCEnv* mce, IRAtom* a1 ) {
602 static IRAtom* mkLeft64 ( MCEnv* mce, IRAtom* a1 ) {
612 static IRAtom* mkImproveAND8 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
620 static IRAtom* mkImproveAND16 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
628 static IRAtom* mkImproveAND32 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
636 static IRAtom* mkImproveAND64 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
644 static IRAtom* mkImproveANDV128 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
652 static IRAtom* mkImproveANDV256 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
663 static IRAtom* mkImproveOR8 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
675 static IRAtom* mkImproveOR16 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
687 static IRAtom* mkImproveOR32 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
699 static IRAtom* mkImproveOR64 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
711 static IRAtom* mkImproveORV128 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
723 static IRAtom* mkImproveORV256 ( MCEnv* mce, IRAtom* data, IRAtom* vbits )
741 static IRAtom* mkPCastTo( MCEnv* mce, IRType dst_ty, IRAtom* vbits )
744 IRAtom* tmp1;
759 IRAtom* tmp = assignNew('V', mce, Ity_I32, unop(Iop_CmpwNEZ32, vbits));
766 IRAtom* tmp = assignNew('V', mce, Ity_I64, unop(Iop_CmpwNEZ64, vbits));
792 IRAtom* tmp2 = assignNew('V', mce, Ity_I64, unop(Iop_128HIto64, vbits));
793 IRAtom* tmp3 = assignNew('V', mce, Ity_I64, unop(Iop_128to64, vbits));
794 IRAtom* tmp4 = assignNew('V', mce, Ity_I64, binop(Iop_Or64, tmp2, tmp3));
873 static IRAtom* expensiveCmpEQorNE ( MCEnv* mce,
875 IRAtom* vxx, IRAtom* vyy,
876 IRAtom* xx, IRAtom* yy )
878 IRAtom *naive, *vec, *improvement_term;
879 IRAtom *improved, *final_cast, *top;
969 static Bool isZeroU32 ( IRAtom* e )
977 static Bool isZeroU64 ( IRAtom* e )
985 static IRAtom* doCmpORD ( MCEnv* mce,
987 IRAtom* xxhash, IRAtom* yyhash,
988 IRAtom* xx, IRAtom* yy )
999 Bool (*isZero)(IRAtom*) = m64 ? isZeroU64 : isZeroU32;
1001 IRAtom* threeLeft1 = NULL;
1002 IRAtom* sevenLeft1 = NULL;
1061 static IRAtom* schemeE ( MCEnv* mce, IRExpr* e ); /* fwds */
1094 static void complainIfUndefined ( MCEnv* mce, IRAtom* atom, IRExpr *guard )
1096 IRAtom* vatom;
1100 IRAtom* cond;
1101 IRAtom* origin;
1230 IRAtom *g1 = assignNew('V', mce, Ity_I32, unop(Iop_1Uto32, di->guard));
1231 IRAtom *g2 = assignNew('V', mce, Ity_I32, unop(Iop_1Uto32, guard));
1232 IRAtom *e = assignNew('V', mce, Ity_I32, binop(Iop_And32, g1, g2));
1297 IRAtom* atom, IRAtom* vatom, IRExpr *guard )
1328 IRAtom *cond, *iffalse;
1346 IRAtom* vatom;
1350 IRAtom* ix = puti->ix;
1352 IRAtom* atom = puti->data;
1410 IRRegArray* descr, IRAtom* ix, Int bias )
1441 IRAtom* mkLazy2 ( MCEnv* mce, IRType finalVty, IRAtom* va1, IRAtom* va2 )
1443 IRAtom* at;
1489 IRAtom* mkLazy3 ( MCEnv* mce, IRType finalVty,
1490 IRAtom* va1, IRAtom* va2, IRAtom* va3 )
1492 IRAtom* at;
1586 IRAtom* mkLazy4 ( MCEnv* mce, IRType finalVty,
1587 IRAtom* va1, IRAtom* va2, IRAtom* va3, IRAtom* va4 )
1589 IRAtom* at;
1658 IRAtom* mkLazyN ( MCEnv* mce,
1659 IRAtom** exprvec, IRType finalVtype, IRCallee* cee )
1662 IRAtom* here;
1663 IRAtom* curr;
1710 IRAtom* expensiveAddSub ( MCEnv* mce,
1713 IRAtom* qaa, IRAtom* qbb,
1714 IRAtom* aa, IRAtom* bb )
1716 IRAtom *a_min, *b_min, *a_max, *b_max;
1819 static IRAtom* scalarShift ( MCEnv* mce,
1822 IRAtom* qaa, IRAtom* qbb,
1823 IRAtom* aa, IRAtom* bb )
1848 static IRAtom* mkPCast8x16 ( MCEnv* mce, IRAtom* at )
1853 static IRAtom* mkPCast16x8 ( MCEnv* mce, IRAtom* at )
1858 static IRAtom* mkPCast32x4 ( MCEnv* mce, IRAtom* at )
1863 static IRAtom* mkPCast64x2 ( MCEnv* mce, IRAtom* at )
1868 static IRAtom* mkPCast64x4 ( MCEnv* mce, IRAtom* at )
1873 static IRAtom* mkPCast32x8 ( MCEnv* mce, IRAtom* at )
1878 static IRAtom* mkPCast32x2 ( MCEnv* mce, IRAtom* at )
1883 static IRAtom* mkPCast16x4 ( MCEnv* mce, IRAtom* at )
1888 static IRAtom* mkPCast8x8 ( MCEnv* mce, IRAtom* at )
1893 static IRAtom* mkPCast16x2 ( MCEnv* mce, IRAtom* at )
1898 static IRAtom* mkPCast8x4 ( MCEnv* mce, IRAtom* at )
1941 IRAtom* binary32Fx4 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
1943 IRAtom* at;
1952 IRAtom* unary32Fx4 ( MCEnv* mce, IRAtom* vatomX )
1954 IRAtom* at;
1961 IRAtom* binary32F0x4 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
1963 IRAtom* at;
1974 IRAtom* unary32F0x4 ( MCEnv* mce, IRAtom* vatomX )
1976 IRAtom* at;
1987 IRAtom* binary64Fx2 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
1989 IRAtom* at;
1998 IRAtom* unary64Fx2 ( MCEnv* mce, IRAtom* vatomX )
2000 IRAtom* at;
2007 IRAtom* binary64F0x2 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
2009 IRAtom* at;
2020 IRAtom* unary64F0x2 ( MCEnv* mce, IRAtom* vatomX )
2022 IRAtom* at;
2033 IRAtom* binary32Fx2 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
2035 IRAtom* at;
2044 IRAtom* unary32Fx2 ( MCEnv* mce, IRAtom* vatomX )
2046 IRAtom* at;
2055 IRAtom* binary64Fx4 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
2057 IRAtom* at;
2066 IRAtom* unary64Fx4 ( MCEnv* mce, IRAtom* vatomX )
2068 IRAtom* at;
2077 IRAtom* binary32Fx8 ( MCEnv* mce, IRAtom* vatomX, IRAtom* vatomY )
2079 IRAtom* at;
2088 IRAtom* unary32Fx8 ( MCEnv* mce, IRAtom* vatomX )
2090 IRAtom* at;
2184 IRAtom* vectorNarrowBinV128 ( MCEnv* mce, IROp narrow_op,
2185 IRAtom* vatom1, IRAtom* vatom2)
2187 IRAtom *at1, *at2, *at3;
2188 IRAtom* (*pcast)( MCEnv*, IRAtom* );
2208 IRAtom* vectorNarrowBin64 ( MCEnv* mce, IROp narrow_op,
2209 IRAtom* vatom1, IRAtom* vatom2)
2211 IRAtom *at1, *at2, *at3;
2212 IRAtom* (*pcast)( MCEnv*, IRAtom* );
2229 IRAtom* vectorNarrowUnV128 ( MCEnv* mce, IROp narrow_op,
2230 IRAtom* vatom1)
2232 IRAtom *at1, *at2;
2233 IRAtom* (*pcast)( MCEnv*, IRAtom* );
2267 IRAtom* vectorWidenI64 ( MCEnv* mce, IROp longen_op,
2268 IRAtom* vatom1)
2270 IRAtom *at1, *at2;
2271 IRAtom* (*pcast)( MCEnv*, IRAtom* );
2295 IRAtom* binary8Ix16 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2297 IRAtom* at;
2304 IRAtom* binary16Ix8 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2306 IRAtom* at;
2313 IRAtom* binary32Ix4 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2315 IRAtom* at;
2322 IRAtom* binary64Ix2 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2324 IRAtom* at;
2333 IRAtom* binary8Ix8 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2335 IRAtom* at;
2342 IRAtom* binary16Ix4 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2344 IRAtom* at;
2351 IRAtom* binary32Ix2 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2353 IRAtom* at;
2360 IRAtom* binary64Ix1 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2362 IRAtom* at;
2371 IRAtom* binary8Ix4 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2373 IRAtom* at;
2380 IRAtom* binary16Ix2 ( MCEnv* mce, IRAtom* vatom1, IRAtom* vatom2 )
2382 IRAtom* at;
2394 IRAtom* expr2vbits_Qop ( MCEnv* mce,
2396 IRAtom* atom1, IRAtom* atom2,
2397 IRAtom* atom3, IRAtom* atom4 )
2399 IRAtom* vatom1 = expr2vbits( mce, atom1 );
2400 IRAtom* vatom2 = expr2vbits( mce, atom2 );
2401 IRAtom* vatom3 = expr2vbits( mce, atom3 );
2402 IRAtom* vatom4 = expr2vbits( mce, atom4 );
2442 IRAtom* expr2vbits_Triop ( MCEnv* mce,
2444 IRAtom* atom1, IRAtom* atom2, IRAtom* atom3 )
2446 IRAtom* vatom1 = expr2vbits( mce, atom1 );
2447 IRAtom
2448 IRAtom* vatom3 = expr2vbits( mce, atom3 );
2527 IRAtom* expr2vbits_Binop ( MCEnv* mce,
2529 IRAtom* atom1, IRAtom* atom2 )
2532 IRAtom* (*uifu) (MCEnv*, IRAtom*, IRAtom*);
2533 IRAtom* (*difd) (MCEnv*, IRAtom*, IRAtom*);
2534 IRAtom* (*improve) (MCEnv*, IRAtom*, IRAtom*);
2536 IRAtom* vatom1 = expr2vbits( mce, atom1 );
2537 IRAtom* vatom2 = expr2vbits( mce, atom2 );
3147 IRAtom* at;
3157 IRAtom* at;
3325 IRAtom* vLo64 = mkLeft64(mce, mkUifU64(mce, vatom1,vatom2));
3326 IRAtom* vHi64 = mkPCastTo(mce, Ity_I64, vLo64);
3333 IRAtom* vLo32 = mkLeft32(mce, mkUifU32(mce, vatom1,vatom2));
3334 IRAtom* vHi32 = mkPCastTo(mce, Ity_I32, vLo32);
3341 IRAtom* vLo16 = mkLeft16(mce, mkUifU16(mce, vatom1,vatom2));
3342 IRAtom* vHi16 = mkPCastTo(mce, Ity_I16, vLo16);
3349 IRAtom* vLo8 = mkLeft8(mce, mkUifU8(mce, vatom1,vatom2));
3350 IRAtom* vHi8 = mkPCastTo(mce, Ity_I8, vLo8);
3534 IRExpr* expr2vbits_Unop ( MCEnv* mce, IROp op, IRAtom* atom )
3536 IRAtom* vatom = expr2vbits( mce, atom );
3829 IRAtom* expr2vbits_Load_WRK ( MCEnv* mce,
3831 IRAtom* addr, UInt bias )
3837 IRAtom* addrAct;
3891 IRAtom* eBias;
3914 IRAtom* expr2vbits_Load ( MCEnv* mce,
3916 IRAtom* addr, UInt bias )
3926 IRAtom *v64hi, *v64lo;
3942 IRAtom* v64Q0 = expr2vbits_Load_WRK(mce, end, Ity_I64, addr, bias+0);
3943 IRAtom* v64Q1 = expr2vbits_Load_WRK(mce, end, Ity_I64, addr, bias+8);
3944 IRAtom* v64Q2 = expr2vbits_Load_WRK(mce, end, Ity_I64, addr, bias+16);
3945 IRAtom* v64Q3 = expr2vbits_Load_WRK(mce, end, Ity_I64, addr, bias+24);
3964 IRAtom* expr2vbits_guarded_Load ( MCEnv* mce,
3966 IRAtom* addr, UInt bias, IRAtom *guard )
3969 IRAtom *cond, *iffalse, *iftrue;
3985 IRAtom* expr2vbits_Mux0X ( MCEnv* mce,
3986 IRAtom* cond, IRAtom* expr0, IRAtom* exprX )
3988 IRAtom *vbitsC, *vbits0, *vbitsX;
4085 IRExpr* zwidenToHostWord ( MCEnv* mce, IRAtom* vatom )
4139 IRAtom* addr, UInt bias,
4140 IRAtom* data, IRAtom* vdata,
4141 IRAtom* guard )
4245 IRAtom *addrQ0, *addrQ1, *addrQ2, *addrQ3;
4246 IRAtom *vdataQ0, *vdataQ1, *vdataQ2, *vdataQ3;
4247 IRAtom *eBiasQ0, *eBiasQ1, *eBiasQ2, *eBiasQ3;
4312 IRAtom *addrLo64, *addrHi64;
4313 IRAtom *vdataLo64, *vdataHi64;
4314 IRAtom *eBiasLo64, *eBiasHi64;
4350 IRAtom *addrAct;
4357 IRAtom* eBias = tyAddr==Ity_I32 ? mkU32(bias) : mkU64(bias);
4405 IRAtom *src, *here, *curr;
4468 IRAtom *cond, *iffalse, *iftrue;
4652 static IRAtom* gen_load_b ( MCEnv* mce, Int szB,
4653 IRAtom* baseaddr, Int offset );
4654 static IRAtom* gen_maxU32 ( MCEnv* mce, IRAtom* b1, IRAtom* b2 );
4656 IRAtom* baseaddr, Int offset, IRAtom* dataB,
4657 IRAtom* guard );
4688 IRAtom* orig, IRAtom* shadow )
4849 IRAtom *vdataLo = NULL, *bdataLo = NULL;
4850 IRAtom *vexpdLo = NULL, *bexpdLo = NULL;
4851 IRAtom *voldLo = NULL, *boldLo = NULL;
4852 IRAtom *expd_eq_old = NULL;
4938 IRAtom *vdataHi = NULL, *bdataHi = NULL;
4939 IRAtom *vdataLo = NULL, *bdataLo = NULL;
4940 IRAtom *vexpdHi = NULL, *bexpdHi = NULL;
4941 IRAtom *vexpdLo = NULL, *bexpdLo = NULL;
4942 IRAtom *voldHi = NULL, *boldHi = NULL;
4943 IRAtom *voldLo = NULL, *boldLo = NULL;
4944 IRAtom *xHi = NULL, *xLo = NULL, *xHL = NULL;
4945 IRAtom *expd_eq_old = NULL, *zero = NULL;
5164 static Bool isBogusAtom ( IRAtom* at )
5761 static IRAtom* gen_maxU32 ( MCEnv* mce, IRAtom* b1, IRAtom* b2 )
5766 static IRAtom* gen_load_b ( MCEnv* mce, Int szB,
5767 IRAtom* baseaddr, Int offset )
5775 IRAtom* ea = baseaddr;
5777 IRAtom* off = aTy == Ity_I32 ? mkU32( offset )
5824 static IRAtom* gen_guarded_load_b ( MCEnv* mce, Int szB, IRAtom* baseaddr,
5825 Int offset, IRAtom* guard )
5828 IRAtom *cond, *iffalse, *iftrue;
5844 IRAtom* baseaddr, Int offset, IRAtom* dataB,
5845 IRAtom* guard )
5852 IRAtom* ea = baseaddr;
5858 IRAtom* off = aTy == Ity_I32 ? mkU32( offset )
5897 static IRAtom* narrowTo32 ( MCEnv* mce, IRAtom* e ) {
5906 static IRAtom* zWidenFrom32 ( MCEnv* mce, IRType dstTy, IRAtom* e ) {
5915 static IRAtom* schemeE ( MCEnv* mce, IRExpr* e )
5923 IRAtom *t1, *t2, *t3, *t4;
5951 IRAtom* here;
5953 IRAtom* curr = mkU32(0);
5983 IRAtom* b1 = schemeE( mce, e->Iex.Mux0X.cond );
5984 IRAtom* b2 = schemeE( mce, e->Iex.Mux0X.expr0 );
5985 IRAtom* b3 = schemeE( mce, e->Iex.Mux0X.exprX );
5989 IRAtom* b1 = schemeE( mce, e->Iex.Qop.details->arg1 );
5990 IRAtom* b2 = schemeE( mce, e->Iex.Qop.details->arg2 );
5991 IRAtom* b3 = schemeE( mce, e->Iex.Qop.details->arg3 );
5992 IRAtom* b4 = schemeE( mce, e->Iex.Qop.details->arg4 );
5997 IRAtom* b1 = schemeE( mce, e->Iex.Triop.details->arg1 );
5998 IRAtom* b2 = schemeE( mce, e->Iex.Triop.details->arg2 );
5999 IRAtom* b3 = schemeE( mce, e->Iex.Triop.details->arg3 );
6013 IRAtom* b1 = schemeE( mce, e->Iex.Binop.arg1 );
6014 IRAtom* b2 = schemeE( mce, e->Iex.Binop.arg2 );
6022 IRAtom* b1 = schemeE( mce, e->Iex.Unop.arg );
6055 IRAtom *here, *curr;
6107 IRAtom *cond, *iffalse, *iftrue;
6206 IRAtom *cond, *iffalse;
6260 IRAtom* dataB;
6290 IRAtom *t1, *t2, *t3, *t4;