|
From: <sv...@va...> - 2007-02-06 01:53:09
|
Author: sewardj
Date: 2007-02-06 01:52:52 +0000 (Tue, 06 Feb 2007)
New Revision: 1734
Log:
More IRBB -> IRSB renaming.
Modified:
trunk/priv/guest-generic/bb_to_IR.c
trunk/priv/ir/iropt.c
trunk/pub/libvex.h
trunk/pub/libvex_ir.h
trunk/test_main.c
Modified: trunk/priv/guest-generic/bb_to_IR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-generic/bb_to_IR.c 2007-01-30 04:55:39 UTC (rev 1733=
)
+++ trunk/priv/guest-generic/bb_to_IR.c 2007-02-06 01:52:52 UTC (rev 1734=
)
@@ -62,7 +62,7 @@
}
=20
/* Disassemble a complete basic block, starting at guest_IP_start,=20
- 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 @@
=20
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=20
+ NULL. If non-NULL, the IRSB under construction is handed to=20
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
Modified: trunk/priv/ir/iropt.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/ir/iropt.c 2007-01-30 04:55:39 UTC (rev 1733)
+++ trunk/priv/ir/iropt.c 2007-02-06 01:52:52 UTC (rev 1734)
@@ -59,7 +59,7 @@
=20
/* What iropt does, 29 Dec 04.
=20
- 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:
=20
After execution of the new BB, all guest state and guest memory is
Modified: trunk/pub/libvex.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex.h 2007-01-30 04:55:39 UTC (rev 1733)
+++ trunk/pub/libvex.h 2007-02-06 01:52:52 UTC (rev 1734)
@@ -458,7 +458,7 @@
/* 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
Modified: trunk/pub/libvex_ir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_ir.h 2007-01-30 04:55:39 UTC (rev 1733)
+++ trunk/pub/libvex_ir.h 2007-02-06 01:52:52 UTC (rev 1734)
@@ -50,13 +50,6 @@
#include "libvex_basictypes.h"
=20
=20
-// 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 @@
=20
- deepCopyIRFoo is a deep copy constructor for IRFoos.=20
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.
=20
- 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.
*/
=20
/* ------------------ Types ------------------ */
Modified: trunk/test_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/test_main.c 2007-01-30 04:55:39 UTC (rev 1733)
+++ trunk/test_main.c 2007-02-06 01:52:52 UTC (rev 1734)
@@ -49,8 +49,8 @@
=20
/* 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
=20
static Bool chase_into_not_ok ( void* opaque, Addr64 dst ) { return Fals=
e; }
@@ -230,7 +230,7 @@
}
=20
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 @@
Bool needSz;
=20
/* Set up BB */
- IRBB* bb =3D emptyIRBB();
+ IRSB* bb =3D emptyIRSB();
bb->tyenv =3D dopyIRTypeEnv(bb_in->tyenv);
bb->next =3D dopyIRExpr(bb_in->next);
bb->jumpkind =3D bb_in->jumpkind;
@@ -276,7 +276,7 @@
needSz =3D True; break=
;
}
if (needSz) {
- addStmtToIRBB(=20
+ addStmtToIRSB(=20
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,=20
@@ -284,7 +284,7 @@
mkIRExprVec_2(addr, mkIRExpr_=
HWord(sz)))
));
} else {
- addStmtToIRBB(=20
+ addStmtToIRSB(=20
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,=20
@@ -314,7 +314,7 @@
needSz =3D True; break;
}
if (needSz) {
- addStmtToIRBB(=20
+ addStmtToIRSB(=20
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,=20
@@ -322,7 +322,7 @@
mkIRExprVec_2(addr, mkIRExpr_HWo=
rd(sz)))
));
} else {
- addStmtToIRBB(=20
+ addStmtToIRSB(=20
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,
@@ -360,7 +360,7 @@
panic("addrcheck: unhandled IRStmt");
}
=20
- addStmtToIRBB( bb, dopyIRStmt(st));
+ addStmtToIRSB( bb, dopyIRStmt(st));
}
=20
return bb;
@@ -463,7 +463,7 @@
typedef
struct _MCEnv {
/* MODIFIED: the bb being constructed. IRStmts are added. */
- IRBB* bb;
+ IRSB* bb;
=20
/* MODIFIED: a table [0 .. #temps_in_original_bb-1] which maps
original temps to their current their current shadow temp.
@@ -631,11 +631,11 @@
=20
/* assign value to tmp */
#define assign(_bb,_tmp,_expr) \
- addStmtToIRBB((_bb), IRStmt_Tmp((_tmp),(_expr)))
+ addStmtToIRSB((_bb), IRStmt_Tmp((_tmp),(_expr)))
=20
/* add stmt to a bb */
#define stmt(_bb,_stmt) \
- addStmtToIRBB((_bb), (_stmt))
+ addStmtToIRSB((_bb), (_stmt))
=20
/* build various kinds of expressions */
#define binop(_op, _arg1, _arg2) IRExpr_Binop((_op),(_arg1),(_arg2))
@@ -2506,7 +2506,7 @@
}
}
=20
-IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout,=20
+IRSB* mc_instrument ( IRSB* bb_in, VexGuestLayout* layout,=20
IRType gWordTy, IRType hWordTy )
{
Bool verboze =3D False; //True;=20
@@ -2518,7 +2518,7 @@
MCEnv mce;
=20
/* Set up BB */
- IRBB* bb =3D emptyIRBB();
+ IRSB* bb =3D emptyIRSB();
bb->tyenv =3D dopyIRTypeEnv(bb_in->tyenv);
bb->next =3D dopyIRExpr(bb_in->next);
bb->jumpkind =3D bb_in->jumpkind;
@@ -2616,7 +2616,7 @@
VG_(printf)("\n");
}
=20
- addStmtToIRBB(bb, st);
+ addStmtToIRSB(bb, st);
=20
}
=20
|