/*--- Functions ---*/
/*------------------------------------------------------------*/
-// SSS: work out a consistent prefix convention here
-
/* Functions defined in vg_addrcheck.c */
extern void SK_(helperc_ACCESS4) ( Addr );
extern void SK_(helperc_ACCESS2) ( Addr );
/*--- Our instrumenter ---*/
/*------------------------------------------------------------*/
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uLiteral VG_(set_lit_field)
-#define uCCall VG_(set_ccall_fields)
-#define newTemp VG_(get_new_temp)
-
UCodeBlock* SK_(instrument)(UCodeBlock* cb_in, Addr orig_addr)
{
/* Use this rather than eg. -1 because it's a UInt. */
/*--- Cache simulation instrumentation phase ---*/
/*------------------------------------------------------------*/
-// SSS: do something about all these...
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uInstr3 VG_(new_UInstr3)
-#define uLiteral VG_(set_lit_field)
-#define uCCall VG_(set_ccall_fields)
-#define newTemp VG_(get_new_temp)
-
static Int compute_BBCC_array_size(UCodeBlock* cb)
{
UInstr* u_in;
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define nameIReg VG_(name_of_int_reg)
-#define nameISize VG_(name_of_int_size)
-
#define dis VG_(print_codegen)
/*------------------------------------------------------------*/
couldn't otherwise do. */
#include "vg_skin.h"
-#define uInstr0 VG_(new_UInstr0)
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uLiteral VG_(set_lit_field)
-#define uCCall VG_(set_ccall_fields)
-#define newTemp VG_(get_new_temp)
-
void VG_(call_helper_0_0)(UCodeBlock* cb, Addr f)
{
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define uInstr0 VG_(new_UInstr0)
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uInstr3 VG_(new_UInstr3)
-#define nameIReg VG_(name_of_int_reg)
-#define nameISize VG_(name_of_int_size)
-#define nameSReg VG_(name_of_seg_reg)
-#define newTemp VG_(get_new_temp)
-#define uLiteral VG_(set_lit_field)
-
#define dis VG_(print_codegen)
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define uInstr2 VG_(new_UInstr2)
-#define nameIReg VG_(name_of_int_reg)
-#define nameISize VG_(name_of_int_size)
-#define nameSReg VG_(name_of_seg_reg)
-
#define dis VG_(print_codegen)
/*--- Instrumentation ---*/
/*--------------------------------------------------------------*/
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uLiteral VG_(set_lit_field)
-#define uCCall VG_(set_ccall_fields)
-#define newTemp VG_(get_new_temp)
-
/* Create and return an instrumented version of cb_in. Free cb_in
before returning. */
UCodeBlock* SK_(instrument) ( UCodeBlock* cb_in, Addr not_used )
extern Bool VG_(any_flag_use)( UInstr* u );
+/* Macro versions of the above; just shorter to type. */
+#define uInstr0 VG_(new_UInstr0)
+#define uInstr1 VG_(new_UInstr1)
+#define uInstr2 VG_(new_UInstr2)
+#define uInstr3 VG_(new_UInstr3)
+#define uLiteral VG_(set_lit_field)
+#define uCCall VG_(set_ccall_fields)
+#define newTemp VG_(get_new_temp)
+#define newShadow VG_(get_new_shadow)
+
/* Refer to `the last instruction stuffed in' (can be lvalue). */
#define LAST_UINSTR(cb) (cb)->instrs[(cb)->used-1]
extern Char* VG_(name_of_int_reg) ( Int size, Int reg );
extern Char VG_(name_of_int_size) ( Int size );
+/* Shorter macros for convenience */
+#define nameIReg VG_(name_of_int_reg)
+#define nameISize VG_(name_of_int_size)
+#define nameSReg VG_(name_of_seg_reg)
+
/* Randomly useful things */
extern UInt VG_(extend_s_8to32) ( UInt x );
#include "vg_skin.h"
-//#define uInstr0 VG_(new_UInstr0)
-//#define uLiteral VG_(set_lit_field)
-
/* Nb: use ULongs because the numbers can get very big */
static ULong n_dlrr_calls = 0;
static ULong n_BBs = 0;
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define nameIReg VG_(name_of_int_reg)
-#define nameISize VG_(name_of_int_size)
-
#define dis VG_(print_codegen)
/*------------------------------------------------------------*/
/*--- New instrumentation machinery. ---*/
/*------------------------------------------------------------*/
-#define uInstr1 VG_(new_UInstr1)
-#define uInstr2 VG_(new_UInstr2)
-#define uInstr3 VG_(new_UInstr3)
-#define uLiteral VG_(set_lit_field)
-#define uCCall VG_(set_ccall_fields)
-#define newTemp VG_(get_new_temp)
-#define newShadow VG_(get_new_shadow)
-
static
TagOp get_Tag_ImproveOR_TQ ( Int sz )
{