checks that all returned registers are virtual. You should not
call the _wrk version directly.
*/
-static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e );
+static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e );
-static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e );
+static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e );
-static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e );
+static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e );
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e );
-static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e );
+static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e );
static void iselInt128Expr_wrk ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt128Expr ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
-static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64CondCode iselCondCode ( ISelEnv* env, IRExpr* e );
+static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64CondCode iselCondCode ( ISelEnv* env, const IRExpr* e );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e );
static void iselDVecExpr_wrk ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselDVecExpr ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
mask or sign extend partial values if necessary.
*/
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselIntExpr_R_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e )
{
/* Used for unary/binary SIMD64 ops. */
HWord fn = 0;
DEFINE_PATTERN( p_1Uto8_64to1,
unop(Iop_1Uto8, unop(Iop_64to1, bind(0))) );
if (matchIRExpr(&mi,p_1Uto8_64to1,e)) {
- IRExpr* expr64 = mi.bindee[0];
+ const IRExpr* expr64 = mi.bindee[0];
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, expr64);
addInstr(env, mk_iMOVsd_RR(src,dst) );
result. The expression may only be a 32-bit one.
*/
-static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e )
+static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e )
{
AMD64AMode* am = iselIntExpr_AMode_wrk(env, e);
vassert(sane_AMode(am));
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
DECLARE_PATTERN(p_complex);
)
);
if (matchIRExpr(&mi, p_complex, e)) {
- IRExpr* expr1 = mi.bindee[0];
- IRExpr* expr2 = mi.bindee[1];
- IRExpr* imm8 = mi.bindee[2];
- IRExpr* simm32 = mi.bindee[3];
+ const IRExpr* expr1 = mi.bindee[0];
+ const IRExpr* expr2 = mi.bindee[1];
+ const IRExpr* imm8 = mi.bindee[2];
+ const IRExpr* simm32 = mi.bindee[3];
if (imm8->tag == Iex_Const
&& imm8->Iex.Const.con->tag == Ico_U8
&& imm8->Iex.Const.con->Ico.U8 < 4
/* Similarly, calculate an expression into an X86RMI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e )
+static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e )
{
AMD64RMI* rmi = iselIntExpr_RMI_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32
iselIntExpr_R, the expression can have type 64, 32, 16 or 8
bits. */
-static AMD64RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e )
+static AMD64RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e )
{
AMD64RI* ri = iselIntExpr_RI_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32
with iselIntExpr_R, the expression can have type 64, 32, 16 or 8
bits. */
-static AMD64RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e )
+static AMD64RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e )
{
AMD64RM* rm = iselIntExpr_RM_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
condition code which would correspond when the expression would
notionally have returned 1. */
-static AMD64CondCode iselCondCode ( ISelEnv* env, IRExpr* e )
+static AMD64CondCode iselCondCode ( ISelEnv* env, const IRExpr* e )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
return iselCondCode_wrk(env,e);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
by subsequent code emitted by the caller. */
static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
iselInt128Expr_wrk(rHi, rLo, env, e);
# if 0
/* DO NOT CALL THIS DIRECTLY ! */
static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) == Ity_I128);
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselFltExpr_wrk( env, e );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_F32);
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselDblExpr_wrk( env, e );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(e);
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselVecExpr_wrk( env, e );
# if 0
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
HWord fn = 0; /* address of helper fn, if required */
Bool arg1isEReg = False;
/*---------------------------------------------------------*/
static void iselDVecExpr ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
iselDVecExpr_wrk( rHi, rLo, env, e );
# if 0
/* DO NOT CALL THIS DIRECTLY */
static void iselDVecExpr_wrk ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
HWord fn = 0; /* address of helper fn, if required */
vassert(e);
static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
-static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e );
+static HReg iselNeon64Expr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselNeon64Expr ( ISelEnv* env, const IRExpr* e );
-static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselNeonExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselNeonExpr ( ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
/*--- ISEL: Misc helpers ---*/
//zz DEFINE_PATTERN(p_32to1_then_1Uto8,
//zz unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
//zz if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
-//zz IRExpr* expr32 = mi.bindee[0];
+//zz const IRExpr* expr32 = mi.bindee[0];
//zz HReg dst = newVRegI(env);
//zz HReg src = iselIntExpr_R(env, expr32);
//zz addInstr(env, mk_iMOVsd_RR(src,dst) );
either real or virtual regs; in any case they must not be changed
by subsequent code emitted by the caller. */
-static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
iselInt64Expr_wrk(rHi, rLo, env, e);
# if 0
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) == Ity_I64);
/*--- ISEL: Vector (NEON) expressions (64 or 128 bit) ---*/
/*---------------------------------------------------------*/
-static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e )
+static HReg iselNeon64Expr ( ISelEnv* env, const IRExpr* e )
{
HReg r;
vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON);
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselNeon64Expr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env, e);
MatchInfo mi;
}
-static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselNeonExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r;
vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON);
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselNeonExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env, e);
MatchInfo mi;
*/
/* 32-bit mode: compute an I8/I16/I32 into a GPR.
64-bit mode: compute an I8/I16/I32/I64 into a GPR. */
-static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselWordExpr_R ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: Compute an I8/I16/I32 into a RH
return can have their sign inverted if need be.
*/
static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env,
- Bool syned, IRExpr* e,
+ Bool syned, const IRExpr* e,
IREndness IEndianess );
static PPCRH* iselWordExpr_RH ( ISelEnv* env,
- Bool syned, IRExpr* e,
+ Bool syned, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: compute an I32 into a RI (reg or 32-bit immediate).
64-bit mode: compute an I64 into a RI (reg or 64-bit immediate). */
-static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRI* iselWordExpr_RI ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* In 32 bit mode ONLY, compute an I8 into a
reg-or-5-bit-unsigned-immediate, the latter being an immediate in
the range 1 .. 31 inclusive. Used for doing shift amounts. */
-static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* In 64-bit mode ONLY, compute an I8 into a
reg-or-6-bit-unsigned-immediate, the latter being an immediate in
the range 1 .. 63 inclusive. Used for doing shift amounts. */
-static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: compute an I32 into an AMode.
Since there are no such restrictions on 32-bit insns, xferTy is
ignored for 32-bit code generation. */
-static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e,
IRType xferTy,
IREndness IEndianess );
-static PPCAMode* iselWordExpr_AMode ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode ( ISelEnv* env, const IRExpr* e,
IRType xferTy,
IREndness IEndianess );
static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode ONLY: compute an I64 into a GPR pair. */
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 64-bit mode ONLY: compute an I128 into a GPR64 pair. */
static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCCondCode iselCondCode ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 64-bit mode ONLY. */
-static HReg iselDfp32Expr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp32Expr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp32Expr ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp32Expr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp64Expr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp64Expr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp64Expr ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp64Expr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFp128Expr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess);
-static HReg iselFp128Expr ( ISelEnv* env, IRExpr* e, IREndness IEndianess);
+static HReg iselFp128Expr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess);
+static HReg iselFp128Expr ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess);
/* 64-bit mode ONLY: compute an D128 into a GPR64 pair. */
static void iselDfp128Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
- IRExpr* e, IREndness IEndianess );
+ const IRExpr* e, IREndness IEndianess );
static void iselDfp128Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
- IRExpr* e, IREndness IEndianess );
+ const IRExpr* e, IREndness IEndianess );
/*---------------------------------------------------------*/
/*--- ISEL: Misc helpers ---*/
if necessary.
*/
-static HReg iselWordExpr_R ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselWordExpr_R ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
HReg r = iselWordExpr_R_wrk(env, e, IEndianess);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
Bool mode64 = env->mode64;
DEFINE_PATTERN(p_32to1_then_1Uto8,
unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
- IRExpr* expr32 = mi.bindee[0];
+ const IRExpr* expr32 = mi.bindee[0];
HReg r_dst = newVRegI(env);
HReg r_src = iselWordExpr_R(env, expr32, IEndianess);
addInstr(env, PPCInstr_Alu(Palu_AND, r_dst,
}
static
-PPCAMode* iselWordExpr_AMode ( ISelEnv* env, IRExpr* e, IRType xferTy,
+PPCAMode* iselWordExpr_AMode ( ISelEnv* env, const IRExpr* e, IRType xferTy,
IREndness IEndianess )
{
PPCAMode* am = iselWordExpr_AMode_wrk(env, e, xferTy, IEndianess);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e,
IRType xferTy, IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
signed immediates that are return can have their sign inverted if
need be. */
-static PPCRH* iselWordExpr_RH ( ISelEnv* env, Bool syned, IRExpr* e,
+static PPCRH* iselWordExpr_RH ( ISelEnv* env, Bool syned, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri = iselWordExpr_RH_wrk(env, syned, e, IEndianess);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env, Bool syned, IRExpr* e,
+static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env, Bool syned, const IRExpr* e,
IREndness IEndianess )
{
ULong u;
iselIntExpr_R, the expression can have type 32, 16 or 8 bits, or,
in 64-bit mode, 64 bits. */
-static PPCRI* iselWordExpr_RI ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static PPCRI* iselWordExpr_RI ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
PPCRI* ri = iselWordExpr_RI_wrk(env, e, IEndianess);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
Long l;
being an immediate in the range 1 .. 31 inclusive. Used for doing
shift amounts. Only used in 32-bit mode. */
-static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri;
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
being an immediate in the range 1 .. 63 inclusive. Used for doing
shift amounts. Only used in 64-bit mode. */
-static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri;
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
condition code which would correspond when the expression would
notionally have returned 1. */
-static PPCCondCode iselCondCode ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
case they must not be changed by subsequent code emitted by the
caller. */
-static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static void iselInt128Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess )
{
vassert(env->mode64);
iselInt128Expr_wrk(rHi, rLo, env, e, IEndianess);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess )
{
Bool mode64 = env->mode64;
/* 32-bit mode ONLY: compute a 128-bit value into a register quad */
static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi, HReg* rMedLo,
- HReg* rLo, ISelEnv* env, IRExpr* e,
+ HReg* rLo, ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(!env->mode64);
static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
caller. */
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(!env->mode64);
/* DO NOT CALL THIS DIRECTLY ! */
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselFltExpr_wrk( env, e, IEndianess );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselDblExpr_wrk( env, e, IEndianess );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr(env->type_env,e);
vpanic("iselDblExpr_wrk(ppc)");
}
-static HReg iselDfp32Expr(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp32Expr(ISelEnv* env, const IRExpr* e, IREndness IEndianess)
{
HReg r = iselDfp32Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcFlt64);
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDfp32Expr_wrk(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp32Expr_wrk(ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr( env->type_env, e );
vpanic( "iselDfp32Expr_wrk(ppc)" );
}
-static HReg iselFp128Expr( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFp128Expr( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselFp128Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcVec128);
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFp128Expr_wrk( ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselFp128Expr_wrk( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
PPCFpOp fpop = Pfp_INVALID;
vpanic( "iselFp128Expr(ppc64)" );
}
-static HReg iselDfp64Expr(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp64Expr(ISelEnv* env, const IRExpr* e, IREndness IEndianess)
{
HReg r = iselDfp64Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcFlt64);
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDfp64Expr_wrk(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp64Expr_wrk(ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr( env->type_env, e );
vpanic( "iselDfp64Expr_wrk(ppc)" );
}
-static void iselDfp128Expr(HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e,
+static void iselDfp128Expr(HReg* rHi, HReg* rLo, ISelEnv* env, const IRExpr* e,
IREndness IEndianess)
{
iselDfp128Expr_wrk( rHi, rLo, env, e, IEndianess );
}
/* DO NOT CALL THIS DIRECTLY */
-static void iselDfp128Expr_wrk(HReg* rHi, HReg *rLo, ISelEnv* env, IRExpr* e,
- IREndness IEndianess)
+static void iselDfp128Expr_wrk(HReg* rHi, HReg *rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess)
{
vassert( e );
vassert( typeOfIRExpr(env->type_env,e) == Ity_D128 );
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselVecExpr_wrk( env, e, IEndianess );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
PPCAvOp op = Pav_INVALID;
checks that all returned registers are virtual. You should not
call the _wrk version directly.
*/
-static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e );
-static X86RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e );
+static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e );
-static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e );
-static X86RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e );
+static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e );
-static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e );
-static X86RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e );
+static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e );
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e );
-static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e );
-static X86AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e );
+static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e );
+static X86AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e );
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
-static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e );
-static X86CondCode iselCondCode ( ISelEnv* env, IRExpr* e );
+static X86CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e );
+static X86CondCode iselCondCode ( ISelEnv* env, const IRExpr* e );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
or sign extend partial values if necessary.
*/
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselIntExpr_R_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
DEFINE_PATTERN(p_32to1_then_1Uto8,
unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
- IRExpr* expr32 = mi.bindee[0];
+ const IRExpr* expr32 = mi.bindee[0];
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, expr32);
addInstr(env, mk_iMOVsd_RR(src,dst) );
}
}
-static X86AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e )
+static X86AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e )
{
X86AMode* am = iselIntExpr_AMode_wrk(env, e);
vassert(sane_AMode(am));
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e )
+static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32);
/* Similarly, calculate an expression into an X86RMI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e )
+static X86RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e )
{
X86RMI* rmi = iselIntExpr_RMI_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e )
+static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
/* Calculate an expression into an X86RI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e )
+static X86RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e )
{
X86RI* ri = iselIntExpr_RI_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e )
+static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
/* Similarly, calculate an expression into an X86RM operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e )
+static X86RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e )
{
X86RM* rm = iselIntExpr_RM_wrk(env, e);
/* sanity checks ... */
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e )
+static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
condition code which would correspond when the expression would
notionally have returned 1. */
-static X86CondCode iselCondCode ( ISelEnv* env, IRExpr* e )
+static X86CondCode iselCondCode ( ISelEnv* env, const IRExpr* e )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
return iselCondCode_wrk(env,e);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e )
+static X86CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
either real or virtual regs; in any case they must not be changed
by subsequent code emitted by the caller. */
-static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
iselInt64Expr_wrk(rHi, rLo, env, e);
# if 0
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
MatchInfo mi;
HWord fn = 0; /* helper fn for most SIMD64 stuff */
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselFltExpr_wrk( env, e );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_F32);
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselDblExpr_wrk( env, e );
# if 0
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(e);
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselVecExpr_wrk( env, e );
# if 0
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
# define REQUIRE_SSE1 \
/* Assign a value to a binder. Checks for obvious stupidities. */
static
-void setBindee ( MatchInfo* mi, Int n, IRExpr* bindee )
+void setBindee ( MatchInfo* mi, Int n, const IRExpr* bindee )
{
if (n < 0 || n >= N_IRMATCH_BINDERS)
vpanic("setBindee: out of range index");
found into 'mi'. */
static
-Bool matchWrk ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ )
+Bool matchWrk ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ )
{
switch (p->tag) {
case Iex_Binder: /* aha, what we were looking for. */
/* Top level entry point to the matcher. */
-Bool matchIRExpr ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ )
+Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ )
{
Int i;
for (i = 0; i < N_IRMATCH_BINDERS; i++)
typedef
struct {
- IRExpr* bindee[N_IRMATCH_BINDERS];
+ const IRExpr* bindee[N_IRMATCH_BINDERS];
}
MatchInfo;
succeeded. */
extern
-Bool matchIRExpr ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ );
+Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ );
#endif /* ndef __VEX_IR_MATCH_H */