Lines Matching refs:ty
449 static IRTemp newTemp ( IRType ty ) in newTemp() argument
451 vassert(isPlausibleIRType(ty)); in newTemp()
452 return newIRTemp( irsb->tyenv, ty ); in newTemp()
570 static IRExpr* loadBE ( IRType ty, IRExpr* addr ) in loadBE() argument
572 return IRExpr_Load(Iend_BE, ty, addr); in loadBE()
892 static IROp mkSzOp ( IRType ty, IROp op8 ) in mkSzOp() argument
895 vassert(ty == Ity_I8 || ty == Ity_I16 || in mkSzOp()
896 ty == Ity_I32 || ty == Ity_I64); in mkSzOp()
902 adj = ty==Ity_I8 ? 0 : (ty==Ity_I16 ? 1 : (ty==Ity_I32 ? 2 : 3)); in mkSzOp()
907 static Addr64 mkSzAddr ( IRType ty, Addr64 addr ) in mkSzAddr() argument
909 vassert(ty == Ity_I32 || ty == Ity_I64); in mkSzAddr()
910 return ( ty == Ity_I64 ? in mkSzAddr()
916 static IRExpr* mkSzImm ( IRType ty, ULong imm64 ) in mkSzImm() argument
918 vassert(ty == Ity_I32 || ty == Ity_I64); in mkSzImm()
919 return ty == Ity_I64 ? mkU64(imm64) : mkU32((UInt)imm64); in mkSzImm()
923 static IRConst* mkSzConst ( IRType ty, ULong imm64 ) in mkSzConst() argument
925 vassert(ty == Ity_I32 || ty == Ity_I64); in mkSzConst()
926 return ( ty == Ity_I64 ? in mkSzConst()
932 static IRExpr* mkSzExtendS16 ( IRType ty, UInt imm16 ) in mkSzExtendS16() argument
934 vassert(ty == Ity_I32 || ty == Ity_I64); in mkSzExtendS16()
935 return ( ty == Ity_I64 ? in mkSzExtendS16()
941 static IRExpr* mkSzExtendS32 ( IRType ty, UInt imm32 ) in mkSzExtendS32() argument
943 vassert(ty == Ity_I32 || ty == Ity_I64); in mkSzExtendS32()
944 return ( ty == Ity_I64 ? in mkSzExtendS32()
950 static IRExpr* mkNarrowTo8 ( IRType ty, IRExpr* src ) in mkNarrowTo8() argument
952 vassert(ty == Ity_I32 || ty == Ity_I64); in mkNarrowTo8()
953 return ty == Ity_I64 ? unop(Iop_64to8, src) : unop(Iop_32to8, src); in mkNarrowTo8()
956 static IRExpr* mkNarrowTo16 ( IRType ty, IRExpr* src ) in mkNarrowTo16() argument
958 vassert(ty == Ity_I32 || ty == Ity_I64); in mkNarrowTo16()
959 return ty == Ity_I64 ? unop(Iop_64to16, src) : unop(Iop_32to16, src); in mkNarrowTo16()
962 static IRExpr* mkNarrowTo32 ( IRType ty, IRExpr* src ) in mkNarrowTo32() argument
964 vassert(ty == Ity_I32 || ty == Ity_I64); in mkNarrowTo32()
965 return ty == Ity_I64 ? unop(Iop_64to32, src) : src; in mkNarrowTo32()
969 static IRExpr* mkWidenFrom8 ( IRType ty, IRExpr* src, Bool sined ) in mkWidenFrom8() argument
972 vassert(ty == Ity_I32 || ty == Ity_I64); in mkWidenFrom8()
973 if (sined) op = (ty==Ity_I32) ? Iop_8Sto32 : Iop_8Sto64; in mkWidenFrom8()
974 else op = (ty==Ity_I32) ? Iop_8Uto32 : Iop_8Uto64; in mkWidenFrom8()
978 static IRExpr* mkWidenFrom16 ( IRType ty, IRExpr* src, Bool sined ) in mkWidenFrom16() argument
981 vassert(ty == Ity_I32 || ty == Ity_I64); in mkWidenFrom16()
982 if (sined) op = (ty==Ity_I32) ? Iop_16Sto32 : Iop_16Sto64; in mkWidenFrom16()
983 else op = (ty==Ity_I32) ? Iop_16Uto32 : Iop_16Uto64; in mkWidenFrom16()
987 static IRExpr* mkWidenFrom32 ( IRType ty, IRExpr* src, Bool sined ) in mkWidenFrom32() argument
989 vassert(ty == Ity_I32 || ty == Ity_I64); in mkWidenFrom32()
990 if (ty == Ity_I32) in mkWidenFrom32()
1045 IRType ty = mode64 ? Ity_I64 : Ity_I32; in getIReg() local
1047 return IRExpr_Get( integerGuestRegOffset(archreg), ty ); in getIReg()
1053 IRType ty = mode64 ? Ity_I64 : Ity_I32; in putIReg() local
1055 vassert(typeOfIRExpr(irsb->tyenv, e) == ty ); in putIReg()
1296 static IRTemp gen_POPCOUNT ( IRType ty, IRTemp src ) in gen_POPCOUNT() argument
1303 vassert(ty == Ity_I64 || ty == Ity_I32); in gen_POPCOUNT()
1305 if (ty == Ity_I32) { in gen_POPCOUNT()
1307 mask[i] = newTemp(ty); in gen_POPCOUNT()
1317 nyu = newTemp(ty); in gen_POPCOUNT()
1387 IRType ty = mode64 ? Ity_I64 : Ity_I32; in ea_rA_idxd() local
1390 return binop(mkSzOp(ty, Iop_Add8), getIReg(rA), getIReg(rB)); in ea_rA_idxd()
1396 IRType ty = mode64 ? Ity_I64 : Ity_I32; in ea_rA_simm() local
1398 return binop(mkSzOp(ty, Iop_Add8), getIReg(rA), in ea_rA_simm()
1399 mkSzExtendS16(ty, simm16)); in ea_rA_simm()
1405 IRType ty = mode64 ? Ity_I64 : Ity_I32; in ea_rAor0() local
1408 return mkSzImm(ty, 0); in ea_rAor0()
1425 IRType ty = mode64 ? Ity_I64 : Ity_I32; in ea_rAor0_simm() local
1428 return mkSzExtendS16(ty, simm16); in ea_rAor0_simm()
1438 IRType ty = mode64 ? Ity_I64 : Ity_I32; in addr_align() local
1450 vassert(typeOfIRExpr(irsb->tyenv,addr) == ty); in addr_align()
1451 return binop( mkSzOp(ty, Iop_And8), addr, mkSzImm(ty, mask) ); in addr_align()
2068 static void set_XER_OV ( IRType ty, UInt op, IRExpr* res, in set_XER_OV() argument
2071 if (ty == Ity_I32) in set_XER_OV()
2376 static void set_XER_CA ( IRType ty, UInt op, IRExpr* res, in set_XER_CA() argument
2379 if (ty == Ity_I32) in set_XER_CA()
2393 IRType ty = mode64 ? Ity_I64 : Ity_I32; in getGST() local
2396 return IRExpr_Get( OFFB_SPRG3_RO, ty ); in getGST()
2399 return IRExpr_Get( OFFB_CIA, ty ); in getGST()
2402 return IRExpr_Get( OFFB_LR, ty ); in getGST()
2405 return IRExpr_Get( OFFB_CTR, ty ); in getGST()
2524 IRType ty = mode64 ? Ity_I64 : Ity_I32; in putGST() local
2529 vassert( ty_src == ty ); in putGST()
2533 vassert( ty_src == ty ); in putGST()
2537 vassert( ty_src == ty ); in putGST()
2541 vassert( ty_src == ty ); in putGST()
2568 vassert( ty_src == ty ); in putGST()
2573 vassert( ty_src == ty ); in putGST()
2586 IRType ty = mode64 ? Ity_I64 : Ity_I32; in putGST_masked() local
2627 mkSzConst( ty, nextInsnAddr()) )); in putGST_masked()
2905 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_arith() local
2906 IRTemp rA = newTemp(ty); in dis_int_arith()
2907 IRTemp rB = newTemp(ty); in dis_int_arith()
2908 IRTemp rD = newTemp(ty); in dis_int_arith()
2919 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
2920 mkSzExtendS16(ty, uimm16) ) ); in dis_int_arith()
2921 set_XER_CA( ty, PPCG_FLAG_OP_ADD, in dis_int_arith()
2922 mkexpr(rD), mkexpr(rA), mkSzExtendS16(ty, uimm16), in dis_int_arith()
2923 mkSzImm(ty, 0)/*old xer.ca, which is ignored*/ ); in dis_int_arith()
2928 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
2929 mkSzExtendS16(ty, uimm16) ) ); in dis_int_arith()
2930 set_XER_CA( ty, PPCG_FLAG_OP_ADD, in dis_int_arith()
2931 mkexpr(rD), mkexpr(rA), mkSzExtendS16(ty, uimm16), in dis_int_arith()
2932 mkSzImm(ty, 0)/*old xer.ca, which is ignored*/ ); in dis_int_arith()
2942 assign( rD, mkSzExtendS16(ty, uimm16) ); in dis_int_arith()
2945 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
2946 mkSzExtendS16(ty, uimm16) ) ); in dis_int_arith()
2954 assign( rD, mkSzExtendS32(ty, uimm16 << 16) ); in dis_int_arith()
2957 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
2958 mkSzExtendS32(ty, uimm16 << 16) ) ); in dis_int_arith()
2967 mkSzExtendS16(ty, uimm16))) ); in dis_int_arith()
2971 mkSzExtendS16(ty, uimm16))) ); in dis_int_arith()
2977 assign( rD, binop( mkSzOp(ty, Iop_Sub8), in dis_int_arith()
2978 mkSzExtendS16(ty, uimm16), in dis_int_arith()
2980 set_XER_CA( ty, PPCG_FLAG_OP_SUBFI, in dis_int_arith()
2981 mkexpr(rD), mkexpr(rA), mkSzExtendS16(ty, uimm16), in dis_int_arith()
2982 mkSzImm(ty, 0)/*old xer.ca, which is ignored*/ ); in dis_int_arith()
2994 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
2997 set_XER_OV( ty, PPCG_FLAG_OP_ADD, in dis_int_arith()
3006 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3008 set_XER_CA( ty, PPCG_FLAG_OP_ADD, in dis_int_arith()
3010 mkSzImm(ty, 0)/*old xer.ca, which is ignored*/ ); in dis_int_arith()
3012 set_XER_OV( ty, PPCG_FLAG_OP_ADD, in dis_int_arith()
3018 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3023 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3024 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
3025 binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3027 set_XER_CA( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3031 set_XER_OV( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3038 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3049 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3050 min_one = mkSzImm(ty, (Long)-1); in dis_int_arith()
3051 assign( rD, binop( mkSzOp(ty, Iop_Add8), mkexpr(rA), in dis_int_arith()
3052 binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3054 set_XER_CA( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3058 set_XER_OV( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3065 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3075 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3076 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3078 set_XER_CA( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3079 mkexpr(rD), mkexpr(rA), mkSzImm(ty, 0), in dis_int_arith()
3082 set_XER_OV( ty, PPCG_FLAG_OP_ADDE, in dis_int_arith()
3083 mkexpr(rD), mkexpr(rA), mkSzImm(ty, 0) ); in dis_int_arith()
3105 set_XER_OV( ty, PPCG_FLAG_OP_DIVW, in dis_int_arith()
3111 set_XER_OV( ty, PPCG_FLAG_OP_DIVW, in dis_int_arith()
3136 set_XER_OV( ty, PPCG_FLAG_OP_DIVWU, in dis_int_arith()
3142 set_XER_OV( ty, PPCG_FLAG_OP_DIVWU, in dis_int_arith()
3204 set_XER_OV( ty, PPCG_FLAG_OP_MULLW, in dis_int_arith()
3213 set_XER_OV( ty, PPCG_FLAG_OP_MULLW, in dis_int_arith()
3228 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3229 unop( mkSzOp(ty, Iop_Not8), mkexpr(rA) ), in dis_int_arith()
3230 mkSzImm(ty, 1)) ); in dis_int_arith()
3232 set_XER_OV( ty, PPCG_FLAG_OP_NEG, in dis_int_arith()
3242 assign( rD, binop( mkSzOp(ty, Iop_Sub8), in dis_int_arith()
3245 set_XER_OV( ty, PPCG_FLAG_OP_SUBF, in dis_int_arith()
3255 assign( rD, binop( mkSzOp(ty, Iop_Sub8), in dis_int_arith()
3257 set_XER_CA( ty, PPCG_FLAG_OP_SUBFC, in dis_int_arith()
3259 mkSzImm(ty, 0)/*old xer.ca, which is ignored*/ ); in dis_int_arith()
3261 set_XER_OV( ty, PPCG_FLAG_OP_SUBFC, in dis_int_arith()
3267 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3272 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3273 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3274 unop( mkSzOp(ty, Iop_Not8), mkexpr(rA)), in dis_int_arith()
3275 binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3277 set_XER_CA( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3281 set_XER_OV( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3288 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3299 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3300 min_one = mkSzImm(ty, (Long)-1); in dis_int_arith()
3301 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3302 unop( mkSzOp(ty, Iop_Not8), mkexpr(rA)), in dis_int_arith()
3303 binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3305 set_XER_CA( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3309 set_XER_OV( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3316 IRTemp old_xer_ca = newTemp(ty); in dis_int_arith()
3326 assign( old_xer_ca, mkWidenFrom32(ty, getXER_CA32(), False) ); in dis_int_arith()
3327 assign( rD, binop( mkSzOp(ty, Iop_Add8), in dis_int_arith()
3328 unop( mkSzOp(ty, Iop_Not8), in dis_int_arith()
3330 set_XER_CA( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3331 mkexpr(rD), mkexpr(rA), mkSzImm(ty, 0), in dis_int_arith()
3334 set_XER_OV( ty, PPCG_FLAG_OP_SUBFE, in dis_int_arith()
3335 mkexpr(rD), mkexpr(rA), mkSzImm(ty, 0) ); in dis_int_arith()
3373 set_XER_OV( ty, PPCG_FLAG_OP_MULLW, in dis_int_arith()
3384 set_XER_OV( ty, PPCG_FLAG_OP_DIVW, in dis_int_arith()
3399 set_XER_OV( ty, PPCG_FLAG_OP_DIVWU, in dis_int_arith()
3542 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_cmp() local
3560 b = mkSzExtendS16( ty, uimm16 ); in dis_int_cmp()
3564 a = mkNarrowTo32( ty, a ); in dis_int_cmp()
3565 b = mkNarrowTo32( ty, b ); in dis_int_cmp()
3573 b = mkSzImm( ty, uimm16 ); in dis_int_cmp()
3577 a = mkNarrowTo32( ty, a ); in dis_int_cmp()
3578 b = mkNarrowTo32( ty, b ); in dis_int_cmp()
3605 a = mkNarrowTo32( ty, a ); in dis_int_cmp()
3606 b = mkNarrowTo32( ty, b ); in dis_int_cmp()
3624 a = mkNarrowTo32( ty, a ); in dis_int_cmp()
3625 b = mkNarrowTo32( ty, b ); in dis_int_cmp()
3660 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_logic() local
3661 IRTemp rS = newTemp(ty); in dis_int_logic()
3662 IRTemp rA = newTemp(ty); in dis_int_logic()
3663 IRTemp rB = newTemp(ty); in dis_int_logic()
3673 assign( rA, binop( mkSzOp(ty, Iop_And8), mkexpr(rS), in dis_int_logic()
3674 mkSzImm(ty, uimm16)) ); in dis_int_logic()
3681 assign( rA, binop( mkSzOp(ty, Iop_And8), mkexpr(rS), in dis_int_logic()
3682 mkSzImm(ty, uimm16 << 16)) ); in dis_int_logic()
3689 assign( rA, binop( mkSzOp(ty, Iop_Or8), mkexpr(rS), in dis_int_logic()
3690 mkSzImm(ty, uimm16)) ); in dis_int_logic()
3695 assign( rA, binop( mkSzOp(ty, Iop_Or8), mkexpr(rS), in dis_int_logic()
3696 mkSzImm(ty, uimm16 << 16)) ); in dis_int_logic()
3701 assign( rA, binop( mkSzOp(ty, Iop_Xor8), mkexpr(rS), in dis_int_logic()
3702 mkSzImm(ty, uimm16)) ); in dis_int_logic()
3707 assign( rA, binop( mkSzOp(ty, Iop_Xor8), mkexpr(rS), in dis_int_logic()
3708 mkSzImm(ty, uimm16 << 16)) ); in dis_int_logic()
3719 assign(rA, binop( mkSzOp(ty, Iop_And8), in dis_int_logic()
3726 assign(rA, binop( mkSzOp(ty, Iop_And8), mkexpr(rS), in dis_int_logic()
3727 unop( mkSzOp(ty, Iop_Not8), in dis_int_logic()
3745 assign(rA, mkWidenFrom32(ty, in dis_int_logic()
3758 assign( rA, unop( mkSzOp(ty, Iop_Not8), in dis_int_logic()
3759 binop( mkSzOp(ty, Iop_Xor8), in dis_int_logic()
3794 assign( rA, unop( mkSzOp(ty, Iop_Not8), in dis_int_logic()
3795 binop( mkSzOp(ty, Iop_And8), in dis_int_logic()
3802 assign( rA, unop( mkSzOp(ty, Iop_Not8), in dis_int_logic()
3803 binop( mkSzOp(ty, Iop_Or8), in dis_int_logic()
3814 assign( rA, binop( mkSzOp(ty, Iop_Or8), in dis_int_logic()
3822 assign( rA, binop( mkSzOp(ty, Iop_Or8), mkexpr(rS), in dis_int_logic()
3823 unop(mkSzOp(ty, Iop_Not8), mkexpr(rB)))); in dis_int_logic()
3829 assign( rA, binop( mkSzOp(ty, Iop_Xor8), in dis_int_logic()
3905 IRTemp result = gen_POPCOUNT(ty, rS); in dis_int_logic()
3922 IRTemp result = gen_POPCOUNT(ty, rS); in dis_int_logic()
4016 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_parity() local
4018 IRTemp rS = newTemp(ty); in dis_int_parity()
4019 IRTemp rA = newTemp(ty); in dis_int_parity()
4028 IRTemp rS1 = newTemp(ty); in dis_int_parity()
4029 IRTemp rS2 = newTemp(ty); in dis_int_parity()
4030 IRTemp rS3 = newTemp(ty); in dis_int_parity()
4031 IRTemp rS4 = newTemp(ty); in dis_int_parity()
4032 IRTemp rS5 = newTemp(ty); in dis_int_parity()
4033 IRTemp rS6 = newTemp(ty); in dis_int_parity()
4034 IRTemp rS7 = newTemp(ty); in dis_int_parity()
4151 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_rot() local
4152 IRTemp rS = newTemp(ty); in dis_int_rot()
4153 IRTemp rA = newTemp(ty); in dis_int_rot()
4154 IRTemp rB = newTemp(ty); in dis_int_rot()
4155 IRTemp rot = newTemp(ty); in dis_int_rot()
4350 IRTemp rA_orig = newTemp(ty); in dis_int_rot()
4399 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_load() local
4400 IRTemp EA = newTemp(ty); in dis_int_load()
4419 putIReg( rD_addr, mkWidenFrom8(ty, val, False) ); in dis_int_load()
4429 putIReg( rD_addr, mkWidenFrom8(ty, val, False) ); in dis_int_load()
4436 putIReg( rD_addr, mkWidenFrom16(ty, val, True) ); in dis_int_load()
4446 putIReg( rD_addr, mkWidenFrom16(ty, val, True) ); in dis_int_load()
4453 putIReg( rD_addr, mkWidenFrom16(ty, val, False) ); in dis_int_load()
4463 putIReg( rD_addr, mkWidenFrom16(ty, val, False) ); in dis_int_load()
4470 putIReg( rD_addr, mkWidenFrom32(ty, val, False) ); in dis_int_load()
4480 putIReg( rD_addr, mkWidenFrom32(ty, val, False) ); in dis_int_load()
4499 putIReg( rD_addr, mkWidenFrom8(ty, val, False) ); in dis_int_load()
4506 putIReg( rD_addr, mkWidenFrom8(ty, val, False) ); in dis_int_load()
4516 putIReg( rD_addr, mkWidenFrom16(ty, val, True) ); in dis_int_load()
4523 putIReg( rD_addr, mkWidenFrom16(ty, val, True) ); in dis_int_load()
4533 putIReg( rD_addr, mkWidenFrom16(ty, val, False) ); in dis_int_load()
4540 putIReg( rD_addr, mkWidenFrom16(ty, val, False) ); in dis_int_load()
4550 putIReg( rD_addr, mkWidenFrom32(ty, val, False) ); in dis_int_load()
4557 putIReg( rD_addr, mkWidenFrom32(ty, val, False) ); in dis_int_load()
4656 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_store() local
4657 IRTemp rS = newTemp(ty); in dis_int_store()
4658 IRTemp rB = newTemp(ty); in dis_int_store()
4659 IRTemp EA = newTemp(ty); in dis_int_store()
4679 storeBE( mkexpr(EA), mkNarrowTo8(ty, mkexpr(rS)) ); in dis_int_store()
4689 storeBE( mkexpr(EA), mkNarrowTo8(ty, mkexpr(rS)) ); in dis_int_store()
4694 storeBE( mkexpr(EA), mkNarrowTo16(ty, mkexpr(rS)) ); in dis_int_store()
4704 storeBE( mkexpr(EA), mkNarrowTo16(ty, mkexpr(rS)) ); in dis_int_store()
4709 storeBE( mkexpr(EA), mkNarrowTo32(ty, mkexpr(rS)) ); in dis_int_store()
4719 storeBE( mkexpr(EA), mkNarrowTo32(ty, mkexpr(rS)) ); in dis_int_store()
4737 storeBE( mkexpr(EA), mkNarrowTo8(ty, mkexpr(rS)) ); in dis_int_store()
4742 storeBE( mkexpr(EA), mkNarrowTo8(ty, mkexpr(rS)) ); in dis_int_store()
4752 storeBE( mkexpr(EA), mkNarrowTo16(ty, mkexpr(rS)) ); in dis_int_store()
4757 storeBE( mkexpr(EA), mkNarrowTo16(ty, mkexpr(rS)) ); in dis_int_store()
4767 storeBE( mkexpr(EA), mkNarrowTo32(ty, mkexpr(rS)) ); in dis_int_store()
4772 storeBE( mkexpr(EA), mkNarrowTo32(ty, mkexpr(rS)) ); in dis_int_store()
4841 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_ldst_mult() local
4842 IRTemp EA = newTemp(ty); in dis_int_ldst_mult()
4858 putIReg( r, mkWidenFrom32(ty, loadBE(Ity_I32, irx_addr ), in dis_int_ldst_mult()
4868 storeBE( irx_addr, mkNarrowTo32(ty, getIReg(r)) ); in dis_int_ldst_mult()
4894 IRType ty = mode64 ? Ity_I64 : Ity_I32; in generate_lsw_sequence() local
4903 mkSzConst( ty, nextInsnAddr()) )); in generate_lsw_sequence()
4907 putIReg(rD, mkSzImm(ty, 0)); in generate_lsw_sequence()
4915 ty, in generate_lsw_sequence()
4918 mkNarrowTo32(ty, getIReg(rD)), in generate_lsw_sequence()
4924 binop(mkSzOp(ty,Iop_Add8), e_EA, mkSzImm(ty,i))) in generate_lsw_sequence()
4945 IRType ty = mode64 ? Ity_I64 : Ity_I32; in generate_stsw_sequence() local
4954 mkSzConst( ty, nextInsnAddr() ) )); in generate_stsw_sequence()
4963 binop(mkSzOp(ty,Iop_Add8), e_EA, mkSzImm(ty,i)), in generate_stsw_sequence()
4966 mkNarrowTo32(ty, getIReg(rS)), in generate_stsw_sequence()
4985 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_ldst_str() local
4986 IRTemp t_EA = newTemp(ty); in dis_int_ldst_str()
5082 IRType ty = mode64 ? Ity_I64 : Ity_I32; in branch_ctr_ok() local
5090 binop( mkSzOp(ty, Iop_CmpEQ8), in branch_ctr_ok()
5092 mkSzImm(ty,0))) ); in branch_ctr_ok()
5095 binop( mkSzOp(ty, Iop_CmpNE8), in branch_ctr_ok()
5097 mkSzImm(ty,0))) ); in branch_ctr_ok()
5157 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_branch() local
5163 IRExpr* e_nia = mkSzImm(ty, nextInsnAddr()); in dis_branch()
5164 IRConst* c_nia = mkSzConst(ty, nextInsnAddr()); in dis_branch()
5165 IRTemp lr_old = newTemp(ty); in dis_branch()
5180 tgt = mkSzAddr( ty, extend_s_26to64(LI_u26) ); in dis_branch()
5182 tgt = mkSzAddr( ty, guest_CIA_curr_instr + in dis_branch()
5197 IRTemp t_tgt = newTemp(ty); in dis_branch()
5209 irsb->next = mkSzImm(ty, tgt); in dis_branch()
5219 binop(mkSzOp(ty, Iop_Sub8), in dis_branch()
5220 getGST( PPC_GST_CTR ), mkSzImm(ty, 1)) ); in dis_branch()
5234 tgt = mkSzAddr(ty, extend_s_16to64(BD_u16)); in dis_branch()
5236 tgt = mkSzAddr(ty, guest_CIA_curr_instr + in dis_branch()
5245 mkSzConst(ty, tgt) ) ); in dis_branch()
5302 binop(mkSzOp(ty, Iop_Sub8), in dis_branch()
5303 getGST( PPC_GST_CTR ), mkSzImm(ty, 1)) ); in dis_branch()
5545 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_trapi() local
5578 irsb->next = mkSzImm( ty, nextInsnAddr() ); in dis_trapi()
5595 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_trap() local
5632 irsb->next = mkSzImm( ty, nextInsnAddr() ); in dis_trap()
5647 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_syslink() local
5667 : mkSzImm( ty, nextInsnAddr() ); in dis_syslink()
5698 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_memsync() local
5699 IRTemp EA = newTemp(ty); in dis_memsync()
5746 putIReg( rD_addr, mkWidenFrom32(ty, mkexpr(res), False) ); in dis_memsync()
5766 assign( rS, mkNarrowTo32(ty, getIReg(rS_addr)) ); in dis_memsync()
5907 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_shift() local
5908 IRTemp rA = newTemp(ty); in dis_int_shift()
5909 IRTemp rS = newTemp(ty); in dis_int_shift()
5910 IRTemp rB = newTemp(ty); in dis_int_shift()
5918 assign( rS_lo32, mkNarrowTo32(ty, mkexpr(rS)) ); in dis_int_shift()
5919 assign( rB_lo32, mkNarrowTo32(ty, mkexpr(rB)) ); in dis_int_shift()
5943 assign( rA, mkWidenFrom32(ty, e_tmp, /* Signed */False) ); in dis_int_shift()
5968 assign( rA, mkWidenFrom32(ty, e_tmp, /* Signed */True) ); in dis_int_shift()
5970 set_XER_CA( ty, PPCG_FLAG_OP_SRAW, in dis_int_shift()
5972 mkWidenFrom32(ty, mkexpr(rS_lo32), True), in dis_int_shift()
5973 mkWidenFrom32(ty, mkexpr(sh_amt), True ), in dis_int_shift()
5974 mkWidenFrom32(ty, getXER_CA32(), True) ); in dis_int_shift()
5992 set_XER_CA( ty, PPCG_FLAG_OP_SRAWI, in dis_int_shift()
5994 mkWidenFrom32(ty, mkexpr(rS_lo32), /* Syned */True), in dis_int_shift()
5995 mkSzImm(ty, sh_imm), in dis_int_shift()
5996 mkWidenFrom32(ty, getXER_CA32(), /* Syned */False) ); in dis_int_shift()
6021 assign( rA, mkWidenFrom32(ty, e_tmp, /* Signed */False) ); in dis_int_shift()
6069 set_XER_CA( ty, PPCG_FLAG_OP_SRAD, in dis_int_shift()
6071 mkWidenFrom32(ty, getXER_CA32(), /* Syned */False) ); in dis_int_shift()
6082 set_XER_CA( ty, PPCG_FLAG_OP_SRADI, in dis_int_shift()
6086 mkWidenFrom32(ty, getXER_CA32(), /* Syned */False) ); in dis_int_shift()
6176 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_int_ldst_rev() local
6177 IRTemp EA = newTemp(ty); in dis_int_ldst_rev()
6194 putIReg( rD_addr, mkWidenFrom32(ty, mkexpr(w2), in dis_int_ldst_rev()
6202 putIReg( rD_addr, mkWidenFrom32(ty, mkexpr(w2), in dis_int_ldst_rev()
6214 nextAddr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_int_ldst_rev()
6215 ty == Ity_I64 ? mkU64( 4 ) : mkU32( 4 ) ); in dis_int_ldst_rev()
6224 assign( w1, mkNarrowTo32(ty, getIReg(rS_addr)) ); in dis_int_ldst_rev()
6230 assign( w1, mkNarrowTo32(ty, getIReg(rS_addr)) ); in dis_int_ldst_rev()
6281 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_proc_ctl() local
6282 IRTemp rS = newTemp(ty); in dis_proc_ctl()
6322 putIReg( rD_addr, mkWidenFrom32(ty, getGST( PPC_GST_CR ), in dis_proc_ctl()
6328 putIReg( rD_addr, mkWidenFrom32(ty, getGST( PPC_GST_CR ), in dis_proc_ctl()
6341 putIReg( rD_addr, mkWidenFrom32(ty, getGST( PPC_GST_XER ), in dis_proc_ctl()
6354 putIReg( rD_addr, mkWidenFrom32(ty, getGST( PPC_GST_VRSAVE ), in dis_proc_ctl()
6381 mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) ); in dis_proc_ctl()
6402 mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) ); in dis_proc_ctl()
6429 mkWidenFrom32(ty, unop(Iop_64HIto32, mkexpr(val)), in dis_proc_ctl()
6471 mkNarrowTo32(ty, mkexpr(rS)), in dis_proc_ctl()
6482 putGST( PPC_GST_XER, mkNarrowTo32(ty, mkexpr(rS)) ); in dis_proc_ctl()
6494 putGST( PPC_GST_VRSAVE, mkNarrowTo32(ty, mkexpr(rS)) ); in dis_proc_ctl()
6528 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_cache_manage() local
6589 IRTemp EA = newTemp(ty); in dis_cache_manage()
6590 IRTemp addr = newTemp(ty); in dis_cache_manage()
6633 IRTemp EA = newTemp(ty); in dis_cache_manage()
6634 IRTemp addr = newTemp(ty); in dis_cache_manage()
6639 assign( addr, binop( mkSzOp(ty, Iop_And8), in dis_cache_manage()
6641 mkSzImm(ty, ~(((ULong)lineszB)-1) )) ); in dis_cache_manage()
6643 putGST( PPC_GST_TILEN, mkSzImm(ty, lineszB) ); in dis_cache_manage()
6649 irsb->next = mkSzImm(ty, nextInsnAddr()); in dis_cache_manage()
6712 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_fp_load() local
6713 IRTemp EA = newTemp(ty); in dis_fp_load()
6714 IRTemp rA = newTemp(ty); in dis_fp_load()
6715 IRTemp rB = newTemp(ty); in dis_fp_load()
6851 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_fp_store() local
6852 IRTemp EA = newTemp(ty); in dis_fp_store()
6853 IRTemp rA = newTemp(ty); in dis_fp_store()
6854 IRTemp rB = newTemp(ty); in dis_fp_store()
8055 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_fp_pair() local
8056 IRTemp EA_hi = newTemp(ty); in dis_fp_pair()
8057 IRTemp EA_lo = newTemp(ty); in dis_fp_pair()
10843 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_vx_load() local
10844 IRTemp EA = newTemp( ty ); in dis_vx_load()
10867 IROp addOp = ty == Ity_I64 ? Iop_Add64 : Iop_Add32; in dis_vx_load()
10873 high_addr = binop( addOp, mkexpr( EA ), ty == Ity_I64 ? mkU64( ea_off ) in dis_vx_load()
10896 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_load()
10897 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_load()
10900 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_load()
10901 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_load()
10904 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_load()
10905 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_load()
10933 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_vx_store() local
10934 IRTemp EA = newTemp( ty ); in dis_vx_store()
10960 storeBE( binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), ty == Ity_I64 ? mkU64( 8 ) in dis_vx_store()
10980 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_store()
10981 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_store()
10984 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_store()
10985 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_store()
10988 irx_addr = binop( mkSzOp( ty, Iop_Add8 ), mkexpr( EA ), in dis_vx_store()
10989 ty == Ity_I64 ? mkU64( ea_off ) : mkU32( ea_off ) ); in dis_vx_store()
11135 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_av_load() local
11136 IRTemp EA = newTemp(ty); in dis_av_load()
11137 IRTemp EA_align16 = newTemp(ty); in dis_av_load()
11154 binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)), in dis_av_load()
11187 binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)), in dis_av_load()
11265 IRType ty = mode64 ? Ity_I64 : Ity_I32; in dis_av_store() local
11266 IRTemp EA = newTemp(ty); in dis_av_store()
11267 IRTemp addr_aligned = newTemp(ty); in dis_av_store()
11285 mkNarrowTo32(ty, mkexpr(EA)) )) ); in dis_av_store()
11298 mkNarrowTo8(ty, mkexpr(addr_aligned) )) ); in dis_av_store()
11311 mkNarrowTo8(ty, mkexpr(addr_aligned) )) ); in dis_av_store()
13331 IRType ty = mode64 ? Ity_I64 : Ity_I32; in disInstr_PPC_WRK() local
13356 delta = (Long)mkSzAddr(ty, (ULong)delta64); in disInstr_PPC_WRK()
13374 putGST( PPC_GST_CIA, mkSzImm(ty, guest_CIA_curr_instr) ); in disInstr_PPC_WRK()
13404 irsb->next = mkSzImm( ty, guest_CIA_bbstart + delta ); in disInstr_PPC_WRK()
13415 putIReg(3, IRExpr_Get( OFFB_NRADDR, ty )); in disInstr_PPC_WRK()
13423 putGST( PPC_GST_LR, mkSzImm(ty, guest_CIA_bbstart + (Long)delta) ); in disInstr_PPC_WRK()
13435 putIReg(3, IRExpr_Get( OFFB_NRADDR_GPR2, ty )); in disInstr_PPC_WRK()
13965 irsb->next = mkSzImm(ty, nextInsnAddr()); in disInstr_PPC_WRK()
14305 putGST( PPC_GST_CIA, mkSzImm(ty, guest_CIA_curr_instr) ); in disInstr_PPC_WRK()
14306 irsb->next = mkSzImm(ty, guest_CIA_curr_instr); in disInstr_PPC_WRK()
14350 IRType ty; in disInstr_PPC() local
14359 ty = mode64 ? Ity_I64 : Ity_I32; in disInstr_PPC()
14379 guest_CIA_curr_instr = mkSzAddr(ty, guest_IP); in disInstr_PPC()
14380 guest_CIA_bbstart = mkSzAddr(ty, guest_IP - delta); in disInstr_PPC()