|
From: <sv...@va...> - 2015-01-02 17:32:30
|
Author: florian
Date: Fri Jan 2 17:32:21 2015
New Revision: 3055
Log:
Change the IMark statement. The address is now type Addr and the
length is unsigned.
Modified:
trunk/priv/host_amd64_defs.h
trunk/priv/host_amd64_isel.c
trunk/priv/host_arm64_defs.h
trunk/priv/host_arm64_isel.c
trunk/priv/host_arm_defs.h
trunk/priv/host_arm_isel.c
trunk/priv/host_mips_defs.h
trunk/priv/host_mips_isel.c
trunk/priv/host_ppc_defs.h
trunk/priv/host_ppc_isel.c
trunk/priv/host_s390_defs.h
trunk/priv/host_s390_isel.c
trunk/priv/host_x86_defs.h
trunk/priv/host_x86_isel.c
trunk/priv/ir_defs.c
trunk/priv/ir_opt.c
trunk/priv/ir_opt.h
trunk/priv/main_main.c
trunk/pub/libvex_ir.h
Modified: trunk/priv/host_amd64_defs.h
==============================================================================
--- trunk/priv/host_amd64_defs.h (original)
+++ trunk/priv/host_amd64_defs.h Fri Jan 2 17:32:21 2015
@@ -777,7 +777,7 @@
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,
Modified: trunk/priv/host_amd64_isel.c
==============================================================================
--- trunk/priv/host_amd64_isel.c (original)
+++ trunk/priv/host_amd64_isel.c Fri Jan 2 17:32:21 2015
@@ -4858,7 +4858,7 @@
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
Modified: trunk/priv/host_arm64_defs.h
==============================================================================
--- trunk/priv/host_arm64_defs.h (original)
+++ trunk/priv/host_arm64_defs.h Fri Jan 2 17:32:21 2015
@@ -957,7 +957,7 @@
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
Modified: trunk/priv/host_arm64_isel.c
==============================================================================
--- trunk/priv/host_arm64_isel.c (original)
+++ trunk/priv/host_arm64_isel.c Fri Jan 2 17:32:21 2015
@@ -3872,7 +3872,7 @@
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
Modified: trunk/priv/host_arm_defs.h
==============================================================================
--- trunk/priv/host_arm_defs.h (original)
+++ trunk/priv/host_arm_defs.h Fri Jan 2 17:32:21 2015
@@ -1047,7 +1047,7 @@
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
Modified: trunk/priv/host_arm_isel.c
==============================================================================
--- trunk/priv/host_arm_isel.c (original)
+++ trunk/priv/host_arm_isel.c Fri Jan 2 17:32:21 2015
@@ -118,7 +118,7 @@
UInt hwcaps;
Bool chainingAllowed;
- Addr64 max_ga;
+ Addr32 max_ga;
/* These are modified as we go along. */
HInstrArray* code;
@@ -6172,7 +6172,7 @@
/* 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 @@
/* 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 @@
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
Modified: trunk/priv/host_mips_defs.h
==============================================================================
--- trunk/priv/host_mips_defs.h (original)
+++ trunk/priv/host_mips_defs.h Fri Jan 2 17:32:21 2015
@@ -735,7 +735,7 @@
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,
Modified: trunk/priv/host_mips_isel.c
==============================================================================
--- trunk/priv/host_mips_isel.c (original)
+++ trunk/priv/host_mips_isel.c Fri Jan 2 17:32:21 2015
@@ -4160,7 +4160,7 @@
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
Modified: trunk/priv/host_ppc_defs.h
==============================================================================
--- trunk/priv/host_ppc_defs.h (original)
+++ trunk/priv/host_ppc_defs.h Fri Jan 2 17:32:21 2015
@@ -1165,7 +1165,7 @@
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
Modified: trunk/priv/host_ppc_isel.c
==============================================================================
--- trunk/priv/host_ppc_isel.c (original)
+++ trunk/priv/host_ppc_isel.c Fri Jan 2 17:32:21 2015
@@ -6101,7 +6101,7 @@
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga)
+ Addr max_ga)
{
Int i, j;
@@ -6115,7 +6115,6 @@
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
Modified: trunk/priv/host_s390_defs.h
==============================================================================
--- trunk/priv/host_s390_defs.h (original)
+++ trunk/priv/host_s390_defs.h Fri Jan 2 17:32:21 2015
@@ -742,7 +742,7 @@
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);
Modified: trunk/priv/host_s390_isel.c
==============================================================================
--- trunk/priv/host_s390_isel.c (original)
+++ trunk/priv/host_s390_isel.c Fri Jan 2 17:32:21 2015
@@ -4051,7 +4051,7 @@
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;
Modified: trunk/priv/host_x86_defs.h
==============================================================================
--- trunk/priv/host_x86_defs.h (original)
+++ trunk/priv/host_x86_defs.h Fri Jan 2 17:32:21 2015
@@ -739,7 +739,7 @@
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,
Modified: trunk/priv/host_x86_isel.c
==============================================================================
--- trunk/priv/host_x86_isel.c (original)
+++ trunk/priv/host_x86_isel.c Fri Jan 2 17:32:21 2015
@@ -181,7 +181,7 @@
UInt hwcaps;
Bool chainingAllowed;
- Addr64 max_ga;
+ Addr32 max_ga;
/* These are modified as we go along. */
HInstrArray* code;
@@ -4333,7 +4333,7 @@
/* 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 @@
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 @@
| 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);
Modified: trunk/priv/ir_defs.c
==============================================================================
--- trunk/priv/ir_defs.c (original)
+++ trunk/priv/ir_defs.c Fri Jan 2 17:32:21 2015
@@ -1532,7 +1532,7 @@
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 @@
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 @@
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");
Modified: trunk/priv/ir_opt.c
==============================================================================
--- trunk/priv/ir_opt.c (original)
+++ trunk/priv/ir_opt.c Fri Jan 2 17:32:21 2015
@@ -5619,8 +5619,8 @@
}
}
-/* 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 @@
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 @@
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 @@
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;
}
Modified: trunk/priv/ir_opt.h
==============================================================================
--- trunk/priv/ir_opt.h (original)
+++ trunk/priv/ir_opt.h Fri Jan 2 17:32:21 2015
@@ -64,7 +64,7 @@
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 */
Modified: trunk/priv/main_main.c
==============================================================================
--- trunk/priv/main_main.c (original)
+++ trunk/priv/main_main.c Fri Jan 2 17:32:21 2015
@@ -223,7 +223,7 @@
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 @@
IRType guest_word_type;
IRType host_word_type;
Bool mode64, chainingAllowed;
- Addr64 max_ga;
+ Addr max_ga;
guest_layout = NULL;
available_real_regs = NULL;
Modified: trunk/pub/libvex_ir.h
==============================================================================
--- trunk/pub/libvex_ir.h (original)
+++ trunk/pub/libvex_ir.h Fri Jan 2 17:32:21 2015
@@ -2675,8 +2675,8 @@
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 @@
/* 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 );
|