aluOp = Malu_DSUB;
break;
+ case Iop_And1:
case Iop_And8:
case Iop_And16:
case Iop_And32:
aluOp = Malu_AND;
break;
+ case Iop_Or1:
case Iop_Or8:
case Iop_Or16:
case Iop_Or32:
ULong u;
Long l;
IRType ty = typeOfIRExpr(env->type_env, e);
- vassert(ty == Ity_I8 || ty == Ity_I16 || ty == Ity_I32 ||
+ vassert(ty == Ity_I1 || ty == Ity_I8 || ty == Ity_I16 || ty == Ity_I32 ||
((ty == Ity_I64) && env->mode64));
/* special case: immediate */
case Ico_U8:
u = 0x000000FF & con->Ico.U8;
break;
+ case Ico_U1:
+ u = 0x00000001 & con->Ico.U1;
+ break;
default:
vpanic("iselIntExpr_RH.Iex_Const(mips)");
}
r_dst, mode64));
return MIPScc_NE;
}
+
+ if (e->tag == Iex_Unop
+ && (e->Iex.Unop.op == Iop_CmpNEZ32
+ || ((e->Iex.Unop.op == Iop_CmpNEZ64) && mode64))) {
+ HReg r_dst = newVRegI(env);
+ HReg r_src = iselWordExpr_R(env, e->Iex.Unop.arg);
+
+ addInstr(env, MIPSInstr_Cmp(False, !mode64, r_dst, r_src,
+ hregMIPS_GPR0(mode64), MIPScc_NE));
+ /* Store result to guest_COND */
+ MIPSAMode *am_addr = MIPSAMode_IR(0, GuestStatePointer(mode64));
+
+ addInstr(env, MIPSInstr_Store(4,
+ MIPSAMode_IR(am_addr->Mam.IR.index + COND_OFFSET(mode64),
+ am_addr->Mam.IR.base),
+ r_dst, mode64));
+ return MIPScc_NE;
+ }
#if 0
// sewardj 2019Dec14: this is my best attempt at And1/Or1, but I am not
// sure if it is correct. In any case it is not needed until chasing cond