]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename INVALID_IRTEMP to IRTemp_INVALID to be consistent with
authorJulian Seward <jseward@acm.org>
Mon, 15 Nov 2004 14:22:12 +0000 (14:22 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 15 Nov 2004 14:22:12 +0000 (14:22 +0000)
other *_INVALID symbols.

git-svn-id: svn://svn.valgrind.org/vex/trunk@555

VEX/head20041019/coregrind/vg_translate.c
VEX/head20041019/memcheck/mc_translate.c
VEX/priv/guest-x86/toIR.c
VEX/priv/host-x86/isel.c
VEX/priv/ir/irdefs.c
VEX/priv/ir/iropt.c
VEX/pub/libvex_ir.h
VEX/test_main.c

index 553073778731779c89ecf34ff6a4853bd965024e..6f0bfa8c79105419f165ccb5c66634c2e5b5ec20 100644 (file)
@@ -1391,7 +1391,7 @@ IRBB* vg_SP_update_pass ( IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
    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;
index e405875045578a384a6c1f82c0e5a9ded44827c2..f610ca86760e3cebbc2e3fa7433167cb8c16460c 100644 (file)
@@ -102,7 +102,7 @@ typedef
 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 @@ void do_shadow_Dirty ( MCEnv* mce, IRDirty* d )
       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 @@ IRBB* SK_(instrument) ( IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
    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. */
 
index 74146d027049b353387a37a159da9b7f3f359e7b..31177a476d93979331f3508380d284941b0bab75 100644 (file)
@@ -1852,7 +1852,7 @@ UInt dis_op2_E_G ( UChar       sorb,
    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 @@ UInt dis_op2_G_E ( UChar       sorb,
    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 @@ UInt dis_Grp1 ( UChar sorb,
    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 @@ UInt dis_Grp2 ( UChar  sorb,
    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 @@ UInt dis_Grp3 ( UChar sorb, Int sz, UInt delta )
    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 @@ UInt dis_Grp5 ( UChar sorb, Int sz, UInt delta, DisResult* whatNext )
    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 @@ UInt dis_SHLRD_Gv_Ev ( UChar sorb,
    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 @@ UInt dis_bt_G_E ( UChar sorb, Int sz, UInt delta, BtOp op )
    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 @@ UInt dis_cmpxchg_G_E ( UChar       sorb,
    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 @@ static DisResult disInstr ( /*IN*/  Bool    resteerOK,
       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);
 
index 98e8d5d348765df487069454f688403e037f29ac..77681c74e40f22dd4e3e75706a5a76da1de515ac 100644 (file)
@@ -2365,7 +2365,7 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt )
       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;
 
index 7fdb14e9158db343a5bdaab179a0a9cc18f98449..7001f31650c39079b328d31f55062a6abea2d9ec 100644 (file)
@@ -94,8 +94,8 @@ void ppIRArray ( IRArray* arr )
 
 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 ppIREffect ( IREffect fx )
 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 @@ IRDirty* emptyIRDirty ( void ) {
    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 @@ void tcStmt ( IRBB* bb, IRStmt* stmt, IRType gWordTy )
          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 @@ void sanityCheckIRBB ( IRBB* bb, IRType guest_word_size )
       }
       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, 
index f64e3d9eade2da12af93a07c73c622384aa7b34e..37cf8d1663d185041ee9525d7ec630767a709591 100644 (file)
@@ -2939,7 +2939,7 @@ static void deltaIRStmt ( IRStmt* st, Int delta )
          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);
index 9ef49fd9156463b4ce71a5b71ad46e4cfa6a14e6..bc58c380afed7eb0482ef9ed19eefc7f029ff8a9 100644 (file)
@@ -155,7 +155,7 @@ typedef UInt IRTemp;
 
 extern void ppIRTemp ( IRTemp );
 
-#define INVALID_IRTEMP ((IRTemp)0xFFFFFFFF)
+#define IRTemp_INVALID ((IRTemp)0xFFFFFFFF)
 
 
 /* ------------------ Binary and unary ops ------------------ */
@@ -557,7 +557,7 @@ typedef
       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 */
index a51995ab37abf0be54a9a9301ed48d2eb9a4c0c5..6aa4368e3413f717fe7ec8a470109186c3ab0cbe 100644 (file)
@@ -424,7 +424,7 @@ typedef
 
    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 @@ typedef
    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 @@ typedef
 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 @@ void do_shadow_Dirty ( MCEnv* mce, IRDirty* d )
       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 @@ IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
    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. */