Rename INVALID_IRTEMP to IRTemp_INVALID to be consistent with
other *_INVALID symbols.
git-svn-id: svn://svn.valgrind.org/vex/trunk@555 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/head20041019/coregrind/vg_translate.c b/head20041019/coregrind/vg_translate.c
index 5530737..6f0bfa8 100644
--- a/head20041019/coregrind/vg_translate.c
+++ b/head20041019/coregrind/vg_translate.c
@@ -1391,7 +1391,7 @@
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;
diff --git a/head20041019/memcheck/mc_translate.c b/head20041019/memcheck/mc_translate.c
index e405875..f610ca8 100644
--- a/head20041019/memcheck/mc_translate.c
+++ b/head20041019/memcheck/mc_translate.c
@@ -102,7 +102,7 @@
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]));
@@ -1394,7 +1394,7 @@
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) );
@@ -1535,7 +1535,7 @@
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. */
diff --git a/priv/guest-x86/toIR.c b/priv/guest-x86/toIR.c
index 74146d0..31177a4 100644
--- a/priv/guest-x86/toIR.c
+++ b/priv/guest-x86/toIR.c
@@ -1852,7 +1852,7 @@
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. */
@@ -1961,7 +1961,7 @@
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. */
@@ -2294,7 +2294,7 @@
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);
@@ -2378,7 +2378,7 @@
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);
@@ -2773,7 +2773,7 @@
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)) {
@@ -2958,10 +2958,10 @@
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)) {
@@ -4877,11 +4877,11 @@
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;
@@ -5007,7 +5007,7 @@
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);
@@ -5304,7 +5304,7 @@
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)) {
@@ -6245,8 +6245,8 @@
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);
diff --git a/priv/host-x86/isel.c b/priv/host-x86/isel.c
index 98e8d5d..77681c7 100644
--- a/priv/host-x86/isel.c
+++ b/priv/host-x86/isel.c
@@ -2365,7 +2365,7 @@
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;
diff --git a/priv/ir/irdefs.c b/priv/ir/irdefs.c
index 7fdb14e..7001f31 100644
--- a/priv/ir/irdefs.c
+++ b/priv/ir/irdefs.c
@@ -94,8 +94,8 @@
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);
}
@@ -314,7 +314,7 @@
void ppIRDirty ( IRDirty* d )
{
Int i;
- if (d->tmp != INVALID_IRTEMP) {
+ if (d->tmp != IRTemp_INVALID) {
ppIRTemp(d->tmp);
vex_printf(" = ");
}
@@ -662,7 +662,7 @@
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;
@@ -1569,7 +1569,7 @@
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++) {
@@ -1642,7 +1642,7 @@
}
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,
diff --git a/priv/ir/iropt.c b/priv/ir/iropt.c
index f64e3d9..37cf8d1 100644
--- a/priv/ir/iropt.c
+++ b/priv/ir/iropt.c
@@ -2939,7 +2939,7 @@
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);
diff --git a/pub/libvex_ir.h b/pub/libvex_ir.h
index 9ef49fd..bc58c38 100644
--- a/pub/libvex_ir.h
+++ b/pub/libvex_ir.h
@@ -155,7 +155,7 @@
extern void ppIRTemp ( IRTemp );
-#define INVALID_IRTEMP ((IRTemp)0xFFFFFFFF)
+#define IRTemp_INVALID ((IRTemp)0xFFFFFFFF)
/* ------------------ Binary and unary ops ------------------ */
@@ -557,7 +557,7 @@
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 */
diff --git a/test_main.c b/test_main.c
index a51995a..6aa4368 100644
--- a/test_main.c
+++ b/test_main.c
@@ -424,7 +424,7 @@
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.
@@ -434,7 +434,7 @@
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.
*/
@@ -444,7 +444,7 @@
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]));
@@ -1736,7 +1736,7 @@
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) );
@@ -1877,7 +1877,7 @@
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. */