other *_INVALID symbols.
git-svn-id: svn://svn.valgrind.org/vex/trunk@555
bb->next = dopyIRExpr(bb_in->next);
bb->jumpkind = bb_in->jumpkind;
- IRTemp curr = INVALID_IRTEMP;
+ IRTemp curr = IRTemp_INVALID;
Long delta = 0;
Int sizeof_SP = layout->sizeof_SP;
static IRTemp findShadowTmp ( MCEnv* mce, IRTemp orig )
{
sk_assert(orig < mce->n_originalTmps);
- if (mce->tmpMap[orig] == INVALID_IRTEMP) {
+ if (mce->tmpMap[orig] == IRTemp_INVALID) {
mce->tmpMap[orig]
= newIRTemp(mce->bb->tyenv,
shadowType(mce->bb->tyenv->types[orig]));
results to all destinations. */
/* Outputs: the destination temporary, if there is one. */
- if (d->tmp != INVALID_IRTEMP) {
+ if (d->tmp != IRTemp_INVALID) {
dst = findShadowTmp(mce, d->tmp);
tyDst = typeOfIRTemp(mce->bb->tyenv, d->tmp);
assign( mce->bb, dst, mkPCastTo( mce, tyDst, curr) );
mce.hWordTy = hWordTy;
mce.tmpMap = LibVEX_Alloc(mce.n_originalTmps * sizeof(IRTemp));
for (i = 0; i < mce.n_originalTmps; i++)
- mce.tmpMap[i] = INVALID_IRTEMP;
+ mce.tmpMap[i] = IRTemp_INVALID;
/* Iterate over the stmts. */
IRTemp src = newTemp(ty);
IRTemp dst0 = newTemp(ty);
UChar rm = getUChar(delta0);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
/* addSubCarry == True indicates the intended operation is
add-with-carry or subtract-with-borrow. */
IRTemp src = newTemp(ty);
IRTemp dst0 = newTemp(ty);
UChar rm = getIByte(delta0);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
/* addSubCarry == True indicates the intended operation is
add-with-carry or subtract-with-borrow. */
IRTemp dst1 = newTemp(ty);
IRTemp src = newTemp(ty);
IRTemp dst0 = newTemp(ty);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
IROp op8 = Iop_INVALID;
UInt mask = sz==1 ? 0xFF : (sz==2 ? 0xFFFF : 0xFFFFFFFF);
IRType ty = szToITy(sz);
IRTemp dst0 = newTemp(ty);
IRTemp dst1 = newTemp(ty);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
vassert(sz == 1 || sz == 2 || sz == 4);
IRTemp addr;
IRType ty = szToITy(sz);
IRTemp t1 = newTemp(ty);
- // IRTemp t2 = INVALID_IRTEMP;
+ // IRTemp t2 = IRTemp_INVALID;
IRTemp dst1, src, dst0;
modrm = getIByte(delta);
if (epartIsReg(modrm)) {
Int len;
UChar modrm;
UChar dis_buf[50];
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
IRType ty = szToITy(sz);
IRTemp t1 = newTemp(ty);
- IRTemp t2 = INVALID_IRTEMP;
+ IRTemp t2 = IRTemp_INVALID;
modrm = getIByte(delta);
if (epartIsReg(modrm)) {
IRType ty = szToITy(sz);
IRTemp gsrc = newTemp(ty);
IRTemp esrc = newTemp(ty);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
IRTemp tmpSH = newTemp(Ity_I8);
- IRTemp tmpL = INVALID_IRTEMP;
- IRTemp tmpRes = INVALID_IRTEMP;
- IRTemp tmpSubSh = INVALID_IRTEMP;
+ IRTemp tmpL = IRTemp_INVALID;
+ IRTemp tmpRes = IRTemp_INVALID;
+ IRTemp tmpSubSh = IRTemp_INVALID;
IROp mkpair;
IROp getres;
IROp shift;
vassert(sz == 2 || sz == 4);
t_fetched = t_bitno0 = t_bitno1 = t_bitno2
- = t_addr0 = t_addr1 = t_esp = t_mask = INVALID_IRTEMP;
+ = t_addr0 = t_addr1 = t_esp = t_mask = IRTemp_INVALID;
t_fetched = newTemp(Ity_I8);
t_bitno0 = newTemp(Ity_I32);
IRTemp dest2 = newTemp(ty);
IRTemp acc2 = newTemp(ty);
IRTemp cond8 = newTemp(Ity_I8);
- IRTemp addr = INVALID_IRTEMP;
+ IRTemp addr = IRTemp_INVALID;
UChar rm = getUChar(delta0);
if (epartIsReg(rm)) {
assert. */
*size = 0;
- addr = t1 = t2 = INVALID_IRTEMP;
- //t3 = t4 = INVALID_IRTEMP;
+ addr = t1 = t2 = IRTemp_INVALID;
+ //t3 = t4 = IRTemp_INVALID;
DIP("\t0x%x: ", guest_eip_bbstart+delta);
doHelperCall( env, passBBP, d->guard, d->cee, d->args );
/* Now figure out what to do with the returned value, if any. */
- if (d->tmp == INVALID_IRTEMP)
+ if (d->tmp == IRTemp_INVALID)
/* No return value. Nothing to do. */
return;
void ppIRTemp ( IRTemp tmp )
{
- if (tmp == INVALID_IRTEMP)
- vex_printf("INVALID_IRTEMP");
+ if (tmp == IRTemp_INVALID)
+ vex_printf("IRTemp_INVALID");
else
vex_printf( "t%d", (Int)tmp);
}
void ppIRDirty ( IRDirty* d )
{
Int i;
- if (d->tmp != INVALID_IRTEMP) {
+ if (d->tmp != IRTemp_INVALID) {
ppIRTemp(d->tmp);
vex_printf(" = ");
}
d->cee = NULL;
d->guard = NULL;
d->args = NULL;
- d->tmp = INVALID_IRTEMP;
+ d->tmp = IRTemp_INVALID;
d->mFx = Ifx_None;
d->mAddr = NULL;
d->mSize = 0;
if (d->guard == NULL) goto bad_dirty;
if (typeOfIRExpr(tyenv, d->guard) != Ity_Bit)
sanityCheckFail(bb,stmt,"IRStmt.Dirty.guard not :: Ity_Bit");
- if (d->tmp != INVALID_IRTEMP
+ if (d->tmp != IRTemp_INVALID
&& typeOfIRTemp(tyenv, d->tmp) == Ity_Bit)
sanityCheckFail(bb,stmt,"IRStmt.Dirty.dst :: Ity_Bit");
for (i = 0; d->args[i] != NULL; i++) {
}
else
if (stmt->tag == Ist_Dirty
- && stmt->Ist.Dirty.details->tmp != INVALID_IRTEMP) {
+ && stmt->Ist.Dirty.details->tmp != IRTemp_INVALID) {
IRDirty* d = stmt->Ist.Dirty.details;
if (d->tmp < 0 || d->tmp >= n_temps)
sanityCheckFail(bb, stmt,
deltaIRExpr(d->guard, delta);
for (i = 0; d->args[i]; i++)
deltaIRExpr(d->args[i], delta);
- if (d->tmp != INVALID_IRTEMP)
+ if (d->tmp != IRTemp_INVALID)
d->tmp += delta;
if (d->mAddr)
deltaIRExpr(d->mAddr, delta);
extern void ppIRTemp ( IRTemp );
-#define INVALID_IRTEMP ((IRTemp)0xFFFFFFFF)
+#define IRTemp_INVALID ((IRTemp)0xFFFFFFFF)
/* ------------------ Binary and unary ops ------------------ */
IRCallee* cee; /* where to call */
IRExpr* guard; /* :: Ity_Bit. Controls whether call happens */
IRExpr** args; /* arg list, ends in NULL */
- IRTemp tmp; /* to assign result to, or INVALID_IRTEMP if none */
+ IRTemp tmp; /* to assign result to, or IRTemp_INVALID if none */
/* Mem effects; we allow only one R/W/M region to be stated */
IREffect mFx; /* indicates memory effects, if any */
Shadow IRTemps are therefore allocated on demand. mce.tmpMap is a
table indexed [0 .. n_types-1], which gives the current shadow for
- each original tmp, or INVALID_IRTEMP if none is so far assigned.
+ each original tmp, or IRTemp_INVALID if none is so far assigned.
It is necessary to support making multiple assignments to a shadow
-- specifically, after testing a shadow for definedness, it needs
to be made defined. But IR's SSA property disallows this.
that, and the tmpMap is updated to reflect the new binding.
A corollary is that if the tmpMap maps a given tmp to
- INVALID_IRTEMP and we are hoping to read that shadow tmp, it means
+ IRTemp_INVALID and we are hoping to read that shadow tmp, it means
there's a read-before-write error in the original tmps. The IR
sanity checker should catch all such anomalies, however.
*/
static IRTemp findShadowTmp ( MCEnv* mce, IRTemp orig )
{
sk_assert(orig < mce->n_originalTmps);
- if (mce->tmpMap[orig] == INVALID_IRTEMP) {
+ if (mce->tmpMap[orig] == IRTemp_INVALID) {
mce->tmpMap[orig]
= newIRTemp(mce->bb->tyenv,
shadowType(mce->bb->tyenv->types[orig]));
results to all destinations. */
/* Outputs: the destination temporary, if there is one. */
- if (d->tmp != INVALID_IRTEMP) {
+ if (d->tmp != IRTemp_INVALID) {
dst = findShadowTmp(mce, d->tmp);
tyDst = typeOfIRTemp(mce->bb->tyenv, d->tmp);
assign( mce->bb, dst, mkPCastTo( mce, tyDst, curr) );
mce.hWordTy = hWordTy;
mce.tmpMap = LibVEX_Alloc(mce.n_originalTmps * sizeof(IRTemp));
for (i = 0; i < mce.n_originalTmps; i++)
- mce.tmpMap[i] = INVALID_IRTEMP;
+ mce.tmpMap[i] = IRTemp_INVALID;
/* Iterate over the stmts. */