]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove the type AddrH. The code assumes in many places that the host
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 29 Dec 2014 17:04:46 +0000 (17:04 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 29 Dec 2014 17:04:46 +0000 (17:04 +0000)
and guest architecture are the same. So the type is really pointless
nowadays.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14834

coregrind/m_aspacemgr/aspacemgr-common.c
coregrind/m_mallocfree.c
coregrind/m_scheduler/scheduler.c
coregrind/m_transtab.c
coregrind/pub_core_transtab.h
include/pub_tool_basics.h

index 2c099a9a23018bb9e62db62fd6991920fac0ddd3..ed663cd01eaeb608eb2655c5b9204c2f4bc21b0f 100644 (file)
@@ -376,7 +376,7 @@ VgStack* VG_(am_alloc_VgStack)( /*OUT*/Addr* initial_sp )
    if (sr_isError(sres))
       return NULL;
 
-   stack = (VgStack*)(AddrH)sr_Res(sres);
+   stack = (VgStack*)(Addr)sr_Res(sres);
 
    aspacem_assert(VG_IS_PAGE_ALIGNED(szB));
    aspacem_assert(VG_IS_PAGE_ALIGNED(stack));
index 7349849f1e28353141251d825b8a00fa47bdd2eb..a5b931798dc7c4625d0cc375675335f7ea04283d 100644 (file)
@@ -857,7 +857,7 @@ Superblock* newSuperblock ( Arena* a, SizeT cszB )
          ( cszB, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC );
       if (sr_isError(sres))
          return 0;
-      sb = (Superblock*)(AddrH)sr_Res(sres);
+      sb = (Superblock*)(Addr)sr_Res(sres);
       // Mark this segment as containing client heap.  The leak
       // checker needs to be able to identify such segments so as not
       // to use them as sources of roots during leak checks.
@@ -870,7 +870,7 @@ Superblock* newSuperblock ( Arena* a, SizeT cszB )
          /* NOTREACHED */
          sb = NULL; /* keep gcc happy */
       } else {
-         sb = (Superblock*)(AddrH)sr_Res(sres);
+         sb = (Superblock*)(Addr)sr_Res(sres);
       }
    }
    vg_assert(NULL != sb);
@@ -1763,7 +1763,7 @@ void* VG_(arena_malloc) ( ArenaId aid, const HChar* cc, SizeT req_pszB )
                                                    a->sblocks_size * 2);
          /* NOTREACHED */
       }
-      array = (Superblock**)(AddrH)sr_Res(sres);
+      array = (Superblock**)(Addr)sr_Res(sres);
       for (i = 0; i < a->sblocks_used; ++i) array[i] = a->sblocks[i];
 
       a->sblocks_size *= 2;
index 78369b3a7fd294bf34d92dff00d1975abd7fdcdc..a424be61f51fef80a14a53f1a451c9443498a479 100644 (file)
@@ -876,7 +876,7 @@ void run_thread_for_a_while ( /*OUT*/HWord* two_words,
       if (LIKELY(VG_(tt_fast)[cno].guest == (Addr)tst->arch.vex.VG_INSTR_PTR))
          host_code_addr = VG_(tt_fast)[cno].host;
       else {
-         AddrH res   = 0;
+         Addr res = 0;
          /* not found in VG_(tt_fast). Searching here the transtab
             improves the performance compared to returning directly
             to the scheduler. */
@@ -1128,7 +1128,7 @@ void handle_noredir_jump ( /*OUT*/HWord* two_words,
    /* Clear return area. */
    two_words[0] = two_words[1] = 0;
 
-   AddrH hcode = 0;
+   Addr  hcode = 0;
    Addr  ip    = VG_(get_IP)(tid);
 
    Bool  found = VG_(search_unredir_transtab)( &hcode, ip );
index e9cfd0260ff8f2ee45d2bfcd2899f435aab2d91d..8477b48eba46a53a0c2b11e1b3ce115446c54dc6 100644 (file)
@@ -1389,7 +1389,7 @@ static void initialiseSector ( Int sno )
                                      8 * tc_sector_szQ );
         /*NOTREACHED*/
       }
-      sec->tc = (ULong*)(AddrH)sr_Res(sres);
+      sec->tc = (ULong*)(Addr)sr_Res(sres);
 
       sres = VG_(am_mmap_anon_float_valgrind)
                 ( N_TTES_PER_SECTOR * sizeof(TTEntry) );
@@ -1398,7 +1398,7 @@ static void initialiseSector ( Int sno )
                                      N_TTES_PER_SECTOR * sizeof(TTEntry) );
         /*NOTREACHED*/
       }
-      sec->tt = (TTEntry*)(AddrH)sr_Res(sres);
+      sec->tt = (TTEntry*)(Addr)sr_Res(sres);
 
       for (i = 0; i < N_TTES_PER_SECTOR; i++) {
          sec->tt[i].status   = Empty;
@@ -1514,7 +1514,7 @@ static void initialiseSector ( Int sno )
 */
 void VG_(add_to_transtab)( const VexGuestExtents* vge,
                            Addr64           entry,
-                           AddrH            code,
+                           Addr             code,
                            UInt             code_len,
                            Bool             is_self_checking,
                            Int              offs_profInc,
@@ -1682,7 +1682,7 @@ void VG_(add_to_transtab)( const VexGuestExtents* vge,
    requested, a successful search can also cause the fast-caches to be
    updated.  
 */
-Bool VG_(search_transtab) ( /*OUT*/AddrH* res_hcode,
+Bool VG_(search_transtab) ( /*OUT*/Addr res_hcode,
                             /*OUT*/UInt*  res_sNo,
                             /*OUT*/UInt*  res_tteNo,
                             Addr64        guest_addr, 
@@ -1716,7 +1716,7 @@ Bool VG_(search_transtab) ( /*OUT*/AddrH* res_hcode,
                setFastCacheEntry( 
                   guest_addr, sectors[sno].tt[k].tcptr );
             if (res_hcode)
-               *res_hcode = (AddrH)sectors[sno].tt[k].tcptr;
+               *res_hcode = (Addr)sectors[sno].tt[k].tcptr;
             if (res_sNo)
                *res_sNo = sno;
             if (res_tteNo)
@@ -2076,7 +2076,7 @@ static void init_unredir_tt_tc ( void )
                                      N_UNREDIR_TT * UNREDIR_SZB);
          /*NOTREACHED*/
       }
-      unredir_tc = (ULong *)(AddrH)sr_Res(sres);
+      unredir_tc = (ULong *)(Addr)sr_Res(sres);
    }
    unredir_tc_used = 0;
    for (i = 0; i < N_UNREDIR_TT; i++)
@@ -2107,7 +2107,7 @@ static Bool sanity_check_redir_tt_tc ( void )
 */
 void VG_(add_to_unredir_transtab)( const VexGuestExtents* vge,
                                    Addr64           entry,
-                                   AddrH            code,
+                                   Addr             code,
                                    UInt             code_len )
 {
    Int   i, j, code_szQ;
@@ -2160,7 +2160,7 @@ void VG_(add_to_unredir_transtab)( const VexGuestExtents* vge,
    vg_assert(&dstP[code_len] <= (HChar*)&unredir_tc[unredir_tc_used]);
 }
 
-Bool VG_(search_unredir_transtab) ( /*OUT*/AddrH* result,
+Bool VG_(search_unredir_transtab) ( /*OUT*/Addr result,
                                     Addr64        guest_addr )
 {
    Int i;
@@ -2168,7 +2168,7 @@ Bool VG_(search_unredir_transtab) ( /*OUT*/AddrH* result,
       if (!unredir_tt[i].inUse)
          continue;
       if (unredir_tt[i].vge.base[0] == guest_addr) {
-         *result = (AddrH)unredir_tt[i].hcode;
+         *result = (Addr)unredir_tt[i].hcode;
          return True;
       }
    }
index 2c91cfabd4af0723e140e166bf55de32da1115ae..d0798811250fd1ea05fa161f38b0aa5aba2f77df 100644 (file)
@@ -83,7 +83,7 @@ extern void VG_(init_tt_tc)       ( void );
 extern
 void VG_(add_to_transtab)( const VexGuestExtents* vge,
                            Addr64           entry,
-                           AddrH            code,
+                           Addr             code,
                            UInt             code_len,
                            Bool             is_self_checking,
                            Int              offs_profInc,
@@ -95,7 +95,7 @@ void VG_(tt_tc_do_chaining) ( void* from__patch_addr,
                               UInt  to_tteNo,
                               Bool  to_fastEP );
 
-extern Bool VG_(search_transtab) ( /*OUT*/AddrH* res_hcode,
+extern Bool VG_(search_transtab) ( /*OUT*/Addr res_hcode,
                                    /*OUT*/UInt*  res_sNo,
                                    /*OUT*/UInt*  res_tteNo,
                                    Addr64        guest_addr, 
@@ -114,10 +114,10 @@ extern UInt VG_(get_bbs_translated) ( void );
 extern
 void VG_(add_to_unredir_transtab)( const VexGuestExtents* vge,
                                    Addr64           entry,
-                                   AddrH            code,
+                                   Addr             code,
                                    UInt             code_len );
 extern 
-Bool VG_(search_unredir_transtab) ( /*OUT*/AddrH* result,
+Bool VG_(search_unredir_transtab) ( /*OUT*/Addr result,
                                     Addr64        guest_addr );
 
 // SB profiling stuff
index acc766b16170621cb74dc68e32ab5e499da24a93..1bbabadf00daa5b49a7365a2e074fa84db75827d 100644 (file)
 typedef unsigned long          UWord;     // 32             64
 typedef   signed long           Word;     // 32             64
 
-// Addr is for holding an address.  AddrH was intended to be "Addr on the
-// host", for the notional case where host word size != guest word size.
-// But since the assumption that host arch == guest arch has become so
-// deeply wired in, it's a pretty pointless distinction now.
+// Addr is for holding an address.
 typedef UWord                  Addr;      // 32             64
-typedef UWord                  AddrH;     // 32             64
 
 // Our equivalents of POSIX 'size_t' and 'ssize_t':
 // - size_t is an "unsigned integer type of the result of the sizeof operator".