length is unsigned.
git-svn-id: svn://svn.valgrind.org/vex/trunk@3055
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,
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
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
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
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
UInt hwcaps;
Bool chainingAllowed;
- Addr64 max_ga;
+ Addr32 max_ga;
/* These are modified as we go along. */
HInstrArray* code;
/* 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));
/* 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,
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
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,
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
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
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga)
+ Addr max_ga)
{
Int i, j;
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
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);
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;
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,
UInt hwcaps;
Bool chainingAllowed;
- Addr64 max_ga;
+ Addr32 max_ga;
/* These are modified as we go along. */
HInstrArray* code;
/* 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,
Int offs_Host_EvC_FailAddr,
Bool chainingAllowed,
Bool addProfInc,
- Addr64 max_ga )
+ Addr max_ga )
{
Int i, j;
HReg hreg, hregHI;
| 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);
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;
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;
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");
}
}
-/* 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;
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));
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;
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;
}
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 */
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*,
IRType guest_word_type;
IRType host_word_type;
Bool mode64, chainingAllowed;
- Addr64 max_ga;
+ Addr max_ga;
guest_layout = NULL;
available_real_regs = NULL;
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;
/* 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 );