]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Change the IMark statement. The address is now type Addr and the
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 2 Jan 2015 17:32:21 +0000 (17:32 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 2 Jan 2015 17:32:21 +0000 (17:32 +0000)
length is unsigned.

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

19 files changed:
VEX/priv/host_amd64_defs.h
VEX/priv/host_amd64_isel.c
VEX/priv/host_arm64_defs.h
VEX/priv/host_arm64_isel.c
VEX/priv/host_arm_defs.h
VEX/priv/host_arm_isel.c
VEX/priv/host_mips_defs.h
VEX/priv/host_mips_isel.c
VEX/priv/host_ppc_defs.h
VEX/priv/host_ppc_isel.c
VEX/priv/host_s390_defs.h
VEX/priv/host_s390_isel.c
VEX/priv/host_x86_defs.h
VEX/priv/host_x86_isel.c
VEX/priv/ir_defs.c
VEX/priv/ir_opt.c
VEX/priv/ir_opt.h
VEX/priv/main_main.c
VEX/pub/libvex_ir.h

index 89332c6dabbef5cffb4c5f41b7c6a6eda682a4db..73caf5cf3c8627f3f300e73267bc4ac380700dbc 100644 (file)
@@ -777,7 +777,7 @@ extern HInstrArray* iselSB_AMD64           ( const IRSB*,
                                              Int offs_Host_EvC_FailAddr,
                                              Bool chainingAllowed,
                                              Bool addProfInc,
-                                             Addr64 max_ga );
+                                             Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and host_EvC_COUNTER,
index 4ccea9fdc28f92d2a73df573864bfb129b9093a6..f95ae283cb6d8eaa040a6ee83de8917bbc018ac5 100644 (file)
@@ -4858,7 +4858,7 @@ HInstrArray* iselSB_AMD64 ( const IRSB* bb,
                             Int offs_Host_EvC_FailAddr,
                             Bool chainingAllowed,
                             Bool addProfInc,
-                            Addr64 max_ga )
+                            Addr max_ga )
 {
    Int        i, j;
    HReg       hreg, hregHI;
index 319fde50af83876afa96ad8ad2dc2860e87ae6d6..5905df6fcd696810f87f0df8f8e348a6f29bd618 100644 (file)
@@ -957,7 +957,7 @@ extern HInstrArray* iselSB_ARM64 ( const IRSB*,
                                    Int offs_Host_EvC_FailAddr,
                                    Bool chainingAllowed,
                                    Bool addProfInc,
-                                   Addr64 max_ga );
+                                   Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
index 06ba67240fd2854cba801ba02a63230a28a8c817..87cc6de4c93a91cda5925e263450afbcc96759bf 100644 (file)
@@ -3872,7 +3872,7 @@ HInstrArray* iselSB_ARM64 ( const IRSB* bb,
                             Int offs_Host_EvC_FailAddr,
                             Bool chainingAllowed,
                             Bool addProfInc,
-                            Addr64 max_ga )
+                            Addr max_ga )
 {
    Int        i, j;
    HReg       hreg, hregHI;
index 6d1a01634284435152522bd2902ce4cb69cb312b..384e4f5e3640dfd2b7f13ce6238ad0455b152c23 100644 (file)
@@ -1047,7 +1047,7 @@ extern HInstrArray* iselSB_ARM   ( const IRSB*,
                                    Int offs_Host_EvC_FailAddr,
                                    Bool chainingAllowed,
                                    Bool addProfInc,
-                                   Addr64 max_ga );
+                                   Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
index 1a3ff07995e304f84e23fd41e215be459b76da52..11a726a6757384126c493a61ed02ccebc9bc4c50 100644 (file)
@@ -118,7 +118,7 @@ typedef
       UInt         hwcaps;
 
       Bool         chainingAllowed;
-      Addr64       max_ga;
+      Addr32       max_ga;
 
       /* These are modified as we go along. */
       HInstrArray* code;
@@ -6172,7 +6172,7 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt )
             /* Skip the event check at the dst if this is a forwards
                edge. */
             Bool toFastEP
-               = ((Addr32)stmt->Ist.Exit.dst->Ico.U32) > env->max_ga;
+               = stmt->Ist.Exit.dst->Ico.U32 > env->max_ga;
             if (0) vex_printf("%s", toFastEP ? "Y" : ",");
             addInstr(env, ARMInstr_XDirect(stmt->Ist.Exit.dst->Ico.U32,
                                            amR15T, cc, toFastEP));
@@ -6244,7 +6244,7 @@ static void iselNext ( ISelEnv* env,
             /* Skip the event check at the dst if this is a forwards
                edge. */
             Bool toFastEP
-               = ((Addr64)cdst->Ico.U32) > env->max_ga;
+               = cdst->Ico.U32 > env->max_ga;
             if (0) vex_printf("%s", toFastEP ? "X" : ".");
             addInstr(env, ARMInstr_XDirect(cdst->Ico.U32,
                                            amR15T, ARMcc_AL, 
@@ -6320,7 +6320,7 @@ HInstrArray* iselSB_ARM ( const IRSB* bb,
                           Int offs_Host_EvC_FailAddr,
                           Bool chainingAllowed,
                           Bool addProfInc,
-                          Addr64 max_ga )
+                          Addr max_ga )
 {
    Int       i, j;
    HReg      hreg, hregHI;
index 9d67dee5350ee82bc7f00d3837a850e2f2d64515..1e0abc8c3ae5f7a327b2ce7d9aa3a376e93fa0ca 100644 (file)
@@ -735,7 +735,7 @@ extern HInstrArray *iselSB_MIPS          ( const IRSB*,
                                            Int offs_Host_EvC_FailAddr,
                                            Bool chainingAllowed,
                                            Bool addProfInc,
-                                           Addr64 max_ga );
+                                           Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and host_EvC_COUNTER,
index ac8e6f9601b9c4ab4f03ebfd7321754fe4c717a2..3df7d9bb767a61fd583119931bf6de38143f63f5 100644 (file)
@@ -4160,7 +4160,7 @@ HInstrArray *iselSB_MIPS ( const IRSB* bb,
                            Int offs_Host_EvC_FailAddr,
                            Bool chainingAllowed,
                            Bool addProfInc,
-                           Addr64 max_ga )
+                           Addr max_ga )
 {
    Int      i, j;
    HReg     hreg, hregHI;
index 565534f802446864060a2fce10542ac75ee18401..a9a9e23f673432225ee1bb31b581dad9c8ceeb0e 100644 (file)
@@ -1165,7 +1165,7 @@ extern HInstrArray* iselSB_PPC           ( const IRSB*,
                                            Int offs_Host_EvC_FailAddr,
                                            Bool chainingAllowed,
                                            Bool addProfInc,
-                                           Addr64 max_ga );
+                                           Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
index 3c99a5bc1ef28ffdc1b8d011a3fa637f9b84d382..71c7b79b58dfa40014520b81cde87b30acd1ab57 100644 (file)
@@ -6101,7 +6101,7 @@ HInstrArray* iselSB_PPC ( const IRSB* bb,
                           Int offs_Host_EvC_FailAddr,
                           Bool chainingAllowed,
                           Bool addProfInc,
-                          Addr64 max_ga)
+                          Addr max_ga)
 
 {
    Int       i, j;
@@ -6115,7 +6115,6 @@ HInstrArray* iselSB_PPC ( const IRSB* bb,
 
    vassert(arch_host == VexArchPPC32 || arch_host == VexArchPPC64);
    mode64 = arch_host == VexArchPPC64;
-   if (!mode64) vassert(max_ga <= 0xFFFFFFFFULL);
 
    /* do some sanity checks */
    mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V
index f5385ca2237b573fb6da3c9490ef525c158eba1a..c91ac5e1c2d1da3f73e593dc93138cb4e402eb5d 100644 (file)
@@ -742,7 +742,7 @@ void  getAllocableRegs_S390( Int *, HReg **, Bool );
 void  genSpill_S390        ( HInstr **, HInstr **, HReg , Int , Bool );
 void  genReload_S390       ( HInstr **, HInstr **, HReg , Int , Bool );
 HInstrArray *iselSB_S390   ( const IRSB *, VexArch, const VexArchInfo *,
-                             const VexAbiInfo *, Int, Int, Bool, Bool, Addr64);
+                             const VexAbiInfo *, Int, Int, Bool, Bool, Addr);
 
 /* Return the number of bytes of code needed for an event check */
 Int evCheckSzB_S390(VexEndness endness_host);
index 9990ab1668c10ae29473e9f53e08a3237b2dff2a..7204eeb1dc00857c8ffd8b418a8895d47f398045 100644 (file)
@@ -4051,7 +4051,7 @@ HInstrArray *
 iselSB_S390(const IRSB *bb, VexArch arch_host, const VexArchInfo *archinfo_host,
             const VexAbiInfo *vbi, Int offset_host_evcheck_counter,
             Int offset_host_evcheck_fail_addr, Bool chaining_allowed,
-            Bool add_profinc, Addr64 max_ga)
+            Bool add_profinc, Addr max_ga)
 {
    UInt     i, j;
    HReg     hreg, hregHI;
index c679bbe45883bc54cc7a17a17dba9862af710fab..2d3341e24b8c085a03ac5ce9bccc4725648dcd15 100644 (file)
@@ -739,7 +739,7 @@ extern HInstrArray* iselSB_X86           ( const IRSB*,
                                            Int offs_Host_EvC_FailAddr,
                                            Bool chainingAllowed,
                                            Bool addProfInc,
-                                           Addr64 max_ga );
+                                           Addr max_ga );
 
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and host_EvC_COUNTER,
index 900afd1e633620b0d0657b2eed89f2a4c4bbad65..3711c9c1323ba523792236e28311773f507e0074 100644 (file)
@@ -181,7 +181,7 @@ typedef
       UInt         hwcaps;
 
       Bool         chainingAllowed;
-      Addr64       max_ga;
+      Addr32       max_ga;
 
       /* These are modified as we go along. */
       HInstrArray* code;
@@ -4333,7 +4333,7 @@ static void iselNext ( ISelEnv* env,
             /* Skip the event check at the dst if this is a forwards
                edge. */
             Bool toFastEP
-               = ((Addr64)cdst->Ico.U32) > env->max_ga;
+               = ((Addr32)cdst->Ico.U32) > env->max_ga;
             if (0) vex_printf("%s", toFastEP ? "X" : ".");
             addInstr(env, X86Instr_XDirect(cdst->Ico.U32,
                                            amEIP, Xcc_ALWAYS, 
@@ -4417,7 +4417,7 @@ HInstrArray* iselSB_X86 ( const IRSB* bb,
                           Int offs_Host_EvC_FailAddr,
                           Bool chainingAllowed,
                           Bool addProfInc,
-                          Addr64 max_ga )
+                          Addr max_ga )
 {
    Int      i, j;
    HReg     hreg, hregHI;
@@ -4433,8 +4433,6 @@ HInstrArray* iselSB_X86 ( const IRSB* bb,
                      | VEX_HWCAPS_X86_SSE2
                      | VEX_HWCAPS_X86_SSE3
                      | VEX_HWCAPS_X86_LZCNT)));
-   vassert(sizeof(max_ga) == 8);
-   vassert((max_ga >> 32) == 0);
 
    /* Check that the host's endianness is as expected. */
    vassert(archinfo_host->endness == VexEndnessLE);
index dc339552e24f3dccd056d6ded002449c681d9bd1..9dbe2acab3872012f5a0c7400ac76b9a4d4fc35f 100644 (file)
@@ -1532,7 +1532,7 @@ void ppIRStmt ( const IRStmt* s )
          vex_printf("IR-NoOp");
          break;
       case Ist_IMark:
-         vex_printf( "------ IMark(0x%llx, %d, %u) ------", 
+         vex_printf( "------ IMark(0x%lx, %u, %u) ------", 
                      s->Ist.IMark.addr, s->Ist.IMark.len,
                      (UInt)s->Ist.IMark.delta);
          break;
@@ -2053,7 +2053,7 @@ IRStmt* IRStmt_NoOp ( void )
    static_closure.tag = Ist_NoOp;
    return &static_closure;
 }
-IRStmt* IRStmt_IMark ( Addr64 addr, Int len, UChar delta ) {
+IRStmt* IRStmt_IMark ( Addr addr, UInt len, UChar delta ) {
    IRStmt* s          = LibVEX_Alloc(sizeof(IRStmt));
    s->tag             = Ist_IMark;
    s->Ist.IMark.addr  = addr;
@@ -4149,7 +4149,7 @@ void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy )
       case Ist_IMark:
          /* Somewhat heuristic, but rule out totally implausible
             instruction sizes and deltas. */
-         if (stmt->Ist.IMark.len < 0 || stmt->Ist.IMark.len > 20)
+         if (stmt->Ist.IMark.len > 20)
             sanityCheckFail(bb,stmt,"IRStmt.IMark.len: implausible");
          if (stmt->Ist.IMark.delta > 1)
             sanityCheckFail(bb,stmt,"IRStmt.IMark.delta: implausible");
index d2ba8fd7c898fc996359c40176af31da3c53ac6d..86bd6464bd8f60ff24dec44c597c62041762c811 100644 (file)
@@ -5619,8 +5619,8 @@ static Interval stmt_modifies_guest_state ( IRSB *bb, const IRStmt *st,
    }
 }
 
-/* notstatic */ Addr64 ado_treebuild_BB ( IRSB* bb,
-                                          Bool (*preciseMemExnsFn)(Int,Int) )
+/* notstatic */ Addr ado_treebuild_BB ( IRSB* bb,
+                                        Bool (*preciseMemExnsFn)(Int,Int) )
 {
    Int      i, j, k, m;
    Bool     stmtStores, invalidateMe;
@@ -5630,7 +5630,7 @@ static Interval stmt_modifies_guest_state ( IRSB *bb, const IRStmt *st,
    ATmpInfo env[A_NENV];
 
    Bool   max_ga_known = False;
-   Addr64 max_ga       = 0;
+   Addr   max_ga       = 0;
 
    Int       n_tmps = bb->tyenv->types_used;
    UShort*   uses   = LibVEX_Alloc(n_tmps * sizeof(UShort));
@@ -5650,8 +5650,8 @@ static Interval stmt_modifies_guest_state ( IRSB *bb, const IRStmt *st,
          case Ist_NoOp:
             continue;
          case Ist_IMark: {
-            Int    len = st->Ist.IMark.len;
-            Addr64 mga = st->Ist.IMark.addr + (len < 1 ? 1 : len) - 1;
+            UInt len = st->Ist.IMark.len;
+            Addr mga = st->Ist.IMark.addr + (len < 1 ? 1 : len) - 1;
             max_ga_known = True;
             if (mga > max_ga)
                max_ga = mga;
@@ -5839,7 +5839,7 @@ static Interval stmt_modifies_guest_state ( IRSB *bb, const IRStmt *st,
    bb->next = atbSubst_Expr(env, bb->next);
    bb->stmts_used = j;
 
-   return max_ga_known ? max_ga : ~(Addr64)0;
+   return max_ga_known ? max_ga : ~(Addr)0;
 }
 
 
index c797b7140d83d31625da59c16988ff582096e459..07cee63b61f7aab6d02827761466a84a8a5b9e82 100644 (file)
@@ -64,7 +64,7 @@ void do_deadcode_BB ( IRSB* bb );
    the guest address of the highest addressed byte from any insn in
    this block, or Addr64_MAX if unknown (can that ever happen?) */
 extern
-Addr64 ado_treebuild_BB ( IRSB* bb, Bool (*preciseMemExnsFn)(Int,Int) );
+Addr ado_treebuild_BB ( IRSB* bb, Bool (*preciseMemExnsFn)(Int,Int) );
 
 #endif /* ndef __VEX_IR_OPT_H */
 
index 08ee31eab484765b41687d43c13f07236c17c533..f9adfaa40945a5abd8a1cf603607b08258c5f398 100644 (file)
@@ -223,7 +223,7 @@ VexTranslateResult LibVEX_Translate ( VexTranslateArgs* vta )
    void         (*ppReg)        ( HReg );
    HInstrArray* (*iselSB)       ( const IRSB*, VexArch, const VexArchInfo*,
                                   const VexAbiInfo*, Int, Int, Bool, Bool,
-                                  Addr64 );
+                                  Addr );
    Int          (*emit)         ( /*MB_MOD*/Bool*,
                                   UChar*, Int, const HInstr*, Bool, VexEndness,
                                   const void*, const void*, const void*,
@@ -244,7 +244,7 @@ VexTranslateResult LibVEX_Translate ( VexTranslateArgs* vta )
    IRType          guest_word_type;
    IRType          host_word_type;
    Bool            mode64, chainingAllowed;
-   Addr64          max_ga;
+   Addr            max_ga;
 
    guest_layout           = NULL;
    available_real_regs    = NULL;
index 82771768a6ed259c3203024375d2f4596d86084a..3c998d04cc4bcde086120690551ebb4786e387bf 100644 (file)
@@ -2675,8 +2675,8 @@ typedef
                          eg. ------ IMark(0x4000792, 5, 0) ------,
          */
          struct {
-            Addr64 addr;   /* instruction address */
-            Int    len;    /* instruction length */
+            Addr   addr;   /* instruction address */
+            UInt   len;    /* instruction length */
             UChar  delta;  /* addr = program counter as encoded in guest state
                                      - delta */
          } IMark;
@@ -2874,7 +2874,7 @@ typedef
 
 /* Statement constructors. */
 extern IRStmt* IRStmt_NoOp    ( void );
-extern IRStmt* IRStmt_IMark   ( Addr64 addr, Int len, UChar delta );
+extern IRStmt* IRStmt_IMark   ( Addr addr, UInt len, UChar delta );
 extern IRStmt* IRStmt_AbiHint ( IRExpr* base, Int len, IRExpr* nia );
 extern IRStmt* IRStmt_Put     ( Int off, IRExpr* data );
 extern IRStmt* IRStmt_PutI    ( IRPutI* details );