]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Moved the following macros, which were defined multiple times in multiple
authorNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 14:34:15 +0000 (14:34 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 14:34:15 +0000 (14:34 +0000)
files, into vg_skin.h:

    uInstr0, uInstr1, uInstr2, uInstr3, nameIReg, nameISize, nameSReg,
    newTemp, newShadow, uLiteral, uCCall

As macros they avoid namespace problems (they expand to VG_(whatever)) so
this should work fine.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1182

12 files changed:
addrcheck/ac_include.h
addrcheck/ac_main.c
cachegrind/cg_main.c
coregrind/vg_from_ucode.c
coregrind/vg_instrument.c
coregrind/vg_to_ucode.c
coregrind/vg_translate.c
helgrind/hg_main.c
include/vg_skin.h
lackey/lk_main.c
memcheck/mc_from_ucode.c
memcheck/mc_translate.c

index 1a47e4e811713d71278b79c10a5566152761b6b3..4d6842b4c41c772c4859e481ab0f3dcf1e0d2d6b 100644 (file)
@@ -91,8 +91,6 @@ extern Bool SK_(clo_workaround_gcc296_bugs);
 /*--- 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 );
index ac38e9bad9950770bfe4e1e15177da8260b8dcaa..50981331fee3d8ebbcec134a3799fadefa1abbdf 100644 (file)
@@ -1731,12 +1731,6 @@ void SK_(alt_free) ( ShadowChunk* sc, ThreadState* tst )
 /*--- 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. */
index fbbcc5ea79d850681d07e4bc2bbb871c633de3fe..14e5ae24b798a7c31a0d43f824932ad3ed2df1da 100644 (file)
@@ -483,14 +483,6 @@ static __inline__ BBCC* get_BBCC(Addr bb_orig_addr, UCodeBlock* cb,
 /*--- 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;
index 0c11f03dce7843876c79b3d851b6dead53eb7142..aadbe1f8c1c18ffcee3ba090a0dbab30af2760bc 100644 (file)
@@ -36,9 +36,6 @@
 /*--- 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)
 
 /*------------------------------------------------------------*/
index 94a8a413f8d6293389480ed47bbb63c2ff1dd07c..80dd5f0564506eaee100d9c021cc8270aa209434 100644 (file)
    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)
 {
index ae46414a92a0a18bc2f4952ea3f473015eca06d6..3a04c0a2c1cba163059f631ed6294c26d2be0497 100644 (file)
 /*--- 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)
 
 
index e9c4a2601b190b54ac97701d9b05f7f20310f109..9c2f51ed6657ddeb0aab68b215468ef7aef96007 100644 (file)
 /*--- 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)
 
 
index 68276e164ecbd20545f2580ead259e6a455a6fd2..1a37d202c2c8a74fcb727667b6a00e067740c589 100644 (file)
@@ -860,12 +860,6 @@ Bool SK_(expensive_sanity_check)(void)
 /*--- 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 )
index 68da7f2a523b8154412495f130b27b707d6b4c54..ceb2536dfbdb3f3190da6d7e3a0aa7ba16616615 100644 (file)
@@ -737,6 +737,16 @@ extern void VG_(copy_UInstr) ( UCodeBlock* cb, UInstr* instr );
 
 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]
 
@@ -813,6 +823,11 @@ extern Char* VG_(name_of_seg_reg)  ( Int sreg );
 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 );
 
index 6679541e3a2f19686ff4cca9b764d8d85edbc77b..b33e65fa9861d50b78763d603922bf441ef4443e 100644 (file)
@@ -31,9 +31,6 @@
 
 #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;
index 59fe6e4d3ad398fc9c31c4d68cd35174258ff218..8d63166219f2d4df599f9e61987b771375421b9d 100644 (file)
@@ -35,9 +35,6 @@
 /*--- 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)
 
 /*------------------------------------------------------------*/
index 9c3474cfd28a407db0c99012b4f245e287d75990..88f34ab59a0b2349578b890688f5ef7f35052136 100644 (file)
@@ -270,14 +270,6 @@ Int SK_(get_Xreg_usage)(UInstr* u, Tag tag, RegUse* arr)
 /*--- 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 )
 {