case Iex_CCall:
case Iex_Get:
case Iex_Const:
+ case Iex_RdTmp:
return True;
default:
vex_printf("\n"); ppIRExpr(e); vex_printf("\n");
{
switch (st->tag) {
// These are easily guarded.
+ case Ist_NoOp:
case Ist_IMark:
case Ist_Put:
return True;
// These could be guarded, with some effort, if really needed, but
// currently aren't guardable.
case Ist_Store:
+ case Ist_StoreG:
case Ist_Exit:
return False;
// This is probably guardable, but it depends on the RHS of the
/*IN*/ IRStmt* st, IRTemp guard )
{
switch (st->tag) {
+ case Ist_NoOp:
case Ist_IMark:
case Ist_WrTmp:
addStmtToIRSB(bb, st);
return e->Iex.Const.con->Ico.U1 ? ARMcc_EQ : ARMcc_NE;
}
+ /* --- And1(x,y), Or1(x,y) --- */
+ /* FIXME: We could (and probably should) do a lot better here, by using the
+ iselCondCode_C/_R scheme used in the amd64 insn selector. */
+ if (e->tag == Iex_Binop
+ && (e->Iex.Binop.op == Iop_And1 || e->Iex.Binop.op == Iop_Or1)) {
+ HReg x_as_32 = newVRegI(env);
+ ARMCondCode cc_x = iselCondCode(env, e->Iex.Binop.arg1);
+ addInstr(env, ARMInstr_Mov(x_as_32, ARMRI84_I84(0,0)));
+ addInstr(env, ARMInstr_CMov(cc_x, x_as_32, ARMRI84_I84(1,0)));
+
+ HReg y_as_32 = newVRegI(env);
+ ARMCondCode cc_y = iselCondCode(env, e->Iex.Binop.arg2);
+ addInstr(env, ARMInstr_Mov(y_as_32, ARMRI84_I84(0,0)));
+ addInstr(env, ARMInstr_CMov(cc_y, y_as_32, ARMRI84_I84(1,0)));
+
+ HReg tmp = newVRegI(env);
+ ARMAluOp aop = e->Iex.Binop.op == Iop_And1 ? ARMalu_AND : ARMalu_OR;
+ addInstr(env, ARMInstr_Alu(aop, tmp, x_as_32, ARMRI84_R(y_as_32)));
+
+ ARMRI84* one = ARMRI84_I84(1,0);
+ addInstr(env, ARMInstr_CmpOrTst(False/*test*/, tmp, one));
+ return ARMcc_NE;
+ }
+
// JRS 2013-Jan-03: this seems completely nonsensical
/* --- CasCmpEQ* --- */
/* Ist_Cas has a dummy argument to compare with, so comparison is
redundant_get_removal_BB ( bb );
// Do minimal constant prop: copy prop and constant prop only. No folding.
+ // JRS FIXME 2019Nov25: this is too weak to be effective on arm32. For that,
+ // specifying doFolding=True makes a huge difference.
bb = cprop_BB_WRK ( bb, /*mustRetainNoOps=*/True,
/*doFolding=*/False );