/* Used by the optimiser to specialise calls to helpers. */
extern
-IRExpr* guest_amd64_spechelper ( HChar* function_name,
+IRExpr* guest_amd64_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts );
&& e->Iex.Const.con->Ico.U64 == n );
}
-IRExpr* guest_amd64_spechelper ( HChar* function_name,
+IRExpr* guest_amd64_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts )
/* Used by the optimiser to specialise calls to helpers. */
extern
-IRExpr* guest_arm_spechelper ( HChar* function_name,
+IRExpr* guest_arm_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts );
&& e->Iex.Const.con->Ico.U32 == n );
}
-IRExpr* guest_arm_spechelper ( HChar* function_name,
+IRExpr* guest_arm_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts )
Bool host_bigendian );
/* Used by the optimiser to specialise calls to helpers. */
-extern IRExpr *guest_mips32_spechelper(HChar * function_name, IRExpr ** args,
+extern IRExpr *guest_mips32_spechelper(const HChar * function_name, IRExpr ** args,
IRStmt ** precedingStmts,
Int n_precedingStmts);
{ offsetof(VexGuestMIPS32State, field), \
(sizeof ((VexGuestMIPS32State*)0)->field) }
-IRExpr *guest_mips32_spechelper(HChar * function_name, IRExpr ** args,
+IRExpr *guest_mips32_spechelper(const HChar * function_name, IRExpr ** args,
IRStmt ** precedingStmts, Int n_precedingStmts)
{
return NULL;
/* Used by the optimiser to specialise calls to helpers. */
extern
-IRExpr* guest_ppc32_spechelper ( HChar* function_name,
+IRExpr* guest_ppc32_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts );
extern
-IRExpr* guest_ppc64_spechelper ( HChar* function_name,
+IRExpr* guest_ppc64_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts );
/* Helper-function specialiser. */
-IRExpr* guest_ppc32_spechelper ( HChar* function_name,
+IRExpr* guest_ppc32_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts )
return NULL;
}
-IRExpr* guest_ppc64_spechelper ( HChar* function_name,
+IRExpr* guest_ppc64_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts )
Bool host_bigendian );
/* Used by the optimiser to specialise calls to helpers. */
-IRExpr* guest_s390x_spechelper ( HChar *function_name,
+IRExpr* guest_s390x_spechelper ( const HChar *function_name,
IRExpr **args,
IRStmt **precedingStmts,
Int n_precedingStmts);
case the helper function will be called. Otherwise, the expression has
type Ity_I32 and a Boolean value. */
IRExpr *
-guest_s390x_spechelper(HChar *function_name, IRExpr **args,
+guest_s390x_spechelper(const HChar *function_name, IRExpr **args,
IRStmt **precedingStmts, Int n_precedingStmts)
{
UInt i, arity = 0;
/* Used by the optimiser to specialise calls to helpers. */
extern
-IRExpr* guest_x86_spechelper ( HChar* function_name,
+IRExpr* guest_x86_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts );
&& e->Iex.Const.con->Ico.U32 == n );
}
-IRExpr* guest_x86_spechelper ( HChar* function_name,
+IRExpr* guest_x86_spechelper ( const HChar* function_name,
IRExpr** args,
IRStmt** precedingStmts,
Int n_precedingStmts )
s390_insn *
s390_insn_helper_call(s390_cc_t cond, Addr64 target, UInt num_args,
- HChar *name, HReg dst)
+ const HChar *name, HReg dst)
{
s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
i.e. in registers r2, r3, r4, r5, and r6, with argument #0 being
passed in r2 and so forth. */
struct {
- s390_cc_t cond;
- Addr64 target;
- UInt num_args;
- HReg dst; /* if not INVALID_HREG, put return value here */
- HChar *name; /* callee's name (for debugging) */
+ s390_cc_t cond;
+ Addr64 target;
+ UInt num_args;
+ HReg dst; /* if not INVALID_HREG, put return value here */
+ const HChar *name; /* callee's name (for debugging) */
} helper_call;
/* Floating point instructions (including conversion to/from floating
s390_insn *s390_insn_compare(UChar size, HReg dst, s390_opnd_RMI opnd,
Bool signed_comparison);
s390_insn *s390_insn_helper_call(s390_cc_t cond, Addr64 target, UInt num_args,
- HChar *name, HReg dst);
+ const HChar *name, HReg dst);
s390_insn *s390_insn_bfp_triop(UChar size, s390_bfp_triop_t, HReg dst,
HReg op2, HReg op3);
s390_insn *s390_insn_bfp_binop(UChar size, s390_bfp_binop_t, HReg dst,
void ppIROp ( IROp op )
{
- HChar* str = NULL;
+ const HChar* str = NULL;
IROp base;
switch (op) {
case Iop_Add8 ... Iop_Add64:
/* Constructors -- IRCallee */
-IRCallee* mkIRCallee ( Int regparms, HChar* name, void* addr )
+IRCallee* mkIRCallee ( Int regparms, const HChar* name, void* addr )
{
IRCallee* ce = LibVEX_Alloc(sizeof(IRCallee));
ce->regparms = regparms;
static
__attribute((noreturn))
-void sanityCheckFail ( IRSB* bb, IRStmt* stmt, HChar* what )
+void sanityCheckFail ( IRSB* bb, IRStmt* stmt, const HChar* what )
{
vex_printf("\nIR SANITY CHECK FAILURE\n\n");
ppIRSB(bb);
}
}
-void sanityCheckIRSB ( IRSB* bb, HChar* caller,
+void sanityCheckIRSB ( IRSB* bb, const HChar* caller,
Bool require_flat, IRType guest_word_size )
{
Int i;
vpanic("mkIRExpr_HWord");
}
-IRDirty* unsafeIRDirty_0_N ( Int regparms, HChar* name, void* addr,
+IRDirty* unsafeIRDirty_0_N ( Int regparms, const HChar* name, void* addr,
IRExpr** args )
{
IRDirty* d = emptyIRDirty();
}
IRDirty* unsafeIRDirty_1_N ( IRTemp dst,
- Int regparms, HChar* name, void* addr,
+ Int regparms, const HChar* name, void* addr,
IRExpr** args )
{
IRDirty* d = emptyIRDirty();
}
IRExpr* mkIRExprCCall ( IRType retty,
- Int regparms, HChar* name, void* addr,
+ Int regparms, const HChar* name, void* addr,
IRExpr** args )
{
return IRExpr_CCall ( mkIRCallee ( regparms, name, addr ),
static
IRSB* spec_helpers_BB(
IRSB* bb,
- IRExpr* (*specHelper) (HChar*, IRExpr**, IRStmt**, Int)
+ IRExpr* (*specHelper) (const HChar*, IRExpr**, IRStmt**, Int)
)
{
Int i;
static
IRSB* cheap_transformations (
IRSB* bb,
- IRExpr* (*specHelper) (HChar*, IRExpr**, IRStmt**, Int),
+ IRExpr* (*specHelper) (const HChar*, IRExpr**, IRStmt**, Int),
Bool (*preciseMemExnsFn)(Int,Int)
)
{
IRSB* do_iropt_BB(
IRSB* bb0,
- IRExpr* (*specHelper) (HChar*, IRExpr**, IRStmt**, Int),
+ IRExpr* (*specHelper) (const HChar*, IRExpr**, IRStmt**, Int),
Bool (*preciseMemExnsFn)(Int,Int),
Addr64 guest_addr,
VexArch guest_arch
extern
IRSB* do_iropt_BB(
IRSB* bb,
- IRExpr* (*specHelper) (HChar*, IRExpr**, IRStmt**, Int),
+ IRExpr* (*specHelper) (const HChar*, IRExpr**, IRStmt**, Int),
Bool (*preciseMemExnsFn)(Int,Int),
Addr64 guest_addr,
VexArch guest_arch
Int (*emit) ( /*MB_MOD*/Bool*,
UChar*, Int, HInstr*, Bool,
void*, void*, void*, void* );
- IRExpr* (*specHelper) ( HChar*, IRExpr**, IRStmt**, Int );
+ IRExpr* (*specHelper) ( const HChar*, IRExpr**, IRStmt**, Int );
Bool (*preciseMemExnsFn) ( Int, Int );
DisOneInstrFn disInstrFn;
/* --------- Emulation warnings. --------- */
-HChar* LibVEX_EmNote_string ( VexEmNote ew )
+const HChar* LibVEX_EmNote_string ( VexEmNote ew )
{
switch (ew) {
case EmNote_NONE:
/* Produces a short string describing the warning. */
-extern HChar* LibVEX_EmNote_string ( VexEmNote );
+extern const HChar* LibVEX_EmNote_string ( VexEmNote );
#endif /* ndef __LIBVEX_EMNOTE_H */
typedef
struct {
- Int regparms;
- HChar* name;
- void* addr;
- UInt mcx_mask;
+ Int regparms;
+ const HChar* name;
+ void* addr;
+ UInt mcx_mask;
}
IRCallee;
/* Create an IRCallee. */
-extern IRCallee* mkIRCallee ( Int regparms, HChar* name, void* addr );
+extern IRCallee* mkIRCallee ( Int regparms, const HChar* name, void* addr );
/* Deep-copy an IRCallee. */
extern IRCallee* deepCopyIRCallee ( IRCallee* );
/* Convenience function for constructing clean helper calls. */
extern
IRExpr* mkIRExprCCall ( IRType retty,
- Int regparms, HChar* name, void* addr,
+ Int regparms, const HChar* name, void* addr,
IRExpr** args );
designation) -- you can change this marking later if need be. A
suitable IRCallee is constructed from the supplied bits. */
extern
-IRDirty* unsafeIRDirty_0_N ( Int regparms, HChar* name, void* addr,
+IRDirty* unsafeIRDirty_0_N ( Int regparms, const HChar* name, void* addr,
IRExpr** args );
/* Similarly, make a zero-annotation dirty call which returns a value,
and assign that to the given temp. */
extern
IRDirty* unsafeIRDirty_1_N ( IRTemp dst,
- Int regparms, HChar* name, void* addr,
+ Int regparms, const HChar* name, void* addr,
IRExpr** args );
/* Sanity check a BB of IR */
extern void sanityCheckIRSB ( IRSB* bb,
- HChar* caller,
+ const HChar* caller,
Bool require_flatness,
IRType guest_word_size );
extern Bool isFlatIRStmt ( IRStmt* );