From: Julian Seward Date: Tue, 6 Feb 2007 01:52:52 +0000 (+0000) Subject: More IRBB -> IRSB renaming. X-Git-Tag: svn/VALGRIND_3_3_1^2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3db15456554daa0e77f72361269aff09dc886349;p=thirdparty%2Fvalgrind.git More IRBB -> IRSB renaming. git-svn-id: svn://svn.valgrind.org/vex/trunk@1734 --- diff --git a/VEX/priv/guest-generic/bb_to_IR.c b/VEX/priv/guest-generic/bb_to_IR.c index a36608915f..39d0a9cff7 100644 --- a/VEX/priv/guest-generic/bb_to_IR.c +++ b/VEX/priv/guest-generic/bb_to_IR.c @@ -62,7 +62,7 @@ static Bool const_False ( void* callback_opaque, Addr64 a ) { } /* Disassemble a complete basic block, starting at guest_IP_start, - returning a new IRBB. The disassembler may chase across basic + returning a new IRSB. The disassembler may chase across basic block boundaries if it wishes and if chase_into_ok allows it. The precise guest address ranges from which code has been taken are written into vge. guest_IP_bbstart is taken to be the IP in @@ -77,7 +77,7 @@ static Bool const_False ( void* callback_opaque, Addr64 a ) { preamble_function is a callback which allows the caller to add its own IR preamble (following the self-check, if any). May be - NULL. If non-NULL, the IRBB under construction is handed to + NULL. If non-NULL, the IRSB under construction is handed to this function, which presumably adds IR statements to it. The callback may optionally complete the block and direct bb_to_IR not to disassemble any instructions into it; this is indicated diff --git a/VEX/priv/ir/iropt.c b/VEX/priv/ir/iropt.c index 9a2d958835..40c7888163 100644 --- a/VEX/priv/ir/iropt.c +++ b/VEX/priv/ir/iropt.c @@ -59,7 +59,7 @@ /* What iropt does, 29 Dec 04. - It takes an IRBB and produces a new one with the same meaning, + It takes an IRSB and produces a new one with the same meaning, defined thus: After execution of the new BB, all guest state and guest memory is diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 3e7786b179..0d5a3377c0 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -458,7 +458,7 @@ typedef /* IN: optionally, a callback which allows the caller to add its own IR preamble following the self-check and any other VEX-generated preamble, if any. May be NULL. If non-NULL, - the IRBB under construction is handed to this function, which + the IRSB under construction is handed to this function, which presumably adds IR statements to it. The callback may optionally complete the block and direct bb_to_IR not to disassemble any instructions into it; this is indicated by diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index 436df5264a..f781ed8e88 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -50,13 +50,6 @@ #include "libvex_basictypes.h" -// Possible name changes? -// - Tmp -> AssignTmp (Tmp statements only, not Tmp expressions) -// - IRBB -> IRSB (superblock)? IRB? IRCB (code block)? -// - dopyFoo -> copyFoo -// - sopyFoo -> shallowCopyFoo (there's only one sopyFoo function) - - /*---------------------------------------------------------------*/ /*--- High-level IR description ---*/ /*---------------------------------------------------------------*/ @@ -221,11 +214,13 @@ - deepCopyIRFoo is a deep copy constructor for IRFoos. It recursively traverses the entire argument tree and - produces a complete new tree. + produces a complete new tree. All types have a deep copy + constructor. - shallowCopyIRFoo is the shallow copy constructor for IRFoos. It creates a new top-level copy of the supplied object, - but does not copy any sub-objects. + but does not copy any sub-objects. Only some types have a + shallow copy constructor. */ /* ------------------ Types ------------------ */ diff --git a/VEX/test_main.c b/VEX/test_main.c index c28c5cac9c..8ca122f040 100644 --- a/VEX/test_main.c +++ b/VEX/test_main.c @@ -49,8 +49,8 @@ static Bool verbose = True; /* Forwards */ #if 0 /* UNUSED */ -static IRBB* ac_instrument ( IRBB*, VexGuestLayout*, IRType ); -static IRBB* mc_instrument ( IRBB*, VexGuestLayout*, IRType, IRType ); +static IRSB* ac_instrument ( IRSB*, VexGuestLayout*, IRType ); +static IRSB* mc_instrument ( IRSB*, VexGuestLayout*, IRType, IRType ); #endif static Bool chase_into_not_ok ( void* opaque, Addr64 dst ) { return False; } @@ -230,7 +230,7 @@ void panic ( HChar* s ) } static -IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) +IRSB* ac_instrument (IRSB* bb_in, VexGuestLayout* layout, IRType hWordTy ) { /* Use this rather than eg. -1 because it's a UInt. */ #define INVALID_DATA_SIZE 999999 @@ -244,7 +244,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) Bool needSz; /* Set up BB */ - IRBB* bb = emptyIRBB(); + IRSB* bb = emptyIRSB(); bb->tyenv = dopyIRTypeEnv(bb_in->tyenv); bb->next = dopyIRExpr(bb_in->next); bb->jumpkind = bb_in->jumpkind; @@ -276,7 +276,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) needSz = True; break; } if (needSz) { - addStmtToIRBB( + addStmtToIRSB( bb, IRStmt_Dirty( unsafeIRDirty_0_N( helper->regparms, @@ -284,7 +284,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) mkIRExprVec_2(addr, mkIRExpr_HWord(sz))) )); } else { - addStmtToIRBB( + addStmtToIRSB( bb, IRStmt_Dirty( unsafeIRDirty_0_N( helper->regparms, @@ -314,7 +314,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) needSz = True; break; } if (needSz) { - addStmtToIRBB( + addStmtToIRSB( bb, IRStmt_Dirty( unsafeIRDirty_0_N( helper->regparms, @@ -322,7 +322,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) mkIRExprVec_2(addr, mkIRExpr_HWord(sz))) )); } else { - addStmtToIRBB( + addStmtToIRSB( bb, IRStmt_Dirty( unsafeIRDirty_0_N( helper->regparms, @@ -360,7 +360,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy ) panic("addrcheck: unhandled IRStmt"); } - addStmtToIRBB( bb, dopyIRStmt(st)); + addStmtToIRSB( bb, dopyIRStmt(st)); } return bb; @@ -463,7 +463,7 @@ static IRExpr* expr2vbits ( struct _MCEnv* mce, IRExpr* e ); typedef struct _MCEnv { /* MODIFIED: the bb being constructed. IRStmts are added. */ - IRBB* bb; + IRSB* bb; /* MODIFIED: a table [0 .. #temps_in_original_bb-1] which maps original temps to their current their current shadow temp. @@ -631,11 +631,11 @@ static IRExpr* definedOfType ( IRType ty ) { /* assign value to tmp */ #define assign(_bb,_tmp,_expr) \ - addStmtToIRBB((_bb), IRStmt_Tmp((_tmp),(_expr))) + addStmtToIRSB((_bb), IRStmt_Tmp((_tmp),(_expr))) /* add stmt to a bb */ #define stmt(_bb,_stmt) \ - addStmtToIRBB((_bb), (_stmt)) + addStmtToIRSB((_bb), (_stmt)) /* build various kinds of expressions */ #define binop(_op, _arg1, _arg2) IRExpr_Binop((_op),(_arg1),(_arg2)) @@ -2506,7 +2506,7 @@ static Bool checkForBogusLiterals ( /*FLAT*/ IRStmt* st ) } } -IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout, +IRSB* mc_instrument ( IRSB* bb_in, VexGuestLayout* layout, IRType gWordTy, IRType hWordTy ) { Bool verboze = False; //True; @@ -2518,7 +2518,7 @@ IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout, MCEnv mce; /* Set up BB */ - IRBB* bb = emptyIRBB(); + IRSB* bb = emptyIRSB(); bb->tyenv = dopyIRTypeEnv(bb_in->tyenv); bb->next = dopyIRExpr(bb_in->next); bb->jumpkind = bb_in->jumpkind; @@ -2616,7 +2616,7 @@ IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout, VG_(printf)("\n"); } - addStmtToIRBB(bb, st); + addStmtToIRSB(bb, st); }