]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Rename BBPTR to GSPTR as it denotes guest state pointer only
authorIvo Raisr <ivosh@ivosh.net>
Fri, 16 Dec 2016 21:20:30 +0000 (21:20 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Fri, 16 Dec 2016 21:20:30 +0000 (21:20 +0000)
Fixes BZ#373555.

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

16 files changed:
VEX/priv/guest_amd64_toIR.c
VEX/priv/guest_mips_toIR.c
VEX/priv/guest_ppc_toIR.c
VEX/priv/guest_s390_toIR.c
VEX/priv/guest_x86_toIR.c
VEX/priv/host_amd64_isel.c
VEX/priv/host_arm64_isel.c
VEX/priv/host_arm_isel.c
VEX/priv/host_mips_isel.c
VEX/priv/host_ppc_isel.c
VEX/priv/host_s390_isel.c
VEX/priv/host_tilegx_isel.c
VEX/priv/host_x86_isel.c
VEX/priv/ir_defs.c
VEX/priv/ir_opt.c
VEX/pub/libvex_ir.h

index 2080dc0c6bcd906d1ec65362babf4537db9f390d..f485a5f2647b1d1c1921b163cca0bb23d0895a88 100644 (file)
@@ -5214,7 +5214,7 @@ static void gen_FINIT_SEQUENCE ( IRExpr* guard )
                     0/*regparms*/, 
                     "amd64g_dirtyhelper_FINIT", 
                     &amd64g_dirtyhelper_FINIT,
-                    mkIRExprVec_1( IRExpr_BBPTR() )
+                    mkIRExprVec_1( IRExpr_GSPTR() )
                  );
 
    /* declare we're writing guest state */
@@ -5584,7 +5584,7 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok,
                                  0/*regparms*/, 
                                  "amd64g_dirtyhelper_FLDENV", 
                                  &amd64g_dirtyhelper_FLDENV,
-                                 mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                                 mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                               );
                d->tmp       = w64;
                /* declare we're reading memory */
@@ -5681,7 +5681,7 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok,
                                0/*regparms*/, 
                                "amd64g_dirtyhelper_FSTENV", 
                                &amd64g_dirtyhelper_FSTENV,
-                               mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                               mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                             );
                /* declare we're writing memory */
                d->mFx   = Ifx_Write;
@@ -6551,7 +6551,7 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok,
                          0/*regparms*/, 
                          "amd64g_dirtyhelper_FRSTOR",
                          &amd64g_dirtyhelper_FRSTOR,
-                         mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                         mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                       );
                   d->mSize = 108;
                }
@@ -6632,7 +6632,7 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok,
                          0/*regparms*/, 
                          "amd64g_dirtyhelper_FNSAVE",
                          &amd64g_dirtyhelper_FNSAVE,
-                         mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                         mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                       );
                   d->mSize = 108;
                }
@@ -11598,7 +11598,7 @@ static void gen_XSAVE_SEQUENCE ( IRTemp addr, IRTemp rfbm )
                     0/*regparms*/, 
                     "amd64g_dirtyhelper_XSAVE_COMPONENT_0",
                     &amd64g_dirtyhelper_XSAVE_COMPONENT_0,
-                    mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                    mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                  );
    d0->guard = binop(Iop_CmpEQ64, binop(Iop_And64, mkexpr(rfbm), mkU64(1)),
                      mkU64(1));
@@ -11658,7 +11658,7 @@ static void gen_XSAVE_SEQUENCE ( IRTemp addr, IRTemp rfbm )
                     0/*regparms*/, 
                     "amd64g_dirtyhelper_XSAVE_COMPONENT_1_EXCLUDING_XMMREGS",
                     &amd64g_dirtyhelper_XSAVE_COMPONENT_1_EXCLUDING_XMMREGS,
-                    mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                    mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                  );
    d1->guard = guard_1or2;
 
@@ -11821,7 +11821,7 @@ static void gen_XRSTOR_SEQUENCE ( IRTemp addr, IRTemp xstate_bv, IRTemp rfbm )
                     0/*regparms*/, 
                     "amd64g_dirtyhelper_XRSTOR_COMPONENT_0",
                     &amd64g_dirtyhelper_XRSTOR_COMPONENT_0,
-                    mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                    mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                  );
    d0->guard = binop(Iop_CmpNE64, mkexpr(restore_0), mkU64(0));
 
@@ -11902,7 +11902,7 @@ static void gen_XRSTOR_SEQUENCE ( IRTemp addr, IRTemp xstate_bv, IRTemp rfbm )
                     0/*regparms*/, 
                     "amd64g_dirtyhelper_XRSTOR_COMPONENT_1_EXCLUDING_XMMREGS",
                     &amd64g_dirtyhelper_XRSTOR_COMPONENT_1_EXCLUDING_XMMREGS,
-                    mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                    mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                 ) ;
    d1->guard = restore_1or2e;
 
@@ -17681,7 +17681,7 @@ static Long dis_AESx ( const VexAbiInfo* vbi, Prefix pfx,
    IRExpr*  gstOffLe     = mkU64(gstOffL);
    IRExpr*  gstOffRe     = mkU64(gstOffR);
    IRExpr** args
-      = mkIRExprVec_5( IRExpr_BBPTR(), opc4, gstOffDe, gstOffLe, gstOffRe );
+      = mkIRExprVec_5( IRExpr_GSPTR(), opc4, gstOffDe, gstOffLe, gstOffRe );
 
    IRDirty* d    = unsafeIRDirty_0_N( 0/*regparms*/, nm, fn, args );
    /* It's not really a dirty call, but we can't use the clean helper
@@ -17771,7 +17771,7 @@ static Long dis_AESKEYGENASSIST ( const VexAbiInfo* vbi, Prefix pfx,
    IRExpr*  gstOffLe     = mkU64(gstOffL);
    IRExpr*  gstOffRe     = mkU64(gstOffR);
    IRExpr** args
-      = mkIRExprVec_4( IRExpr_BBPTR(), imme, gstOffLe, gstOffRe );
+      = mkIRExprVec_4( IRExpr_GSPTR(), imme, gstOffLe, gstOffRe );
 
    IRDirty* d    = unsafeIRDirty_0_N( 0/*regparms*/, nm, fn, args );
    /* It's not really a dirty call, but we can't use the clean helper
@@ -18711,7 +18711,7 @@ static Long dis_PCMPxSTRx ( const VexAbiInfo* vbi, Prefix pfx,
    IRExpr*  edxIN        = isISTRx ? mkU64(0) : getIRegRDX(8);
    IRExpr*  eaxIN        = isISTRx ? mkU64(0) : getIRegRAX(8);
    IRExpr** args
-      = mkIRExprVec_6( IRExpr_BBPTR(),
+      = mkIRExprVec_6( IRExpr_GSPTR(),
                        opc4_and_imm, gstOffLe, gstOffRe, edxIN, eaxIN );
 
    IRTemp   resT = newTemp(Ity_I64);
@@ -21645,7 +21645,7 @@ Long dis_ESC_0F (
          void*        fAddr = &amd64g_dirtyhelper_RDTSCP;
          IRDirty* d
             = unsafeIRDirty_0_N ( 0/*regparms*/, 
-                                  fName, fAddr, mkIRExprVec_1(IRExpr_BBPTR()) );
+                                  fName, fAddr, mkIRExprVec_1(IRExpr_GSPTR()) );
          /* declare guest state effects */
          d->nFxState = 3;
          vex_bzero(&d->fxState, sizeof(d->fxState));
@@ -21966,7 +21966,7 @@ Long dis_ESC_0F (
 
       vassert(fName); vassert(fAddr);
       d = unsafeIRDirty_0_N ( 0/*regparms*/, 
-                              fName, fAddr, mkIRExprVec_1(IRExpr_BBPTR()) );
+                              fName, fAddr, mkIRExprVec_1(IRExpr_GSPTR()) );
       /* declare guest state effects */
       d->nFxState = 4;
       vex_bzero(&d->fxState, sizeof(d->fxState));
index 776e6c5d93f6d1c7fbd926d37227ae8ef9dbce5f..6368b3a370d34b87e51be90ebabb8960e10fb938 100644 (file)
@@ -1119,12 +1119,12 @@ static void calculateFCSR(UInt fs, UInt ft, UInt inst, Bool sz32, UInt opN)
 {
    IRDirty *d;
    IRTemp fcsr = newTemp(Ity_I32);
-   /* IRExpr_BBPTR() => Need to pass pointer to guest state to helper. */
+   /* IRExpr_GSPTR() => Need to pass pointer to guest state to helper. */
    if (fp_mode64)
       d = unsafeIRDirty_1_N(fcsr, 0,
                             "mips_dirtyhelper_calculate_FCSR_fp64",
                             &mips_dirtyhelper_calculate_FCSR_fp64,
-                            mkIRExprVec_4(IRExpr_BBPTR(),
+                            mkIRExprVec_4(IRExpr_GSPTR(),
                                           mkU32(fs),
                                           mkU32(ft),
                                           mkU32(inst)));
@@ -1132,7 +1132,7 @@ static void calculateFCSR(UInt fs, UInt ft, UInt inst, Bool sz32, UInt opN)
       d = unsafeIRDirty_1_N(fcsr, 0,
                             "mips_dirtyhelper_calculate_FCSR_fp32",
                             &mips_dirtyhelper_calculate_FCSR_fp32,
-                            mkIRExprVec_4(IRExpr_BBPTR(),
+                            mkIRExprVec_4(IRExpr_GSPTR(),
                                           mkU32(fs),
                                           mkU32(ft),
                                           mkU32(inst)));
index 0ff62b92d5cabcf625bec4a0fe9e6b5e171c7511..b19dcbc387d03074962c8da191ce9cb605ac481c 100644 (file)
@@ -22247,14 +22247,14 @@ static Bool dis_av_load ( const VexAbiInfo* vbi, UInt theInstr )
       IRDirty* d;
       UInt vD_off = vectorGuestRegOffset(vD_addr);
       IRExpr** args_be = mkIRExprVec_5(
-                         IRExpr_BBPTR(),
+                         IRExpr_GSPTR(),
                          mkU32(vD_off),
                          binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)),
                                           mkU32(0xF)),
                          mkU32(0)/*left*/,
                          mkU32(1)/*Big Endian*/);
       IRExpr** args_le = mkIRExprVec_5(
-                         IRExpr_BBPTR(),
+                         IRExpr_GSPTR(),
                          mkU32(vD_off),
                          binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)),
                                           mkU32(0xF)),
@@ -22296,14 +22296,14 @@ static Bool dis_av_load ( const VexAbiInfo* vbi, UInt theInstr )
       IRDirty* d;
       UInt vD_off = vectorGuestRegOffset(vD_addr);
       IRExpr** args_be = mkIRExprVec_5(
-                             IRExpr_BBPTR(),
+                             IRExpr_GSPTR(),
                              mkU32(vD_off),
                              binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)),
                                               mkU32(0xF)),
                              mkU32(1)/*right*/,
                              mkU32(1)/*Big Endian*/);
       IRExpr** args_le = mkIRExprVec_5(
-                             IRExpr_BBPTR(),
+                             IRExpr_GSPTR(),
                              mkU32(vD_off),
                              binop(Iop_And32, mkNarrowTo32(ty, mkexpr(EA)),
                                               mkU32(0xF)),
index 59cddfd7b32ce7442686cebcf3d32ced1f1146e8..c5b97b406fe76633f6475e341caca95506ec2195 100644 (file)
@@ -13172,10 +13172,10 @@ s390_irgen_STFLE(IRTemp op2addr)
    IRDirty *d;
    IRTemp cc = newTemp(Ity_I64);
 
-   /* IRExpr_BBPTR() => Need to pass pointer to guest state to helper */
+   /* IRExpr_GSPTR() => Need to pass pointer to guest state to helper */
    d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_STFLE",
                          &s390x_dirtyhelper_STFLE,
-                         mkIRExprVec_2(IRExpr_BBPTR(), mkexpr(op2addr)));
+                         mkIRExprVec_2(IRExpr_GSPTR(), mkexpr(op2addr)));
 
    d->nFxState = 1;
    vex_bzero(&d->fxState, sizeof(d->fxState));
index 24f9848f0a653b17689de9d3a2db02c0860ca77d..de09d3a8a050341d9a11ff82b7619518871d6445 100644 (file)
@@ -4030,7 +4030,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta )
                                 0/*regparms*/, 
                                 "x86g_dirtyhelper_FLDENV", 
                                 &x86g_dirtyhelper_FLDENV,
-                                mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                                mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                              );
                d->tmp   = ew;
                /* declare we're reading memory */
@@ -4126,7 +4126,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta )
                                0/*regparms*/, 
                                "x86g_dirtyhelper_FSTENV", 
                                &x86g_dirtyhelper_FSTENV,
-                               mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                               mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                             );
                /* declare we're writing memory */
                d->mFx   = Ifx_Write;
@@ -4842,7 +4842,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta )
                                 0/*regparms*/, 
                                 "x86g_dirtyhelper_FINIT", 
                                 &x86g_dirtyhelper_FINIT,
-                                mkIRExprVec_1(IRExpr_BBPTR())
+                                mkIRExprVec_1(IRExpr_GSPTR())
                              );
 
                /* declare we're writing guest state */
@@ -5041,7 +5041,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta )
                                 0/*regparms*/, 
                                 "x86g_dirtyhelper_FRSTOR", 
                                 &x86g_dirtyhelper_FRSTOR,
-                                mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                                mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                              );
                d->tmp   = ew;
                /* declare we're reading memory */
@@ -5100,7 +5100,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta )
                                0/*regparms*/, 
                                "x86g_dirtyhelper_FSAVE", 
                                &x86g_dirtyhelper_FSAVE,
-                               mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+                               mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
                             );
                /* declare we're writing memory */
                d->mFx   = Ifx_Write;
@@ -8337,7 +8337,7 @@ DisResult disInstr_X86_WRK (
              0/*regparms*/, 
              "x86g_dirtyhelper_FXSAVE", 
              &x86g_dirtyhelper_FXSAVE,
-             mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+             mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
           );
 
       /* declare we're writing memory */
@@ -8411,7 +8411,7 @@ DisResult disInstr_X86_WRK (
              0/*regparms*/, 
              "x86g_dirtyhelper_FXRSTOR", 
              &x86g_dirtyhelper_FXRSTOR,
-             mkIRExprVec_2( IRExpr_BBPTR(), mkexpr(addr) )
+             mkIRExprVec_2( IRExpr_GSPTR(), mkexpr(addr) )
           );
 
       /* declare we're reading memory */
@@ -14874,7 +14874,7 @@ DisResult disInstr_X86_WRK (
 
          vassert(fName); vassert(fAddr);
          d = unsafeIRDirty_0_N ( 0/*regparms*/, 
-                                 fName, fAddr, mkIRExprVec_1(IRExpr_BBPTR()) );
+                                 fName, fAddr, mkIRExprVec_1(IRExpr_GSPTR()) );
          /* declare guest state effects */
          d->nFxState = 4;
          vex_bzero(&d->fxState, sizeof(d->fxState));
index a08c980462e6921175c9ff4b06ed976ee0ccf2a9..262c7f8bb3ee498148780f2a0a6ed9127201ce98 100644 (file)
@@ -370,7 +370,7 @@ static AMD64Instr* iselIntExpr_single_instruction ( ISelEnv* env,
    vassert(e->tag != Iex_VECRET);
 
    /* In this case we give out a copy of the BaseBlock pointer. */
-   if (UNLIKELY(e->tag == Iex_BBPTR)) {
+   if (UNLIKELY(e->tag == Iex_GSPTR)) {
       return mk_iMOVsd_RR( hregAMD64_RBP(), dst );
    }
 
@@ -442,9 +442,9 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* Marshal args for a call and do the call.
 
@@ -462,7 +462,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       stack, it is enough to preallocate the return space before
       marshalling any arguments, in this case.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the
+      |args| may also contain IRExpr_GSPTR(), in which case the
       value in %rbp is passed as the corresponding argument.
 
       Generating code which is both efficient and correct when
@@ -556,7 +556,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    /* FAST SCHEME */
    /* In this loop, we process args that can be computed into the
       destination (real) register with a single instruction, without
-      using any fixed regs.  That also includes IRExpr_BBPTR(), but
+      using any fixed regs.  That also includes IRExpr_GSPTR(), but
       not IRExpr_VECRET().  Indeed, if the IR is well-formed, we can
       never see IRExpr_VECRET() at this point, since the return-type
       check above should ensure all those cases use the slow scheme
@@ -564,7 +564,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    vassert(n_args >= 0 && n_args <= 6);
    for (i = 0; i < n_args; i++) {
       IRExpr* arg = args[i];
-      if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg))) {
+      if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg))) {
          vassert(typeOfIRExpr(env->type_env, args[i]) == Ity_I64);
       }
       fastinstrs[i] 
@@ -610,10 +610,10 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    vassert(n_args >= 0 && n_args <= 6);
    for (i = 0; i < n_args; i++) {
       IRExpr* arg = args[i];
-      if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+      if (UNLIKELY(arg->tag == Iex_GSPTR)) {
          tmpregs[i] = newVRegI(env);
          addInstr(env, mk_iMOVsd_RR( hregAMD64_RBP(), tmpregs[i]));
-         nBBPTRs++;
+         nGSPTRs++;
       }
       else if (UNLIKELY(arg->tag == Iex_VECRET)) {
          /* We stashed the address of the return slot earlier, so just
@@ -661,7 +661,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       vassert(nVECRETs == 0);
    }
 
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
 
    vassert(*stackAdjustAfterCall == 0);
    vassert(is_RetLoc_INVALID(*retloc));
index 9aadcce944d6ef9d1b02df8e85176f4bd79396d5..42748e49c4f2572b20940218e738131dc7d66b90 100644 (file)
@@ -449,7 +449,7 @@ void set_FPCR_rounding_mode ( ISelEnv* env, IRExpr* mode )
 static
 Bool mightRequireFixedRegs ( IRExpr* e )
 {
-   if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(e))) {
+   if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(e))) {
       // These are always "safe" -- either a copy of SP in some
       // arbitrary vreg, or a copy of x21, respectively.
       return False;
@@ -493,9 +493,9 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* Marshal args for a call and do the call.
 
@@ -513,7 +513,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       preallocate the return space before marshalling any arguments,
       in this case.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the
+      |args| may also contain IRExpr_GSPTR(), in which case the
       value in x21 is passed as the corresponding argument.
 
       Generating code which is both efficient and correct when
@@ -560,14 +560,14 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       IRExpr* arg = args[i];
       if (UNLIKELY(arg->tag == Iex_VECRET)) {
          nVECRETs++;
-      } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-         nBBPTRs++;
+      } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+         nGSPTRs++;
       }
       n_args++;
    }
 
    /* If this fails, the IR is ill-formed */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
 
    /* If we have a VECRET, allocate space on the stack for the return
       value, and record the stack pointer after that. */
@@ -640,7 +640,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy = typeOfIRExpr(env->type_env, args[i]);
 
          if (nextArgReg >= ARM64_N_ARGREGS)
@@ -651,7 +651,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
                                            iselIntExpr_R(env, args[i]) ));
             nextArgReg++;
          }
-         else if (arg->tag == Iex_BBPTR) {
+         else if (arg->tag == Iex_GSPTR) {
             vassert(0); //ATC
             addInstr(env, ARM64Instr_MovI( argregs[nextArgReg],
                                            hregARM64_X21() ));
@@ -679,7 +679,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy = typeOfIRExpr(env->type_env, args[i]);
 
          if (nextArgReg >= ARM64_N_ARGREGS)
@@ -689,7 +689,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
             tmpregs[nextArgReg] = iselIntExpr_R(env, args[i]);
             nextArgReg++;
          }
-         else if (arg->tag == Iex_BBPTR) {
+         else if (arg->tag == Iex_GSPTR) {
             vassert(0); //ATC
             tmpregs[nextArgReg] = hregARM64_X21();
             nextArgReg++;
@@ -733,7 +733,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
 
    /* Do final checks, set the return values, and generate the call
       instruction proper. */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
    vassert(nVECRETs == (retTy == Ity_V128 || retTy == Ity_V256) ? 1 : 0);
    vassert(*stackAdjustAfterCall == 0);
    vassert(is_RetLoc_INVALID(*retloc));
index 426f85d62dd6528d9d06fa4680211d79c1b32c48..8385e7b5b6b192854c6848ba9fce77176eaca233 100644 (file)
@@ -353,7 +353,7 @@ void set_VFP_rounding_mode ( ISelEnv* env, IRExpr* mode )
 static
 Bool mightRequireFixedRegs ( IRExpr* e )
 {
-   if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(e))) {
+   if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(e))) {
       // These are always "safe" -- either a copy of r13(sp) in some
       // arbitrary vreg, or a copy of r8, respectively.
       return False;
@@ -387,7 +387,7 @@ Bool doHelperCallWithArgsOnStack ( /*OUT*/UInt*   stackAdjustAfterCall,
    UInt n_real_args = 0;
    for (i = 1; args[i]; i++) {
       IRExpr* arg = args[i];
-      if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(arg)))
+      if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(arg)))
          goto no_match;
       IRType argTy = typeOfIRExpr(env->type_env, arg);
       if (UNLIKELY(argTy != Ity_I32))
@@ -525,9 +525,9 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* Marshal args for a call and do the call.
 
@@ -545,7 +545,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       preallocate the return space before marshalling any arguments,
       in this case.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the
+      |args| may also contain IRExpr_GSPTR(), in which case the
       value in r8 is passed as the corresponding argument.
 
       Generating code which is both efficient and correct when
@@ -592,8 +592,8 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       IRExpr* arg = args[i];
       if (UNLIKELY(arg->tag == Iex_VECRET)) {
          nVECRETs++;
-      } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-         nBBPTRs++;
+      } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+         nGSPTRs++;
       }
       n_args++;
    }
@@ -665,7 +665,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy = typeOfIRExpr(env->type_env, arg);
 
          if (nextArgReg >= ARM_N_ARGREGS)
@@ -696,7 +696,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
             addInstr(env, mk_iMOVds_RR( argregs[nextArgReg], raHi ));
             nextArgReg++;
          }
-         else if (arg->tag == Iex_BBPTR) {
+         else if (arg->tag == Iex_GSPTR) {
             vassert(0); //ATC
             addInstr(env, mk_iMOVds_RR( argregs[nextArgReg],
                                         hregARM_R8() ));
@@ -722,7 +722,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy  = typeOfIRExpr(env->type_env, arg);
 
          if (nextArgReg >= ARM_N_ARGREGS)
@@ -745,7 +745,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
             tmpregs[nextArgReg] = raHi;
             nextArgReg++;
          }
-         else if (arg->tag == Iex_BBPTR) {
+         else if (arg->tag == Iex_GSPTR) {
             vassert(0); //ATC
             tmpregs[nextArgReg] = hregARM_R8();
             nextArgReg++;
@@ -791,7 +791,7 @@ Bool doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
 
    /* Do final checks, set the return values, and generate the call
       instruction proper. */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
    vassert(nVECRETs == (retTy == Ity_V128 || retTy == Ity_V256) ? 1 : 0);
    vassert(*stackAdjustAfterCall == 0);
    vassert(is_RetLoc_INVALID(*retloc));
index 7fa396d3948a2a6f275469bfbd8cac269f9f4ac4..9e44dd44076d47ad3bf2cace7b3fd86890c4a8e8 100644 (file)
@@ -407,9 +407,9 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* MIPS O32 calling convention: up to four registers ($a0 ... $a3)
       are allowed to be used for passing integer arguments. They correspond
@@ -431,7 +431,7 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
       stack, it is enough to preallocate the return space before
       marshalling any arguments, in this case.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the value
+      |args| may also contain IRExpr_GSPTR(), in which case the value
       in the guest state pointer register is passed as the
       corresponding argument. */
 
@@ -440,8 +440,8 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
       IRExpr* arg = args[i];
       if (UNLIKELY(arg->tag == Iex_VECRET)) {
          nVECRETs++;
-      } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-         nBBPTRs++;
+      } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+         nGSPTRs++;
       }
       n_args++;
    }
@@ -512,7 +512,7 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
          vassert(argreg < MIPS_N_REGPARMS);
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy = typeOfIRExpr(env->type_env, arg);
 
          if (aTy == Ity_I32 || mode64) {
@@ -532,7 +532,7 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
             argiregs |= (1 << (argreg + 4));
             addInstr(env, mk_iMOVds_RR( argregs[argreg], rLo));
             argreg++;
-         } else if (arg->tag == Iex_BBPTR) {
+         } else if (arg->tag == Iex_GSPTR) {
             vassert(0);  // ATC
             addInstr(env, mk_iMOVds_RR(argregs[argreg],
                                        GuestStatePointer(mode64)));
@@ -553,10 +553,10 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
 
          IRType  aTy = Ity_INVALID;
-         if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+         if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
             aTy  = typeOfIRExpr(env->type_env, arg);
 
-         if (aTy == Ity_I32 || (mode64 && arg->tag != Iex_BBPTR)) {
+         if (aTy == Ity_I32 || (mode64 && arg->tag != Iex_GSPTR)) {
             tmpregs[argreg] = iselWordExpr_R(env, arg);
             argreg++;
          } else if (aTy == Ity_I64) {  /* Ity_I64 */
@@ -570,7 +570,7 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
             argreg++;
             tmpregs[argreg] = raHi;
             argreg++;
-         } else if (arg->tag == Iex_BBPTR) {
+         } else if (arg->tag == Iex_GSPTR) {
             tmpregs[argreg] = GuestStatePointer(mode64);
             argreg++;
          }
@@ -607,7 +607,7 @@ static void doHelperCall(/*OUT*/UInt*   stackAdjustAfterCall,
 
    /* Do final checks, set the return values, and generate the call
       instruction proper. */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
    vassert(nVECRETs == (retTy == Ity_V128 || retTy == Ity_V256) ? 1 : 0);
    vassert(*stackAdjustAfterCall == 0);
    vassert(is_RetLoc_INVALID(*retloc));
index d2c4cb15b1ec2529e0859a04f73c45e8bb2809ba..aa35febafa23a259eed446677186758d7d3c5efa 100644 (file)
@@ -736,9 +736,9 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* Marshal args for a call and do the call.
 
@@ -756,7 +756,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       stack, it is enough to preallocate the return space before
       marshalling any arguments, in this case.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the value
+      |args| may also contain IRExpr_GSPTR(), in which case the value
       in the guest state pointer register is passed as the
       corresponding argument.
 
@@ -852,7 +852,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    if (go_fast) {
       for (i = 0; i < n_args; i++) {
          IRExpr* arg = args[i];
-         if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+         if (UNLIKELY(arg->tag == Iex_GSPTR)) {
             /* that's OK */
          } 
          else if (UNLIKELY(arg->tag == Iex_VECRET)) {
@@ -880,7 +880,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
          IRExpr* arg = args[i];
          vassert(argreg < PPC_N_REGPARMS);
 
-         if (arg->tag == Iex_BBPTR) {
+         if (arg->tag == Iex_GSPTR) {
             argiregs |= (1 << (argreg+3));
             addInstr(env, mk_iMOVds_RR( argregs[argreg],
                                         GuestStatePtr(mode64) ));
@@ -954,11 +954,11 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       for (i = 0; i < n_args; i++) {
          IRExpr* arg = args[i];
          vassert(argreg < PPC_N_REGPARMS);
-         if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+         if (UNLIKELY(arg->tag == Iex_GSPTR)) {
             tmpregs[argreg] = newVRegI(env);
             addInstr(env, mk_iMOVds_RR( tmpregs[argreg],
                                         GuestStatePtr(mode64) ));
-            nBBPTRs++;
+            nGSPTRs++;
          }
          else if (UNLIKELY(arg->tag == Iex_VECRET)) {
             /* We stashed the address of the return slot earlier, so just
@@ -1025,7 +1025,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       vassert(nVECRETs == 0);
    }
 
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
 
    vassert(*stackAdjustAfterCall == 0);
    vassert(is_RetLoc_INVALID(*retloc));
index 02f399d0496f48cfcbb0a138c942b21e5d08cbd0..f97b623d7687c802947c5ae71e6ed3e562fbb926 100644 (file)
@@ -527,14 +527,14 @@ doHelperCall(/*OUT*/UInt *stackAdjustAfterCall,
       special node IRExpr_VECRET(). For s390, however, V128 and V256 return
       values do not occur as we generally do not support vector types.
 
-      |args| may also contain IRExpr_BBPTR(), in which case the value
+      |args| may also contain IRExpr_GSPTR(), in which case the value
       in the guest state pointer register is passed as the
       corresponding argument.
 
       These are used for cross-checking that IR-level constraints on
-      the use of IRExpr_VECRET() and IRExpr_BBPTR() are observed. */
+      the use of IRExpr_VECRET() and IRExpr_GSPTR() are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    n_args = 0;
    for (i = 0; args[i]; i++)
@@ -553,8 +553,8 @@ doHelperCall(/*OUT*/UInt *stackAdjustAfterCall,
    for (i = 0; i < n_args; ++i) {
       if (UNLIKELY(args[i]->tag == Iex_VECRET)) {
          nVECRETs++;
-      } else if (UNLIKELY(args[i]->tag == Iex_BBPTR)) {
-         nBBPTRs++;
+      } else if (UNLIKELY(args[i]->tag == Iex_GSPTR)) {
+         nGSPTRs++;
       } else {
          IRType type = typeOfIRExpr(env->type_env, args[i]);
          if (type != Ity_I64) {
@@ -570,7 +570,7 @@ doHelperCall(/*OUT*/UInt *stackAdjustAfterCall,
       vpanic("cannot continue due to errors in argument passing");
 
    /* If these fail, the IR is ill-formed */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
    vassert(nVECRETs == 0);
 
    argreg = 0;
@@ -578,7 +578,7 @@ doHelperCall(/*OUT*/UInt *stackAdjustAfterCall,
    /* Compute the function arguments into a temporary register each */
    for (i = 0; i < n_args; i++) {
       IRExpr *arg = args[i];
-      if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+      if (UNLIKELY(arg->tag == Iex_GSPTR)) {
          /* If we need the guest state pointer put it in a temporary arg reg */
          tmpregs[argreg] = newVRegI(env);
          addInstr(env, s390_insn_move(sizeof(ULong), tmpregs[argreg],
index 0c9ea6514fae9ed38caec4027279e31386e3a269..2ea5321304247a6588d3635e0641f88477b987cf 100644 (file)
@@ -225,7 +225,7 @@ static void doHelperCall ( ISelEnv * env, IRExpr * guard, IRCallee * cee,
 
 
   UInt nVECRETs = 0;
-  UInt nBBPTRs  = 0;
+  UInt nGSPTRs  = 0;
 
   /* TILEGX calling convention: up to 10 registers (r0 ... r9)
      are allowed to be used for passing integer arguments. They correspond
@@ -241,14 +241,14 @@ static void doHelperCall ( ISelEnv * env, IRExpr * guard, IRCallee * cee,
     IRExpr* arg = args[i];
     if (UNLIKELY(arg->tag == Iex_VECRET)) {
       nVECRETs++;
-    } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-      nBBPTRs++;
+    } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+      nGSPTRs++;
     }
   }
 
-  if (nVECRETs || nBBPTRs)
-    vex_printf("nVECRETs=%u, nBBPTRs=%u\n",
-               nVECRETs, nBBPTRs);
+  if (nVECRETs || nGSPTRs)
+    vex_printf("nVECRETs=%u, nGSPTRs=%u\n",
+               nVECRETs, nGSPTRs);
 
   if (TILEGX_N_REGPARMS < n_args) {
     vpanic("doHelperCall(TILEGX): cannot currently handle > 10 args");
index 56171bf7acbe6b98a4ebcb29f6effcbbc495c585..0c9f582d245b335be240f8f7ed4354070115b4b8 100644 (file)
@@ -352,7 +352,7 @@ static Int pushArg ( ISelEnv* env, IRExpr* arg, HReg r_vecRetAddr )
       addInstr(env, X86Instr_Push(X86RMI_Reg(r_vecRetAddr)));
       return 1;
    }
-   if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+   if (UNLIKELY(arg->tag == Iex_GSPTR)) {
       addInstr(env, X86Instr_Push(X86RMI_Reg(hregX86_EBP())));
       return 1;
    }
@@ -402,7 +402,7 @@ void callHelperAndClearArgs ( ISelEnv* env, X86CondCode cc,
 static
 Bool mightRequireFixedRegs ( IRExpr* e )
 {
-   if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(e))) {
+   if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(e))) {
       // These are always "safe" -- either a copy of %esp in some
       // arbitrary vreg, or a copy of %ebp, respectively.
       return False;
@@ -443,9 +443,9 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
    *retloc               = mk_RetLoc_INVALID();
 
    /* These are used for cross-checking that IR-level constraints on
-      the use of Iex_VECRET and Iex_BBPTR are observed. */
+      the use of Iex_VECRET and Iex_GSPTR are observed. */
    UInt nVECRETs = 0;
-   UInt nBBPTRs  = 0;
+   UInt nGSPTRs  = 0;
 
    /* Marshal args for a call, do the call, and clear the stack.
       Complexities to consider:
@@ -458,7 +458,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
         is enough to preallocate the return space before marshalling
         any arguments, in this case.
 
-        |args| may also contain IRExpr_BBPTR(), in which case the
+        |args| may also contain IRExpr_GSPTR(), in which case the
         value in %ebp is passed as the corresponding argument.
 
       * If the callee claims regparmness of 1, 2 or 3, we must pass the
@@ -510,13 +510,13 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
       n_args++;
       if (UNLIKELY(arg->tag == Iex_VECRET)) {
          nVECRETs++;
-      } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-         nBBPTRs++;
+      } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+         nGSPTRs++;
       }
    }
 
    /* If this fails, the IR is ill-formed */
-   vassert(nBBPTRs == 0 || nBBPTRs == 1);
+   vassert(nGSPTRs == 0 || nGSPTRs == 1);
 
    /* If we have a VECRET, allocate space on the stack for the return
       value, and record the stack pointer after that. */
@@ -588,7 +588,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
             if (UNLIKELY(arg->tag == Iex_VECRET)) {
                vassert(0); //ATC
             }
-            else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+            else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
                vassert(0); //ATC
             } else {
                vassert(typeOfIRExpr(env->type_env, arg) == Ity_I32);
@@ -615,7 +615,7 @@ void doHelperCall ( /*OUT*/UInt*   stackAdjustAfterCall,
                                              X86RMI_Reg(r_vecRetAddr),
                                              argregs[argreg]));
             }
-            else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
+            else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
                vassert(0); //ATC
             } else {
                vassert(typeOfIRExpr(env->type_env, arg) == Ity_I32);
index 4940ffeae43a07ffb4ab4938d552e1905aca897d..1c9d52aaef74c3875b677cd414f2ae4e1a7af840 100644 (file)
@@ -1382,8 +1382,8 @@ void ppIRExpr ( const IRExpr* e )
     case Iex_VECRET:
       vex_printf("VECRET");
       break;
-    case Iex_BBPTR:
-      vex_printf("BBPTR");
+    case Iex_GSPTR:
+      vex_printf("GSPTR");
       break;
     default:
       vpanic("ppIRExpr");
@@ -1909,9 +1909,9 @@ IRExpr* IRExpr_VECRET ( void ) {
    e->tag    = Iex_VECRET;
    return e;
 }
-IRExpr* IRExpr_BBPTR ( void ) {
+IRExpr* IRExpr_GSPTR ( void ) {
    IRExpr* e = LibVEX_Alloc_inline(sizeof(IRExpr));
-   e->tag    = Iex_BBPTR;
+   e->tag    = Iex_GSPTR;
    return e;
 }
 
@@ -2386,8 +2386,8 @@ IRExpr* deepCopyIRExpr ( const IRExpr* e )
       case Iex_VECRET:
          return IRExpr_VECRET();
 
-      case Iex_BBPTR:
-         return IRExpr_BBPTR();
+      case Iex_GSPTR:
+         return IRExpr_GSPTR();
 
       case Iex_Binder:
          return IRExpr_Binder(e->Iex.Binder.binder);
@@ -3670,8 +3670,8 @@ IRType typeOfIRExpr ( const IRTypeEnv* tyenv, const IRExpr* e )
          vpanic("typeOfIRExpr: Binder is not a valid expression");
       case Iex_VECRET:
          vpanic("typeOfIRExpr: VECRET is not a valid expression");
-      case Iex_BBPTR:
-         vpanic("typeOfIRExpr: BBPTR is not a valid expression");
+      case Iex_GSPTR:
+         vpanic("typeOfIRExpr: GSPTR is not a valid expression");
       default:
          ppIRExpr(e);
          vpanic("typeOfIRExpr");
@@ -3709,13 +3709,13 @@ Bool isPlausibleIRType ( IRType ty )
    }
 */
 
-static inline Bool isIRAtom_or_VECRET_or_BBPTR ( const IRExpr* e )
+static inline Bool isIRAtom_or_VECRET_or_GSPTR ( const IRExpr* e )
 {
   if (isIRAtom(e)) {
     return True;
   }
 
-  return UNLIKELY(is_IRExpr_VECRET_or_BBPTR(e));
+  return UNLIKELY(is_IRExpr_VECRET_or_GSPTR(e));
 }
 
 Bool isFlatIRStmt ( const IRStmt* st )
@@ -3805,7 +3805,7 @@ Bool isFlatIRStmt ( const IRStmt* st )
          if (!isIRAtom(di->guard)) 
             return False;
          for (i = 0; di->args[i]; i++)
-            if (!isIRAtom_or_VECRET_or_BBPTR(di->args[i])) 
+            if (!isIRAtom_or_VECRET_or_GSPTR(di->args[i])) 
                return False;
          if (di->mAddr && !isIRAtom(di->mAddr)) 
             return False;
@@ -3950,7 +3950,7 @@ void useBeforeDef_Expr ( const IRSB* bb, const IRStmt* stmt,
       case Iex_CCall:
          for (i = 0; expr->Iex.CCall.args[i]; i++) {
             const IRExpr* arg = expr->Iex.CCall.args[i];
-            if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(arg))) {
+            if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(arg))) {
                /* These aren't allowed in CCall lists.  Let's detect
                   and throw them out here, though, rather than
                   segfaulting a bit later on. */
@@ -4032,7 +4032,7 @@ void useBeforeDef_Stmt ( const IRSB* bb, const IRStmt* stmt, Int* def_counts )
          d = stmt->Ist.Dirty.details;
          for (i = 0; d->args[i] != NULL; i++) {
             IRExpr* arg = d->args[i];
-            if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(arg))) {
+            if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(arg))) {
                /* This is ensured by isFlatIRStmt */
               ;
             } else {
@@ -4232,8 +4232,8 @@ void tcExpr ( const IRSB* bb, const IRStmt* stmt, const IRExpr* expr,
             if (i >= 32)
                sanityCheckFail(bb,stmt,"Iex.CCall: > 32 args");
             IRExpr* arg = expr->Iex.CCall.args[i];
-            if (UNLIKELY(is_IRExpr_VECRET_or_BBPTR(arg)))
-               sanityCheckFail(bb,stmt,"Iex.CCall.args: is VECRET/BBPTR");
+            if (UNLIKELY(is_IRExpr_VECRET_or_GSPTR(arg)))
+               sanityCheckFail(bb,stmt,"Iex.CCall.args: is VECRET/GSPTR");
             tcExpr(bb,stmt, arg, gWordTy);
          }
          if (expr->Iex.CCall.retty == Ity_I1)
@@ -4472,21 +4472,21 @@ void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy )
             if (retTy == Ity_I1)
                sanityCheckFail(bb,stmt,"IRStmt.Dirty.dst :: Ity_I1");
          }
-         UInt nVECRETs = 0, nBBPTRs = 0;
+         UInt nVECRETs = 0, nGSPTRs = 0;
          for (i = 0; d->args[i] != NULL; i++) {
             if (i >= 32)
                sanityCheckFail(bb,stmt,"IRStmt.Dirty: > 32 args");
             const IRExpr* arg = d->args[i];
             if (UNLIKELY(arg->tag == Iex_VECRET)) {
                nVECRETs++;
-            } else if (UNLIKELY(arg->tag == Iex_BBPTR)) {
-               nBBPTRs++;
+            } else if (UNLIKELY(arg->tag == Iex_GSPTR)) {
+               nGSPTRs++;
             } else {
                if (typeOfIRExpr(tyenv, arg) == Ity_I1)
                   sanityCheckFail(bb,stmt,"IRStmt.Dirty.arg[i] :: Ity_I1");
             }
-            if (nBBPTRs > 1) {
-               sanityCheckFail(bb,stmt,"IRStmt.Dirty.args: > 1 BBPTR arg");
+            if (nGSPTRs > 1) {
+               sanityCheckFail(bb,stmt,"IRStmt.Dirty.args: > 1 GSPTR arg");
             }
             if (nVECRETs == 1) {
                /* Fn must return V128 or V256. */
@@ -4505,15 +4505,15 @@ void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy )
                                "IRStmt.Dirty.args: > 1 VECRET present");
             }
          }
-         if (nBBPTRs > 1) {
+         if (nGSPTRs > 1) {
             sanityCheckFail(bb,stmt,
-                            "IRStmt.Dirty.args: > 1 BBPTR present");
+                            "IRStmt.Dirty.args: > 1 GSPTR present");
          }
          /* If you ask for the baseblock pointer, you have to make
             some declaration about access to the guest state too. */
-         if (d->nFxState == 0 && nBBPTRs != 0) {
+         if (d->nFxState == 0 && nGSPTRs != 0) {
             sanityCheckFail(bb,stmt,
-                            "IRStmt.Dirty.args: BBPTR requested, "
+                            "IRStmt.Dirty.args: GSPTR requested, "
                             "but no fxState declared");
          }
         break;
index 4266823f18888c3a4dafebe41145377bc70ddaa8..914dbffca68dde7dac7170bff5cdc1ab8221d242 100644 (file)
@@ -488,7 +488,7 @@ static void flatten_Stmt ( IRSB* bb, IRStmt* st )
          d2->guard = flatten_Expr(bb, d2->guard);
          for (i = 0; d2->args[i]; i++) {
             IRExpr* arg = d2->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                d2->args[i] = flatten_Expr(bb, arg);
          }
          addStmtToIRSB(bb, IRStmt_Dirty(d2));
@@ -2702,7 +2702,7 @@ static IRStmt* subst_and_fold_Stmt ( IRExpr** env, IRStmt* st )
          d2->guard = fold_Expr(env, subst_Expr(env, d2->guard));
          for (i = 0; d2->args[i]; i++) {
             IRExpr* arg = d2->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg))) {
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg))) {
                vassert(isIRAtom(arg));
                d2->args[i] = fold_Expr(env, subst_Expr(env, arg));
             }
@@ -3045,7 +3045,7 @@ static void addUses_Stmt ( Bool* set, IRStmt* st )
          addUses_Expr(set, d->guard);
          for (i = 0; d->args[i] != NULL; i++) {
             IRExpr* arg = d->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                addUses_Expr(set, arg);
          }
          return;
@@ -4670,7 +4670,7 @@ static void deltaIRStmt ( IRStmt* st, Int delta )
          deltaIRExpr(d->guard, delta);
          for (i = 0; d->args[i]; i++) {
             IRExpr* arg = d->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                deltaIRExpr(arg, delta);
          }
          if (d->tmp != IRTemp_INVALID)
@@ -5207,7 +5207,7 @@ static void aoccCount_Stmt ( UShort* uses, IRStmt* st )
          aoccCount_Expr(uses, d->guard);
          for (i = 0; d->args[i]; i++) {
             IRExpr* arg = d->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                aoccCount_Expr(uses, arg);
          }
          return;
@@ -5598,7 +5598,7 @@ static IRStmt* atbSubst_Stmt ( ATmpInfo* env, IRStmt* st )
          d2->guard = atbSubst_Expr(env, d2->guard);
          for (i = 0; d2->args[i]; i++) {
             IRExpr* arg = d2->args[i];
-            if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+            if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                d2->args[i] = atbSubst_Expr(env, arg);
          }
          return IRStmt_Dirty(d2);
@@ -5629,7 +5629,7 @@ static Interval dirty_helper_puts (
       guest state under the covers.  It's not allowed, but let's be
       extra conservative and assume the worst. */
    for (i = 0; d->args[i]; i++) {
-      if (UNLIKELY(d->args[i]->tag == Iex_BBPTR)) {
+      if (UNLIKELY(d->args[i]->tag == Iex_GSPTR)) {
          *requiresPreciseMemExns = True;
          /* Assume all guest state is written. */
          interval.present = True;
@@ -6328,7 +6328,7 @@ static Bool do_XOR_TRANSFORM_IRSB ( IRSB* sb )
             vassert(isIRAtom(d->guard));
             for (Int j = 0; d->args[j]; j++) {
                IRExpr* arg = d->args[j];
-               if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg))) {
+               if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg))) {
                   vassert(isIRAtom(arg));
                }
             }
@@ -6537,7 +6537,7 @@ static void considerExpensives ( /*OUT*/Bool* hasGetIorPutI,
             vassert(isIRAtom(d->guard));
             for (j = 0; d->args[j]; j++) {
                IRExpr* arg = d->args[j];
-               if (LIKELY(!is_IRExpr_VECRET_or_BBPTR(arg)))
+               if (LIKELY(!is_IRExpr_VECRET_or_GSPTR(arg)))
                   vassert(isIRAtom(arg));
             }
             if (d->mFx != Ifx_None)
index 5efcd5c959652a6634259393452a8964b6c3c4d8..a88a9599bb1aa109cc4b18f9397855bb5ca9dae3 100644 (file)
@@ -1957,7 +1957,7 @@ typedef
       Iex_ITE,
       Iex_CCall,
       Iex_VECRET,
-      Iex_BBPTR
+      Iex_GSPTR
    }
    IRExprTag;
 
@@ -2132,7 +2132,7 @@ struct _IRExpr {
          quite poor code to be generated.  Try to avoid it.
 
          In principle it would be allowable to have the arg vector
-         contain an IRExpr_VECRET(), although not IRExpr_BBPTR(). However,
+         contain an IRExpr_VECRET(), although not IRExpr_GSPTR(). However,
          at the moment there is no requirement for clean helper calls to
          be able to return V128 or V256 values.  Hence this is not allowed.
 
@@ -2196,8 +2196,8 @@ struct _IRQop {
    only appear at most once in an argument list, and it may not appear
    at all in argument lists for clean helper calls. */
 
-static inline Bool is_IRExpr_VECRET_or_BBPTR ( const IRExpr* e ) {
-   return e->tag == Iex_VECRET || e->tag == Iex_BBPTR;
+static inline Bool is_IRExpr_VECRET_or_GSPTR ( const IRExpr* e ) {
+   return e->tag == Iex_VECRET || e->tag == Iex_GSPTR;
 }
 
 
@@ -2217,7 +2217,7 @@ extern IRExpr* IRExpr_Const  ( IRConst* con );
 extern IRExpr* IRExpr_CCall  ( IRCallee* cee, IRType retty, IRExpr** args );
 extern IRExpr* IRExpr_ITE    ( IRExpr* cond, IRExpr* iftrue, IRExpr* iffalse );
 extern IRExpr* IRExpr_VECRET ( void );
-extern IRExpr* IRExpr_BBPTR  ( void );
+extern IRExpr* IRExpr_GSPTR  ( void );
 
 /* Deep-copy an IRExpr. */
 extern IRExpr* deepCopyIRExpr ( const IRExpr* );
@@ -2376,10 +2376,10 @@ extern void ppIRJumpKind ( IRJumpKind );
      number of times at a fixed interval, if required.
 
    Normally, code is generated to pass just the args to the helper.
-   However, if IRExpr_BBPTR() is present in the argument list (at most
-   one instance is allowed), then the baseblock pointer is passed for
+   However, if IRExpr_GSPTR() is present in the argument list (at most
+   one instance is allowed), then the guest state pointer is passed for
    that arg, so that the callee can access the guest state.  It is
-   invalid for .nFxState to be zero but IRExpr_BBPTR() to be present,
+   invalid for .nFxState to be zero but IRExpr_GSPTR() to be present,
    since .nFxState==0 is a claim that the call does not access guest
    state.
 
@@ -2416,7 +2416,7 @@ typedef
          allowed. */
       IRCallee* cee;    /* where to call */
       IRExpr*   guard;  /* :: Ity_Bit.  Controls whether call happens */
-      /* The args vector may contain IRExpr_BBPTR() and/or
+      /* The args vector may contain IRExpr_GSPTR() and/or
          IRExpr_VECRET(), in both cases, at most once. */
       IRExpr**  args;   /* arg vector, ends in NULL. */
       IRTemp    tmp;    /* to assign result to, or IRTemp_INVALID if none */