Author: florian
Date: Mon Dec 29 17:04:46 2014
New Revision: 14834
Log:
Remove the type AddrH. The code assumes in many places that the host
and guest architecture are the same. So the type is really pointless
nowadays.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
trunk/coregrind/m_mallocfree.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_transtab.c
trunk/coregrind/pub_core_transtab.h
trunk/include/pub_tool_basics.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-common.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c Mon Dec 29 17:04:46 2014
@@ -376,7 +376,7 @@
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));
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Mon Dec 29 17:04:46 2014
@@ -857,7 +857,7 @@
( 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 @@
/* 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 @@
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;
Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Mon Dec 29 17:04:46 2014
@@ -876,7 +876,7 @@
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 @@
/* 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 );
Modified: trunk/coregrind/m_transtab.c
==============================================================================
--- trunk/coregrind/m_transtab.c (original)
+++ trunk/coregrind/m_transtab.c Mon Dec 29 17:04:46 2014
@@ -1389,7 +1389,7 @@
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 @@
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 @@
*/
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 @@
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 @@
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 @@
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 @@
*/
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 @@
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 @@
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;
}
}
Modified: trunk/coregrind/pub_core_transtab.h
==============================================================================
--- trunk/coregrind/pub_core_transtab.h (original)
+++ trunk/coregrind/pub_core_transtab.h Mon Dec 29 17:04:46 2014
@@ -83,7 +83,7 @@
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 @@
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
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
Modified: trunk/include/pub_tool_basics.h
==============================================================================
--- trunk/include/pub_tool_basics.h (original)
+++ trunk/include/pub_tool_basics.h Mon Dec 29 17:04:46 2014
@@ -86,12 +86,8 @@
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".
|