Converted all functions visible from vg_skin.h with names in CamelCaps to
use_under_scores instead, to be consistent.
Also added some missing 'extern's on function declarations in vg_skin.h.
Also added a quick note in vg_regtest.in on the simplest way to run regression
tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1135 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_clientmalloc.c b/coregrind/vg_clientmalloc.c
index 0959843..974ae67 100644
--- a/coregrind/vg_clientmalloc.c
+++ b/coregrind/vg_clientmalloc.c
@@ -147,7 +147,7 @@
return curr;
}
-void VG_(freeShadowChunk) ( ShadowChunk* sc )
+void VG_(free_ShadowChunk) ( ShadowChunk* sc )
{
VG_(arena_free) ( VG_AR_CLIENT, (void*)sc->data );
VG_(arena_free) ( VG_AR_CORE, sc );
@@ -310,7 +310,7 @@
if (VG_(needs).alternative_free)
SK_(alt_free) ( sc, tst );
else
- VG_(freeShadowChunk) ( sc );
+ VG_(free_ShadowChunk) ( sc );
}
diff --git a/coregrind/vg_default.c b/coregrind/vg_default.c
index a4b52ea..0679cb6 100644
--- a/coregrind/vg_default.c
+++ b/coregrind/vg_default.c
@@ -172,29 +172,29 @@
UCode extension
------------------------------------------------------------------ */
-void SK_(emitExtUInstr)(UInstr* u, RRegSet regs_live_before)
+void SK_(emit_XUInstr)(UInstr* u, RRegSet regs_live_before)
{
- non_fund_panic("SK_(emitExtUInstr)");
+ non_fund_panic("SK_(emit_XUInstr)");
}
-Bool SK_(saneExtUInstr)(Bool beforeRA, Bool beforeLiveness, UInstr* u)
+Bool SK_(sane_XUInstr)(Bool beforeRA, Bool beforeLiveness, UInstr* u)
{
- non_fund_panic("SK_(saneExtUInstr)");
+ non_fund_panic("SK_(sane_XUInstr)");
}
-Char* SK_(nameExtUOpcode)(Opcode opc)
+Char* SK_(name_XUOpcode)(Opcode opc)
{
- non_fund_panic("SK_(nameExtUOpcode)");
+ non_fund_panic("SK_(name_XUOpcode)");
}
-void SK_(ppExtUInstr)(UInstr* u)
+void SK_(pp_XUInstr)(UInstr* u)
{
- non_fund_panic("SK_(ppExtUInstr)");
+ non_fund_panic("SK_(pp_XUInstr)");
}
-Int SK_(getExtRegUsage)(UInstr* u, Tag tag, RegUse* arr)
+Int SK_(get_Xreg_usage)(UInstr* u, Tag tag, RegUse* arr)
{
- non_fund_panic("SK_(getExtTempUsage)");
+ non_fund_panic("SK_(get_Xreg_usage)");
}
/* ---------------------------------------------------------------------
diff --git a/coregrind/vg_errcontext.c b/coregrind/vg_errcontext.c
index f38ade6..ac7874b 100644
--- a/coregrind/vg_errcontext.c
+++ b/coregrind/vg_errcontext.c
@@ -459,7 +459,7 @@
#define VG_ISSPACE(ch) (((ch)==' ') || ((ch)=='\n') || ((ch)=='\t'))
-Bool VG_(getLine) ( Int fd, Char* buf, Int nBuf )
+Bool VG_(get_line) ( Int fd, Char* buf, Int nBuf )
{
Char ch;
Int n, i;
@@ -546,16 +546,16 @@
for (i = 0; i < VG_N_SUPP_CALLERS; i++) supp->caller[i] = NULL;
supp->skin_supp.string = supp->skin_supp.extra = NULL;
- eof = VG_(getLine) ( fd, buf, N_BUF );
+ eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof) break;
if (!STREQ(buf, "{")) goto syntax_error;
- eof = VG_(getLine) ( fd, buf, N_BUF );
+ eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof || STREQ(buf, "}")) goto syntax_error;
supp->sname = VG_(arena_strdup)(VG_AR_CORE, buf);
- eof = VG_(getLine) ( fd, buf, N_BUF );
+ eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof) goto syntax_error;
@@ -583,7 +583,7 @@
VG_(add_to_msg)(", '%s'", buf);
}
while (True) {
- eof = VG_(getLine) ( fd, buf, N_BUF );
+ eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof) goto syntax_error;
if (STREQ(buf, "}"))
break;
@@ -597,7 +597,7 @@
/* "i > 0" ensures at least one caller read. */
for (i = 0; i < VG_N_SUPP_CALLERS; i++) {
- eof = VG_(getLine) ( fd, buf, N_BUF );
+ eof = VG_(get_line) ( fd, buf, N_BUF );
if (eof) goto syntax_error;
if (i > 0 && STREQ(buf, "}"))
break;
@@ -689,11 +689,11 @@
for (i = 0; su->caller[i] != NULL; i++) {
switch (su->caller_ty[i]) {
- case ObjName: if (VG_(stringMatch)(su->caller[i],
- caller_obj[i])) break;
+ case ObjName: if (VG_(string_match)(su->caller[i],
+ caller_obj[i])) break;
return False;
- case FunName: if (VG_(stringMatch)(su->caller[i],
- caller_fun[i])) break;
+ case FunName: if (VG_(string_match)(su->caller[i],
+ caller_fun[i])) break;
return False;
default: VG_(panic)("is_suppressible_error");
}
diff --git a/coregrind/vg_from_ucode.c b/coregrind/vg_from_ucode.c
index e99bfaa..330b731 100644
--- a/coregrind/vg_from_ucode.c
+++ b/coregrind/vg_from_ucode.c
@@ -35,8 +35,8 @@
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define nameIReg VG_(nameOfIntReg)
-#define nameISize VG_(nameOfIntSize)
+#define nameIReg VG_(name_of_int_reg)
+#define nameISize VG_(name_of_int_size)
#define dis VG_(print_codegen)
@@ -140,7 +140,7 @@
(UInt)(histogram[i].size / (double)histogram[i].counts + 0.5);
VG_(printf)("%-7s:%8u (%2u%%), avg %2dB (%2u%%) |",
- VG_(nameUOpcode)(True, i),
+ VG_(name_UOpcode)(True, i),
histogram[i].counts, count_pc,
avg_size, size_pc);
@@ -194,7 +194,7 @@
VG_(emitB) ( (l >> 24) & 0x000000FF );
}
-__inline__ void VG_(newEmit) ( void )
+__inline__ void VG_(new_emit) ( void )
{
if (dis)
VG_(printf)("\t %4d: ", emitted_code_used );
@@ -369,7 +369,7 @@
void VG_(emit_movv_offregmem_reg) ( Int sz, Int off, Int areg, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0x8B ); /* MOV Ev, Gv */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
@@ -380,7 +380,7 @@
void VG_(emit_movv_reg_offregmem) ( Int sz, Int reg, Int off, Int areg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0x89 ); /* MOV Gv, Ev */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
@@ -391,7 +391,7 @@
static void emit_movv_regmem_reg ( Int sz, Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0x8B ); /* MOV Ev, Gv */
emit_amode_regmem_reg ( reg1, reg2 );
@@ -402,7 +402,7 @@
static void emit_movv_reg_regmem ( Int sz, Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0x89 ); /* MOV Gv, Ev */
emit_amode_regmem_reg ( reg2, reg1 );
@@ -413,7 +413,7 @@
void VG_(emit_movv_reg_reg) ( Int sz, Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0x89 ); /* MOV Gv, Ev */
VG_(emit_amode_ereg_greg) ( reg2, reg1 );
@@ -424,7 +424,7 @@
void VG_(emit_nonshiftopv_lit_reg) ( Int sz, Opcode opc, UInt lit, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
if (lit == VG_(extend_s_8to32)(lit & 0x000000FF)) {
/* short form OK */
@@ -438,26 +438,26 @@
}
if (dis)
VG_(printf)( "\n\t\t%s%c\t$0x%x, %s\n",
- VG_(nameUOpcode)(False,opc), nameISize(sz),
+ VG_(name_UOpcode)(False,opc), nameISize(sz),
lit, nameIReg(sz,reg));
}
void VG_(emit_shiftopv_lit_reg) ( Int sz, Opcode opc, UInt lit, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0xC1 ); /* Grp2 Ib,Ev */
VG_(emit_amode_ereg_greg) ( reg, mkGrp2opcode(opc) );
VG_(emitB) ( lit );
if (dis)
VG_(printf)( "\n\t\t%s%c\t$%d, %s\n",
- VG_(nameUOpcode)(False,opc), nameISize(sz),
+ VG_(name_UOpcode)(False,opc), nameISize(sz),
lit, nameIReg(sz,reg));
}
static void emit_shiftopv_cl_stack0 ( Int sz, Opcode opc )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0xD3 ); /* Grp2 CL,Ev */
VG_(emitB) ( mkModRegRM ( 1, mkGrp2opcode(opc), 4 ) );
@@ -465,38 +465,38 @@
VG_(emitB) ( 0x00 ); /* the d8 displacement */
if (dis)
VG_(printf)("\n\t\t%s%c %%cl, 0(%%esp)\n",
- VG_(nameUOpcode)(False,opc), nameISize(sz) );
+ VG_(name_UOpcode)(False,opc), nameISize(sz) );
}
static void emit_shiftopb_cl_stack0 ( Opcode opc )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xD2 ); /* Grp2 CL,Eb */
VG_(emitB) ( mkModRegRM ( 1, mkGrp2opcode(opc), 4 ) );
VG_(emitB) ( 0x24 ); /* a SIB, I think `d8(%esp)' */
VG_(emitB) ( 0x00 ); /* the d8 displacement */
if (dis)
VG_(printf)("\n\t\t%s%c %%cl, 0(%%esp)\n",
- VG_(nameUOpcode)(False,opc), nameISize(1) );
+ VG_(name_UOpcode)(False,opc), nameISize(1) );
}
static void emit_nonshiftopv_offregmem_reg ( Int sz, Opcode opc,
Int off, Int areg, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 3 + mkPrimaryOpcode(opc) ); /* op Ev, Gv */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
if (dis)
VG_(printf)( "\n\t\t%s%c\t0x%x(%s), %s\n",
- VG_(nameUOpcode)(False,opc), nameISize(sz),
+ VG_(name_UOpcode)(False,opc), nameISize(sz),
off, nameIReg(4,areg), nameIReg(sz,reg));
}
void VG_(emit_nonshiftopv_reg_reg) ( Int sz, Opcode opc,
Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
# if 0
/* Perfectly correct, but the GNU assembler uses the other form.
@@ -509,7 +509,7 @@
# endif
if (dis)
VG_(printf)( "\n\t\t%s%c\t%s, %s\n",
- VG_(nameUOpcode)(False,opc), nameISize(sz),
+ VG_(name_UOpcode)(False,opc), nameISize(sz),
nameIReg(sz,reg1), nameIReg(sz,reg2));
}
@@ -519,7 +519,7 @@
VG_(emit_nonshiftopv_reg_reg) ( sz, XOR, reg, reg );
return;
}
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
VG_(emitB) ( 0xB8+reg ); /* MOV imm, Gv */
if (sz == 2) VG_(emitW) ( lit ); else VG_(emitL) ( lit );
@@ -530,7 +530,7 @@
void VG_(emit_unaryopv_reg) ( Int sz, Opcode opc, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) VG_(emitB) ( 0x66 );
switch (opc) {
case NEG:
@@ -566,7 +566,7 @@
void VG_(emit_pushv_reg) ( Int sz, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) {
VG_(emitB) ( 0x66 );
} else {
@@ -579,7 +579,7 @@
void VG_(emit_popv_reg) ( Int sz, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) {
VG_(emitB) ( 0x66 );
} else {
@@ -592,7 +592,7 @@
void VG_(emit_pushl_lit32) ( UInt int32 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x68 );
VG_(emitL) ( int32 );
if (dis)
@@ -602,7 +602,7 @@
void VG_(emit_pushl_lit8) ( Int lit8 )
{
vg_assert(lit8 >= -128 && lit8 < 128);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x6A );
VG_(emitB) ( (UChar)((UInt)lit8) );
if (dis)
@@ -611,7 +611,7 @@
void VG_(emit_cmpl_zero_reg) ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x83 );
VG_(emit_amode_ereg_greg) ( reg, 7 /* Grp 3 opcode for CMP */ );
VG_(emitB) ( 0x00 );
@@ -621,7 +621,7 @@
static void emit_swapl_reg_ECX ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x87 ); /* XCHG Gv,Ev */
VG_(emit_amode_ereg_greg) ( reg, R_ECX );
if (dis)
@@ -630,7 +630,7 @@
void VG_(emit_swapl_reg_EAX) ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x90 + reg ); /* XCHG Gv,eAX */
if (dis)
VG_(printf)("\n\t\txchgl %%eax, %s\n", nameIReg(4,reg));
@@ -638,7 +638,7 @@
static void emit_swapl_reg_reg ( Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x87 ); /* XCHG Gv,Ev */
VG_(emit_amode_ereg_greg) ( reg1, reg2 );
if (dis)
@@ -648,7 +648,7 @@
static void emit_bswapl_reg ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F );
VG_(emitB) ( 0xC8 + reg ); /* BSWAP r32 */
if (dis)
@@ -657,7 +657,7 @@
static void emit_movl_reg_reg ( Int regs, Int regd )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x89 ); /* MOV Gv,Ev */
VG_(emit_amode_ereg_greg) ( regd, regs );
if (dis)
@@ -666,7 +666,7 @@
void VG_(emit_movv_lit_offregmem) ( Int sz, UInt lit, Int off, Int memreg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (sz == 2) {
VG_(emitB) ( 0x66 );
} else {
@@ -689,7 +689,7 @@
486 insn set. ToDo: investigate. */
void VG_(emit_movb_lit_offregmem) ( UInt lit, Int off, Int memreg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xC6 ); /* Grp11 Eb */
VG_(emit_amode_offregmem_reg) ( off, memreg, 0 /* Grp11 subopcode for MOV */ );
VG_(emitB) ( lit );
@@ -701,19 +701,19 @@
static void emit_nonshiftopb_offregmem_reg ( Opcode opc,
Int off, Int areg, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 2 + mkPrimaryOpcode(opc) ); /* op Eb, Gb */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
if (dis)
VG_(printf)( "\n\t\t%sb\t0x%x(%s), %s\n",
- VG_(nameUOpcode)(False,opc), off, nameIReg(4,areg),
+ VG_(name_UOpcode)(False,opc), off, nameIReg(4,areg),
nameIReg(1,reg));
}
void VG_(emit_movb_reg_offregmem) ( Int reg, Int off, Int areg )
{
/* Could do better when reg == %al. */
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x88 ); /* MOV G1, E1 */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
if (dis)
@@ -723,18 +723,18 @@
static void emit_nonshiftopb_reg_reg ( Opcode opc, Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 2 + mkPrimaryOpcode(opc) ); /* op Eb, Gb */
VG_(emit_amode_ereg_greg) ( reg1, reg2 );
if (dis)
VG_(printf)( "\n\t\t%sb\t%s, %s\n",
- VG_(nameUOpcode)(False,opc),
+ VG_(name_UOpcode)(False,opc),
nameIReg(1,reg1), nameIReg(1,reg2));
}
static void emit_movb_reg_regmem ( Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x88 ); /* MOV G1, E1 */
emit_amode_regmem_reg ( reg2, reg1 );
if (dis)
@@ -744,30 +744,30 @@
static void emit_nonshiftopb_lit_reg ( Opcode opc, UInt lit, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x80 ); /* Grp1 Ib,Eb */
VG_(emit_amode_ereg_greg) ( reg, mkGrp1opcode(opc) );
VG_(emitB) ( lit & 0x000000FF );
if (dis)
- VG_(printf)( "\n\t\t%sb\t$0x%x, %s\n", VG_(nameUOpcode)(False,opc),
+ VG_(printf)( "\n\t\t%sb\t$0x%x, %s\n", VG_(name_UOpcode)(False,opc),
lit, nameIReg(1,reg));
}
static void emit_shiftopb_lit_reg ( Opcode opc, UInt lit, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xC0 ); /* Grp2 Ib,Eb */
VG_(emit_amode_ereg_greg) ( reg, mkGrp2opcode(opc) );
VG_(emitB) ( lit );
if (dis)
VG_(printf)( "\n\t\t%sb\t$%d, %s\n",
- VG_(nameUOpcode)(False,opc),
+ VG_(name_UOpcode)(False,opc),
lit, nameIReg(1,reg));
}
void VG_(emit_unaryopb_reg) ( Opcode opc, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
switch (opc) {
case INC:
VG_(emitB) ( 0xFE );
@@ -800,7 +800,7 @@
void VG_(emit_testb_lit_reg) ( UInt lit, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xF6 ); /* Grp3 Eb */
VG_(emit_amode_ereg_greg) ( reg, 0 /* Grp3 subopcode for TEST */ );
VG_(emitB) ( lit );
@@ -814,7 +814,7 @@
void VG_(emit_movzbl_offregmem_reg) ( Int off, Int regmem, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F ); VG_(emitB) ( 0xB6 ); /* MOVZBL */
VG_(emit_amode_offregmem_reg) ( off, regmem, reg );
if (dis)
@@ -824,7 +824,7 @@
static void emit_movzbl_regmem_reg ( Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F ); VG_(emitB) ( 0xB6 ); /* MOVZBL */
emit_amode_regmem_reg ( reg1, reg2 );
if (dis)
@@ -834,7 +834,7 @@
void VG_(emit_movzwl_offregmem_reg) ( Int off, Int areg, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F ); VG_(emitB) ( 0xB7 ); /* MOVZWL */
VG_(emit_amode_offregmem_reg) ( off, areg, reg );
if (dis)
@@ -844,7 +844,7 @@
static void emit_movzwl_regmem_reg ( Int reg1, Int reg2 )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F ); VG_(emitB) ( 0xB7 ); /* MOVZWL */
emit_amode_regmem_reg ( reg1, reg2 );
if (dis)
@@ -859,7 +859,7 @@
static void emit_get_fpu_state ( void )
{
Int off = 4 * VGOFF_(m_fpustate);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xDD ); VG_(emitB) ( 0xA5 ); /* frstor d32(%ebp) */
VG_(emitL) ( off );
if (dis)
@@ -869,7 +869,7 @@
static void emit_put_fpu_state ( void )
{
Int off = 4 * VGOFF_(m_fpustate);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xDD ); VG_(emitB) ( 0xB5 ); /* fnsave d32(%ebp) */
VG_(emitL) ( off );
if (dis)
@@ -879,7 +879,7 @@
static void emit_fpu_no_mem ( UChar first_byte,
UChar second_byte )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( first_byte );
VG_(emitB) ( second_byte );
if (dis)
@@ -891,7 +891,7 @@
UChar second_byte_masked,
Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( first_byte );
emit_amode_regmem_reg ( reg, second_byte_masked >> 3 );
if (dis)
@@ -907,7 +907,7 @@
void VG_(emit_call_reg) ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xFF ); /* Grp5 */
VG_(emit_amode_ereg_greg) ( reg, mkGrp5opcode(CALLM) );
if (dis)
@@ -916,7 +916,7 @@
static void emit_call_star_EBP_off ( Int byte_off )
{
- VG_(newEmit)();
+ VG_(new_emit)();
if (byte_off < -128 || byte_off > 127) {
VG_(emitB) ( 0xFF );
VG_(emitB) ( 0x95 );
@@ -934,7 +934,7 @@
static void emit_addlit8_offregmem ( Int lit8, Int regmem, Int off )
{
vg_assert(lit8 >= -128 && lit8 < 128);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x83 ); /* Grp1 Ib,Ev */
VG_(emit_amode_offregmem_reg) ( off, regmem,
0 /* Grp1 subopcode for ADD */ );
@@ -948,7 +948,7 @@
void VG_(emit_add_lit_to_esp) ( Int lit )
{
if (lit < -128 || lit > 127) VG_(panic)("VG_(emit_add_lit_to_esp)");
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x83 );
VG_(emitB) ( 0xC4 );
VG_(emitB) ( lit & 0xFF );
@@ -961,7 +961,7 @@
{
/* movb %al, 0(%esp) */
/* 88442400 movb %al, 0(%esp) */
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x88 );
VG_(emitB) ( 0x44 );
VG_(emitB) ( 0x24 );
@@ -974,7 +974,7 @@
{
/* movb 0(%esp), %al */
/* 8A442400 movb 0(%esp), %al */
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x8A );
VG_(emitB) ( 0x44 );
VG_(emitB) ( 0x24 );
@@ -990,7 +990,7 @@
void VG_(emit_jcondshort_delta) ( Condcode cond, Int delta )
{
vg_assert(delta >= -128 && delta <= 127);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x70 + (UInt)cond );
VG_(emitB) ( (UChar)delta );
if (dis)
@@ -1002,7 +1002,7 @@
{
Int off = 4 * VGOFF_(m_eflags);
vg_assert(off >= 0 && off < 128);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xFF ); /* PUSHL off(%ebp) */
VG_(emitB) ( 0x75 );
VG_(emitB) ( off );
@@ -1015,7 +1015,7 @@
{
Int off = 4 * VGOFF_(m_eflags);
vg_assert(off >= 0 && off < 128);
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x9C ); /* PUSHFL */
VG_(emitB) ( 0x8F ); /* POPL vg_m_state.m_eflags */
VG_(emitB) ( 0x45 );
@@ -1026,7 +1026,7 @@
static void emit_setb_reg ( Int reg, Condcode cond )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F ); VG_(emitB) ( 0x90 + (UChar)cond );
VG_(emit_amode_ereg_greg) ( reg, 0 );
if (dis)
@@ -1036,7 +1036,7 @@
static void emit_ret ( void )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0xC3 ); /* RET */
if (dis)
VG_(printf)("\n\t\tret\n");
@@ -1044,7 +1044,7 @@
void VG_(emit_pushal) ( void )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x60 ); /* PUSHAL */
if (dis)
VG_(printf)("\n\t\tpushal\n");
@@ -1052,7 +1052,7 @@
void VG_(emit_popal) ( void )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x61 ); /* POPAL */
if (dis)
VG_(printf)("\n\t\tpopal\n");
@@ -1060,7 +1060,7 @@
static void emit_lea_litreg_reg ( UInt lit, Int regmem, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x8D ); /* LEA M,Gv */
VG_(emit_amode_offregmem_reg) ( (Int)lit, regmem, reg );
if (dis)
@@ -1071,7 +1071,7 @@
static void emit_lea_sib_reg ( UInt lit, Int scale,
Int regbase, Int regindex, Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x8D ); /* LEA M,Gv */
emit_amode_sib_reg ( (Int)lit, scale, regbase, regindex, reg );
if (dis)
@@ -1083,7 +1083,7 @@
void VG_(emit_AMD_prefetch_reg) ( Int reg )
{
- VG_(newEmit)();
+ VG_(new_emit)();
VG_(emitB) ( 0x0F );
VG_(emitB) ( 0x0D );
emit_amode_regmem_reg ( reg, 1 /* 0 is prefetch; 1 is prefetchw */ );
@@ -1286,8 +1286,8 @@
ranges, but you miss this if you don't consider what happens during
the UInstr.) */
# define PRESERVE_REG(realReg) \
- (IS_RREG_LIVE(VG_(realRegNumToRank)(realReg), regs_live_before) && \
- IS_RREG_LIVE(VG_(realRegNumToRank)(realReg), regs_live_after) && \
+ (IS_RREG_LIVE(VG_(realreg_to_rank)(realReg), regs_live_before) && \
+ IS_RREG_LIVE(VG_(realreg_to_rank)(realReg), regs_live_after) && \
ret_reg != realReg)
preserve_eax = PRESERVE_REG(R_EAX);
@@ -1880,7 +1880,7 @@
/* Return the byte offset from %ebp (ie, into baseBlock)
for the specified shadow register */
-Int VG_(shadowRegOffset) ( Int arch )
+Int VG_(shadow_reg_offset) ( Int arch )
{
switch (arch) {
case R_EAX: return 4 * VGOFF_(sh_eax);
@@ -1895,7 +1895,7 @@
}
}
-Int VG_(shadowFlagsOffset) ( void )
+Int VG_(shadow_flags_offset) ( void )
{
return 4 * VGOFF_(sh_eflags);
}
@@ -1953,7 +1953,7 @@
UInstr* u = &cb->instrs[i];
if (dis)
- VG_(ppUInstrWithRegs)(i, u);
+ VG_(pp_UInstr_regs)(i, u);
# if 0
if (0&& VG_(translations_done) >= 600) {
@@ -2225,7 +2225,7 @@
case BSWAP:
vg_assert(u->tag1 == RealReg);
vg_assert(u->size == 4);
- vg_assert(!VG_(anyFlagUse)(u));
+ vg_assert(!VG_(any_flag_use)(u));
emit_bswapl_reg ( u->val1 );
break;
@@ -2327,7 +2327,7 @@
case CC2VAL:
vg_assert(u->tag1 == RealReg);
vg_assert(u->tag2 == NoValue);
- vg_assert(VG_(anyFlagUse)(u));
+ vg_assert(VG_(any_flag_use)(u));
synth_setb_reg ( u->val1, u->cond );
break;
@@ -2353,13 +2353,13 @@
default:
if (VG_(needs).extended_UCode)
- SK_(emitExtUInstr)(u, regs_live_before);
+ SK_(emit_XUInstr)(u, regs_live_before);
else {
VG_(printf)("\nError:\n"
" unhandled opcode: %u. Perhaps "
" VG_(needs).extended_UCode should be set?\n",
u->opcode);
- VG_(ppUInstr)(0,u);
+ VG_(pp_UInstr)(0,u);
VG_(panic)("emitUInstr: unimplemented opcode");
}
}
@@ -2392,7 +2392,7 @@
Bool sane = VG_(saneUInstr)( False, False, u );
if (!sane) {
VG_(printf)("\ninsane instruction\n");
- VG_(upUInstr)( i, u );
+ VG_(up_UInstr)( i, u );
}
vg_assert(sane);
emitUInstr( cb, i, regs_live_before );
diff --git a/coregrind/vg_instrument.c b/coregrind/vg_instrument.c
index 9a062ee..9f787eb 100644
--- a/coregrind/vg_instrument.c
+++ b/coregrind/vg_instrument.c
@@ -38,21 +38,21 @@
couldn't otherwise do. */
#include "vg_skin.h"
-#define uInstr0 VG_(newUInstr0)
-#define uInstr1 VG_(newUInstr1)
-#define uInstr2 VG_(newUInstr2)
-#define uLiteral VG_(setLiteralField)
-#define uCCall VG_(setCCallFields)
-#define newTemp VG_(getNewTemp)
+#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_(callHelper_0_0)(UCodeBlock* cb, Addr f)
+void VG_(call_helper_0_0)(UCodeBlock* cb, Addr f)
{
uInstr0(cb, CCALL, 0);
uCCall(cb, f, 0, 0, 0);
}
-void VG_(callHelper_1_0)(UCodeBlock* cb, Addr f, UInt arg1, UInt regparms_n)
+void VG_(call_helper_1_0)(UCodeBlock* cb, Addr f, UInt arg1, UInt regparms_n)
{
UInt t1 = newTemp(cb);
@@ -63,7 +63,7 @@
uCCall(cb, f, 1, regparms_n, 0);
}
-void VG_(callHelper_2_0)(UCodeBlock* cb, Addr f, UInt arg1, UInt arg2,
+void VG_(call_helper_2_0)(UCodeBlock* cb, Addr f, UInt arg1, UInt arg2,
UInt regparms_n)
{
UInt t1 = newTemp(cb);
diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c
index 3fe6032..25388ca 100644
--- a/coregrind/vg_mylibc.c
+++ b/coregrind/vg_mylibc.c
@@ -932,7 +932,7 @@
/* Keep track of recursion depth. */
static Int recDepth;
-static Bool stringMatch_wrk ( Char* pat, Char* str )
+static Bool string_match_wrk ( Char* pat, Char* str )
{
vg_assert(recDepth >= 0 && recDepth < 250);
recDepth++;
@@ -940,7 +940,7 @@
switch (*pat) {
case '\0' : return (*str=='\0');
case '*' : do {
- if (stringMatch_wrk(pat+1,str)) {
+ if (string_match_wrk(pat+1,str)) {
recDepth--;
return True;
}
@@ -967,11 +967,11 @@
}
}
-Bool VG_(stringMatch) ( Char* pat, Char* str )
+Bool VG_(string_match) ( Char* pat, Char* str )
{
Bool b;
recDepth = 0;
- b = stringMatch_wrk ( pat, str );
+ b = string_match_wrk ( pat, str );
/*
VG_(printf)("%s %s %s\n",
b?"TRUE ":"FALSE", pat, str);
diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c
index 8b14ff4..a81ac0f 100644
--- a/coregrind/vg_to_ucode.c
+++ b/coregrind/vg_to_ucode.c
@@ -36,14 +36,14 @@
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define uInstr0 VG_(newUInstr0)
-#define uInstr1 VG_(newUInstr1)
-#define uInstr2 VG_(newUInstr2)
-#define uInstr3 VG_(newUInstr3)
-#define nameIReg VG_(nameOfIntReg)
-#define nameISize VG_(nameOfIntSize)
-#define newTemp VG_(getNewTemp)
-#define uLiteral VG_(setLiteralField)
+#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 newTemp VG_(get_new_temp)
+#define uLiteral VG_(set_lit_field)
#define dis VG_(print_codegen)
@@ -52,14 +52,14 @@
/*------------------------------------------------------------*/
/* Allocate a new temp reg number. */
-__inline__ Int VG_(getNewTemp) ( UCodeBlock* cb )
+__inline__ Int VG_(get_new_temp) ( UCodeBlock* cb )
{
Int t = cb->nextTemp;
cb->nextTemp += 2;
return t;
}
-Int VG_(getNewShadow) ( UCodeBlock* cb )
+Int VG_(get_new_shadow) ( UCodeBlock* cb )
{
Int t = cb->nextTemp;
cb->nextTemp += 2;
@@ -112,7 +112,7 @@
return grp8_names[opc_aux];
}
-Char* VG_(nameOfIntReg) ( Int size, Int reg )
+Char* VG_(name_of_int_reg) ( Int size, Int reg )
{
static Char* ireg32_names[8]
= { "%eax", "%ecx", "%edx", "%ebx",
@@ -128,17 +128,17 @@
case 1: return ireg8_names[reg];
}
bad:
- VG_(panic)("nameOfIntReg");
+ VG_(panic)("name_of_int_reg");
return NULL; /*notreached*/
}
-Char VG_(nameOfIntSize) ( Int size )
+Char VG_(name_of_int_size) ( Int size )
{
switch (size) {
case 4: return 'l';
case 2: return 'w';
case 1: return 'b';
- default: VG_(panic)("nameOfIntSize");
+ default: VG_(panic)("name_of_int_size");
}
}
@@ -238,7 +238,7 @@
static __inline__ void uFlagsRWU ( UCodeBlock* cb,
FlagSet rr, FlagSet ww, FlagSet uu )
{
- VG_(setFlagRW)(
+ VG_(set_flag_RW)(
&LAST_UINSTR(cb), rr, VG_UNION_FLAG_SETS(ww,uu)
);
}
@@ -265,7 +265,7 @@
uFlagsRWU(cb, FlagsEmpty, FlagsEmpty, FlagsEmpty); break;
default:
VG_(printf)("unhandled case is %s\n",
- VG_(nameUOpcode)(True, uopc));
+ VG_(name_UOpcode)(True, uopc));
VG_(panic)("setFlagsFromUOpcode: unhandled case");
}
}
@@ -4473,9 +4473,9 @@
for (; first_uinstr < cb->used; first_uinstr++) {
Bool sane = VG_(saneUInstr)(True, True, &cb->instrs[first_uinstr]);
if (dis)
- VG_(ppUInstr)(first_uinstr, &cb->instrs[first_uinstr]);
+ VG_(pp_UInstr)(first_uinstr, &cb->instrs[first_uinstr]);
else if (!sane)
- VG_(upUInstr)(-1, &cb->instrs[first_uinstr]);
+ VG_(up_UInstr)(-1, &cb->instrs[first_uinstr]);
vg_assert(sane);
}
@@ -4514,7 +4514,7 @@
uLiteral(cb, eip);
uCond(cb, CondAlways);
/* Print added JMP */
- if (dis) VG_(ppUInstr)(cb->used-1, &cb->instrs[cb->used-1]);
+ if (dis) VG_(pp_UInstr)(cb->used-1, &cb->instrs[cb->used-1]);
}
if (dis) VG_(printf)("\n");
delta = eip - eip0;
@@ -4535,13 +4535,13 @@
uLiteral(cb, eip);
uCond(cb, CondAlways);
/* Print added JMP */
- if (dis) VG_(ppUInstr)(cb->used-1, &cb->instrs[cb->used-1]);
+ if (dis) VG_(pp_UInstr)(cb->used-1, &cb->instrs[cb->used-1]);
isEnd = True;
} else if (!isEnd) {
uInstr1(cb, INCEIP, 0, Lit16, delta);
/* Print added INCEIP */
- if (dis) VG_(ppUInstr)(cb->used-1, &cb->instrs[cb->used-1]);
+ if (dis) VG_(pp_UInstr)(cb->used-1, &cb->instrs[cb->used-1]);
}
if (dis) VG_(printf)("\n");
}
@@ -4552,7 +4552,7 @@
block_sane = VG_(saneUCodeBlockCalls)(cb);
if (!block_sane) {
- VG_(ppUCodeBlock)(cb, "block failing sanity check");
+ VG_(pp_UCodeBlock)(cb, "block failing sanity check");
vg_assert(block_sane);
}
diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c
index cd52c65..840b570 100644
--- a/coregrind/vg_translate.c
+++ b/coregrind/vg_translate.c
@@ -35,9 +35,9 @@
/*--- Renamings of frequently-used global functions. ---*/
/*------------------------------------------------------------*/
-#define uInstr2 VG_(newUInstr2)
-#define nameIReg VG_(nameOfIntReg)
-#define nameISize VG_(nameOfIntSize)
+#define uInstr2 VG_(new_UInstr2)
+#define nameIReg VG_(name_of_int_reg)
+#define nameISize VG_(name_of_int_size)
#define dis VG_(print_codegen)
@@ -45,7 +45,7 @@
/*--- Basics ---*/
/*------------------------------------------------------------*/
-UCodeBlock* VG_(allocCodeBlock) ( void )
+UCodeBlock* VG_(alloc_UCodeBlock) ( void )
{
UCodeBlock* cb = VG_(arena_malloc)(VG_AR_CORE, sizeof(UCodeBlock));
cb->used = cb->size = cb->nextTemp = 0;
@@ -54,7 +54,7 @@
}
-void VG_(freeCodeBlock) ( UCodeBlock* cb )
+void VG_(free_UCodeBlock) ( UCodeBlock* cb )
{
if (cb->instrs) VG_(arena_free)(VG_AR_CORE, cb->instrs);
VG_(arena_free)(VG_AR_CORE, cb);
@@ -88,7 +88,7 @@
__inline__
-void VG_(newNOP) ( UInstr* u )
+void VG_(new_NOP) ( UInstr* u )
{
u->val1 = u->val2 = u->val3 = 0;
u->tag1 = u->tag2 = u->tag3 = NoValue;
@@ -108,7 +108,7 @@
/* Add an instruction to a ucode block, and return the index of the
instruction. */
__inline__
-void VG_(newUInstr3) ( UCodeBlock* cb, Opcode opcode, Int sz,
+void VG_(new_UInstr3) ( UCodeBlock* cb, Opcode opcode, Int sz,
Tag tag1, UInt val1,
Tag tag2, UInt val2,
Tag tag3, UInt val3 )
@@ -117,7 +117,7 @@
ensureUInstr(cb);
ui = & cb->instrs[cb->used];
cb->used++;
- VG_(newNOP)(ui);
+ VG_(new_NOP)(ui);
ui->val1 = val1;
ui->val2 = val2;
ui->val3 = val3;
@@ -133,7 +133,7 @@
__inline__
-void VG_(newUInstr2) ( UCodeBlock* cb, Opcode opcode, Int sz,
+void VG_(new_UInstr2) ( UCodeBlock* cb, Opcode opcode, Int sz,
Tag tag1, UInt val1,
Tag tag2, UInt val2 )
{
@@ -141,7 +141,7 @@
ensureUInstr(cb);
ui = & cb->instrs[cb->used];
cb->used++;
- VG_(newNOP)(ui);
+ VG_(new_NOP)(ui);
ui->val1 = val1;
ui->val2 = val2;
ui->opcode = opcode;
@@ -154,14 +154,14 @@
__inline__
-void VG_(newUInstr1) ( UCodeBlock* cb, Opcode opcode, Int sz,
+void VG_(new_UInstr1) ( UCodeBlock* cb, Opcode opcode, Int sz,
Tag tag1, UInt val1 )
{
UInstr* ui;
ensureUInstr(cb);
ui = & cb->instrs[cb->used];
cb->used++;
- VG_(newNOP)(ui);
+ VG_(new_NOP)(ui);
ui->val1 = val1;
ui->opcode = opcode;
ui->tag1 = tag1;
@@ -171,20 +171,20 @@
__inline__
-void VG_(newUInstr0) ( UCodeBlock* cb, Opcode opcode, Int sz )
+void VG_(new_UInstr0) ( UCodeBlock* cb, Opcode opcode, Int sz )
{
UInstr* ui;
ensureUInstr(cb);
ui = & cb->instrs[cb->used];
cb->used++;
- VG_(newNOP)(ui);
+ VG_(new_NOP)(ui);
ui->opcode = opcode;
ui->size = sz;
}
/* Copy an instruction into the given codeblock. */
__inline__
-void VG_(copyUInstr) ( UCodeBlock* cb, UInstr* instr )
+void VG_(copy_UInstr) ( UCodeBlock* cb, UInstr* instr )
{
ensureUInstr(cb);
cb->instrs[cb->used] = *instr;
@@ -209,9 +209,9 @@
/* Set the flag R/W sets on a uinstr. */
-void VG_(setFlagRW) ( UInstr* u, FlagSet fr, FlagSet fw )
+void VG_(set_flag_RW) ( UInstr* u, FlagSet fr, FlagSet fw )
{
- /* VG_(ppUInstr)(-1,u); */
+ /* VG_(pp_UInstr)(-1,u); */
vg_assert(fr == (fr & FlagsALL));
vg_assert(fw == (fw & FlagsALL));
u->flags_r = fr;
@@ -220,15 +220,15 @@
/* Set the lit32 field of the most recent uinsn. */
-void VG_(setLiteralField) ( UCodeBlock* cb, UInt lit32 )
+void VG_(set_lit_field) ( UCodeBlock* cb, UInt lit32 )
{
LAST_UINSTR(cb).lit32 = lit32;
}
/* Set the C call info fields of the most recent uinsn. */
-void VG_(setCCallFields) ( UCodeBlock* cb, Addr fn, UChar argc, UChar
- regparms_n, Bool has_ret_val )
+void VG_(set_ccall_fields) ( UCodeBlock* cb, Addr fn, UChar argc, UChar
+ regparms_n, Bool has_ret_val )
{
vg_assert(argc < 4);
vg_assert(regparms_n <= argc);
@@ -238,7 +238,7 @@
LAST_UINSTR(cb).has_ret_val = has_ret_val;
}
-Bool VG_(anyFlagUse) ( UInstr* u )
+Bool VG_(any_flag_use) ( UInstr* u )
{
return (u->flags_r != FlagsEmpty
|| u->flags_w != FlagsEmpty);
@@ -258,7 +258,7 @@
a problem, except the generated code will obviously be worse).
*/
__inline__
-Int VG_(rankToRealRegNum) ( Int rank )
+Int VG_(rank_to_realreg) ( Int rank )
{
switch (rank) {
# ifdef BEST_ALLOC_ORDER
@@ -278,15 +278,15 @@
case 1: return R_ESI;
case 0: return R_EDI;
# endif
- default: VG_(panic)("VG_(rankToRealRegNum)");
+ default: VG_(panic)("VG_(rank_to_realreg)");
}
}
/* Convert an Intel register number into a rank in the range 0 ..
- VG_MAX_REALREGS-1. See related comments for rankToRealRegNum()
+ VG_MAX_REALREGS-1. See related comments for rank_to_realreg()
above. */
__inline__
-Int VG_(realRegNumToRank) ( Int realReg )
+Int VG_(realreg_to_rank) ( Int realReg )
{
switch (realReg) {
# ifdef BEST_ALLOC_ORDER
@@ -304,7 +304,7 @@
case R_ESI: return 1;
case R_EDI: return 0;
# endif
- default: VG_(panic)("VG_(realRegNumToRank)");
+ default: VG_(panic)("VG_(realreg_to_rank)");
}
}
@@ -523,7 +523,7 @@
u->regparms_n <= u->argc && XCCALL;
default:
if (VG_(needs).extended_UCode)
- return SK_(saneExtUInstr)(beforeRA, beforeLiveness, u);
+ return SK_(sane_XUInstr)(beforeRA, beforeLiveness, u);
else {
VG_(printf)("unhandled opcode: %u. Perhaps "
"VG_(needs).extended_UCode should be set?",
@@ -592,7 +592,7 @@
Bool sane = VG_(saneUInstr)(True, True, &cb->instrs[i]);
if (!sane) {
VG_(printf)("Instruction failed sanity check:\n");
- VG_(upUInstr)(i, &cb->instrs[i]);
+ VG_(up_UInstr)(i, &cb->instrs[i]);
}
vg_assert(sane);
}
@@ -735,14 +735,14 @@
}
-void VG_(ppUOperand) ( UInstr* u, Int operandNo, Int sz, Bool parens )
+void VG_(pp_UOperand) ( UInstr* u, Int operandNo, Int sz, Bool parens )
{
UInt tag, val;
switch (operandNo) {
case 1: tag = u->tag1; val = u->val1; break;
case 2: tag = u->tag2; val = u->val2; break;
case 3: tag = u->tag3; val = u->val3; break;
- default: VG_(panic)("VG_(ppUOperand)(1)");
+ default: VG_(panic)("VG_(pp_UOperand)(1)");
}
if (tag == Literal) val = u->lit32;
@@ -755,13 +755,13 @@
case NoValue: VG_(printf)("NoValue"); break;
case ArchReg: VG_(printf)("%S",nameIReg(sz,val)); break;
case SpillNo: VG_(printf)("spill%d", val); break;
- default: VG_(panic)("VG_(ppUOperand)(2)");
+ default: VG_(panic)("VG_(pp_UOperand)(2)");
}
if (parens) VG_(printf)(")");
}
-Char* VG_(nameUOpcode) ( Bool upper, Opcode opc )
+Char* VG_(name_UOpcode) ( Bool upper, Opcode opc )
{
switch (opc) {
case ADD: return (upper ? "ADD" : "add");
@@ -785,7 +785,7 @@
case BSWAP: return (upper ? "BSWAP" : "bswap");
default: break;
}
- if (!upper) VG_(panic)("vg_nameUOpcode: invalid !upper");
+ if (!upper) VG_(panic)("vg_name_UOpcode: invalid !upper");
switch (opc) {
case CALLM_S: return "CALLM_S";
case CALLM_E: return "CALLM_E";
@@ -815,20 +815,20 @@
case FPU: return "FPU" ;
default:
if (VG_(needs).extended_UCode)
- return SK_(nameExtUOpcode)(opc);
+ return SK_(name_XUOpcode)(opc);
else {
VG_(printf)("unhandled opcode: %u. Perhaps "
"VG_(needs).extended_UCode should be set?",
opc);
- VG_(panic)("nameUOpcode: unhandled opcode");
+ VG_(panic)("name_UOpcode: unhandled opcode");
}
}
}
-void ppRealRegsLiveness ( UInstr* u )
+void pp_realregs_liveness ( UInstr* u )
{
# define PRINT_RREG_LIVENESS(realReg,s) \
- VG_(printf)( IS_RREG_LIVE(VG_(realRegNumToRank)(realReg), \
+ VG_(printf)( IS_RREG_LIVE(VG_(realreg_to_rank)(realReg), \
u->regs_live_after) \
? s : "-");
@@ -845,9 +845,9 @@
}
/* Ugly-print UInstr :) */
-void VG_(upUInstr) ( Int i, UInstr* u )
+void VG_(up_UInstr) ( Int i, UInstr* u )
{
- VG_(ppUInstrWithRegs)(i, u);
+ VG_(pp_UInstr_regs)(i, u);
VG_(printf)("opcode: %d\n", u->opcode);
VG_(printf)("lit32: %x\n", u->lit32);
@@ -863,14 +863,14 @@
VG_(printf)("argc,regparms_n: %d, %d\n", u->argc, u->regparms_n);
VG_(printf)("has_ret_val: %d\n", u->has_ret_val);
VG_(printf)("regs_live_after: ");
- ppRealRegsLiveness(u);
+ pp_realregs_liveness(u);
VG_(printf)("\n");
}
-void ppUInstrWorker ( Int instrNo, UInstr* u, Bool ppRegsLiveness )
+void pp_UInstrWorker ( Int instrNo, UInstr* u, Bool ppRegsLiveness )
{
VG_(printf)("\t%4d: %s", instrNo,
- VG_(nameUOpcode)(True, u->opcode));
+ VG_(name_UOpcode)(True, u->opcode));
if (u->opcode == JMP || u->opcode == CC2VAL)
VG_(printf)("%s", VG_(nameCondcode(u->cond)));
@@ -894,18 +894,18 @@
case LEA2:
VG_(printf)("\t%d(" , u->lit32);
- VG_(ppUOperand)(u, 1, 4, False);
+ VG_(pp_UOperand)(u, 1, 4, False);
VG_(printf)(",");
- VG_(ppUOperand)(u, 2, 4, False);
+ VG_(pp_UOperand)(u, 2, 4, False);
VG_(printf)(",%d), ", (Int)u->extra4b);
- VG_(ppUOperand)(u, 3, 4, False);
+ VG_(pp_UOperand)(u, 3, 4, False);
break;
case LEA1:
VG_(printf)("\t%d" , u->lit32);
- VG_(ppUOperand)(u, 1, 4, True);
+ VG_(pp_UOperand)(u, 1, 4, True);
VG_(printf)(", ");
- VG_(ppUOperand)(u, 2, 4, False);
+ VG_(pp_UOperand)(u, 2, 4, False);
break;
case NOP:
@@ -914,12 +914,12 @@
case FPU_W:
VG_(printf)("\t0x%x:0x%x, ",
(u->val1 >> 8) & 0xFF, u->val1 & 0xFF );
- VG_(ppUOperand)(u, 2, 4, True);
+ VG_(pp_UOperand)(u, 2, 4, True);
break;
case FPU_R:
VG_(printf)("\t");
- VG_(ppUOperand)(u, 2, 4, True);
+ VG_(pp_UOperand)(u, 2, 4, True);
VG_(printf)(", 0x%x:0x%x",
(u->val1 >> 8) & 0xFF, u->val1 & 0xFF );
break;
@@ -931,9 +931,9 @@
case GET: case PUT: case MOV: case LOAD: case STORE: case CMOV:
VG_(printf)("\t");
- VG_(ppUOperand)(u, 1, u->size, u->opcode==LOAD);
+ VG_(pp_UOperand)(u, 1, u->size, u->opcode==LOAD);
VG_(printf)(", ");
- VG_(ppUOperand)(u, 2, u->size, u->opcode==STORE);
+ VG_(pp_UOperand)(u, 2, u->size, u->opcode==STORE);
break;
case JMP:
@@ -945,7 +945,7 @@
default: break;
}
VG_(printf)("\t");
- VG_(ppUOperand)(u, 1, u->size, False);
+ VG_(pp_UOperand)(u, 1, u->size, False);
if (CondAlways == u->cond) {
/* Print x86 instruction size if filled in */
if (0 != u->extra4b)
@@ -957,31 +957,31 @@
case CC2VAL: case PUSH: case POP: case CLEAR: case CALLM:
case NOT: case NEG: case INC: case DEC: case BSWAP:
VG_(printf)("\t");
- VG_(ppUOperand)(u, 1, u->size, False);
+ VG_(pp_UOperand)(u, 1, u->size, False);
break;
/* Print a "(s)" after args passed on stack */
case CCALL:
VG_(printf)("\t");
if (u->has_ret_val) {
- VG_(ppUOperand)(u, 3, 0, False);
+ VG_(pp_UOperand)(u, 3, 0, False);
VG_(printf)(" = ");
}
VG_(printf)("%p(", u->lit32);
if (u->argc > 0) {
- VG_(ppUOperand)(u, 1, 0, False);
+ VG_(pp_UOperand)(u, 1, 0, False);
if (u->regparms_n < 1)
VG_(printf)("(s)");
}
if (u->argc > 1) {
VG_(printf)(", ");
- VG_(ppUOperand)(u, 2, 0, False);
+ VG_(pp_UOperand)(u, 2, 0, False);
if (u->regparms_n < 2)
VG_(printf)("(s)");
}
if (u->argc > 2) {
VG_(printf)(", ");
- VG_(ppUOperand)(u, 3, 0, False);
+ VG_(pp_UOperand)(u, 3, 0, False);
if (u->regparms_n < 3)
VG_(printf)("(s)");
}
@@ -994,26 +994,26 @@
case SHL: case SHR: case SAR:
case ROL: case ROR: case RCL: case RCR:
VG_(printf)("\t");
- VG_(ppUOperand)(u, 1, u->size, False);
+ VG_(pp_UOperand)(u, 1, u->size, False);
VG_(printf)(", ");
- VG_(ppUOperand)(u, 2, u->size, False);
+ VG_(pp_UOperand)(u, 2, u->size, False);
break;
case WIDEN:
VG_(printf)("_%c%c", VG_(toupper)(nameISize(u->extra4b)),
u->signed_widen?'s':'z');
VG_(printf)("\t");
- VG_(ppUOperand)(u, 1, u->size, False);
+ VG_(pp_UOperand)(u, 1, u->size, False);
break;
default:
if (VG_(needs).extended_UCode)
- SK_(ppExtUInstr)(u);
+ SK_(pp_XUInstr)(u);
else {
VG_(printf)("unhandled opcode: %u. Perhaps "
"VG_(needs).extended_UCode should be set?",
u->opcode);
- VG_(panic)("ppUInstr: unhandled opcode");
+ VG_(panic)("pp_UInstr: unhandled opcode");
}
}
if (u->flags_r != FlagsEmpty || u->flags_w != FlagsEmpty) {
@@ -1027,29 +1027,29 @@
if (ppRegsLiveness) {
VG_(printf)("\t\t");
- ppRealRegsLiveness ( u );
+ pp_realregs_liveness ( u );
}
VG_(printf)("\n");
}
-void VG_(ppUInstr) ( Int instrNo, UInstr* u )
+void VG_(pp_UInstr) ( Int instrNo, UInstr* u )
{
- ppUInstrWorker ( instrNo, u, /*ppRegsLiveness*/False );
+ pp_UInstrWorker ( instrNo, u, /*ppRegsLiveness*/False );
}
-void VG_(ppUInstrWithRegs) ( Int instrNo, UInstr* u )
+void VG_(pp_UInstr_regs) ( Int instrNo, UInstr* u )
{
- ppUInstrWorker ( instrNo, u, /*ppRegsLiveness*/True );
+ pp_UInstrWorker ( instrNo, u, /*ppRegsLiveness*/True );
}
-void VG_(ppUCodeBlock) ( UCodeBlock* cb, Char* title )
+void VG_(pp_UCodeBlock) ( UCodeBlock* cb, Char* title )
{
Int i;
VG_(printf)("%s\n", title);
for (i = 0; i < cb->used; i++)
if (cb->instrs[i].opcode != NOP)
- VG_(ppUInstr) ( i, &cb->instrs[i] );
+ VG_(pp_UInstr) ( i, &cb->instrs[i] );
VG_(printf)("\n");
}
@@ -1068,7 +1068,7 @@
TempRegs or RealRegs.
*/
__inline__
-Int VG_(getRegUsage) ( UInstr* u, Tag tag, RegUse* arr )
+Int VG_(get_reg_usage) ( UInstr* u, Tag tag, RegUse* arr )
{
# define RD(ono) VG_UINSTR_READS_REG(ono)
# define WR(ono) VG_UINSTR_WRITES_REG(ono)
@@ -1123,12 +1123,12 @@
default:
if (VG_(needs).extended_UCode)
- return SK_(getExtRegUsage)(u, tag, arr);
+ return SK_(get_Xreg_usage)(u, tag, arr);
else {
VG_(printf)("unhandled opcode: %u. Perhaps "
"VG_(needs).extended_UCode should be set?",
u->opcode);
- VG_(panic)("VG_(getRegUsage): unhandled opcode");
+ VG_(panic)("VG_(get_reg_usage): unhandled opcode");
}
}
return n;
@@ -1223,7 +1223,7 @@
return -1;
default:
- VG_(ppUInstr)(0,u);
+ VG_(pp_UInstr)(0,u);
VG_(panic)("maybe_uinstrReadsArchReg: unhandled opcode");
}
}
@@ -1233,7 +1233,7 @@
{
Int i, k;
RegUse tempUse[3];
- k = VG_(getRegUsage) ( u, TempReg, &tempUse[0] );
+ k = VG_(get_reg_usage) ( u, TempReg, &tempUse[0] );
for (i = 0; i < k; i++)
if (tempUse[i].num == tempreg)
return True;
@@ -1284,7 +1284,7 @@
for (i = cb->used-1; i >= 0; i--) {
u = &cb->instrs[i];
- k = VG_(getRegUsage)(u, TempReg, &tempUse[0]);
+ k = VG_(get_reg_usage)(u, TempReg, &tempUse[0]);
/* For each temp usage ... bwds in program order. */
for (j = k-1; j >= 0; j--) {
@@ -1325,7 +1325,7 @@
out here. Annul this GET, rename tr to told for the
rest of the block, and extend told's live range to that
of tr. */
- VG_(newNOP)(u);
+ VG_(new_NOP)(u);
n = last_live_before[tr] + 1;
if (n > cb->used) n = cb->used;
last_live_before[told] = last_live_before[tr];
@@ -1390,7 +1390,7 @@
}
/* boring insn; invalidate any mappings to temps it writes */
- k = VG_(getRegUsage)(u, TempReg, &tempUse[0]);
+ k = VG_(get_reg_usage)(u, TempReg, &tempUse[0]);
for (j = 0; j < k; j++) {
wr = tempUse[j].isWrite;
@@ -1422,7 +1422,7 @@
actual_areg = containingArchRegOf ( 4, u->val2 );
if (annul_put[actual_areg]) {
vg_assert(actual_areg != R_ESP);
- VG_(newNOP)(u);
+ VG_(new_NOP)(u);
if (dis)
VG_(printf)(" at %2d: delete PUT\n", i );
} else {
@@ -1453,7 +1453,7 @@
Further modifies the last_live_before map. */
# if 0
- VG_(ppUCodeBlock)(cb, "Before MOV elimination" );
+ VG_(pp_UCodeBlock)(cb, "Before MOV elimination" );
for (i = 0; i < cb->nextTemp; i++)
VG_(printf)("llb[t%d]=%d ", i, last_live_before[i]);
VG_(printf)("\n");
@@ -1480,7 +1480,7 @@
}
last_live_before[u->val1] = last_live_before[u->val2];
last_live_before[u->val2] = i-1;
- VG_(newNOP)(u);
+ VG_(new_NOP)(u);
}
}
@@ -1541,7 +1541,7 @@
if (dis) {
VG_(printf)("\n");
- VG_(ppUCodeBlock) ( cb, "Improved UCode:" );
+ VG_(pp_UCodeBlock) ( cb, "Improved UCode:" );
}
}
@@ -1623,7 +1623,7 @@
/* Scan fwds to establish live ranges. */
for (i = 0; i < c1->used; i++) {
- k = VG_(getRegUsage)(&c1->instrs[i], TempReg, &tempUse[0]);
+ k = VG_(get_reg_usage)(&c1->instrs[i], TempReg, &tempUse[0]);
vg_assert(k >= 0 && k <= 3);
/* For each temp usage ... fwds in program order */
@@ -1717,7 +1717,7 @@
/* Resulting code goes here. We generate it all in a forwards
pass. */
- c2 = VG_(allocCodeBlock)();
+ c2 = VG_(alloc_UCodeBlock)();
/* At the start, no TempRegs are assigned to any real register.
Correspondingly, all temps claim to be currently resident in
@@ -1752,13 +1752,13 @@
# endif
if (dis)
- VG_(ppUInstr)(i, &c1->instrs[i]);
+ VG_(pp_UInstr)(i, &c1->instrs[i]);
/* First, free up enough real regs for this insn. This may
generate spill stores since we may have to evict some TempRegs
currently in real regs. Also generates spill loads. */
- k = VG_(getRegUsage)(&c1->instrs[i], TempReg, &tempUse[0]);
+ k = VG_(get_reg_usage)(&c1->instrs[i], TempReg, &tempUse[0]);
vg_assert(k >= 0 && k <= 3);
/* For each ***different*** temp mentioned in the insn .... */
@@ -1864,12 +1864,12 @@
temp_info[real_to_temp[r]].real_no = VG_NOTHING;
if (temp_info[real_to_temp[r]].dead_before > i) {
uInstr2(c2, PUT, 4,
- RealReg, VG_(rankToRealRegNum)(r),
+ RealReg, VG_(rank_to_realreg)(r),
SpillNo, temp_info[real_to_temp[r]].spill_no);
VG_(uinstrs_spill)++;
spill_reqd = True;
if (dis)
- VG_(ppUInstr)(c2->used-1, &LAST_UINSTR(c2));
+ VG_(pp_UInstr)(c2->used-1, &LAST_UINSTR(c2));
}
/* Decide if tno is read. */
@@ -1882,11 +1882,11 @@
if (isRead) {
uInstr2(c2, GET, 4,
SpillNo, temp_info[tno].spill_no,
- RealReg, VG_(rankToRealRegNum)(r) );
+ RealReg, VG_(rank_to_realreg)(r) );
VG_(uinstrs_spill)++;
spill_reqd = True;
if (dis)
- VG_(ppUInstr)(c2->used-1, &LAST_UINSTR(c2));
+ VG_(pp_UInstr)(c2->used-1, &LAST_UINSTR(c2));
}
/* Update the forwards and backwards maps. */
@@ -1899,12 +1899,12 @@
and use patchUInstr to convert its rTempRegs into
realregs. */
for (j = 0; j < k; j++)
- realUse[j] = VG_(rankToRealRegNum)(temp_info[tempUse[j].num].real_no);
- VG_(copyUInstr)(c2, &c1->instrs[i]);
+ realUse[j] = VG_(rank_to_realreg)(temp_info[tempUse[j].num].real_no);
+ VG_(copy_UInstr)(c2, &c1->instrs[i]);
patchUInstr(&LAST_UINSTR(c2), &tempUse[0], &realUse[0], k);
if (dis) {
- VG_(ppUInstr)(c2->used-1, &LAST_UINSTR(c2));
+ VG_(pp_UInstr)(c2->used-1, &LAST_UINSTR(c2));
VG_(printf)("\n");
}
}
@@ -1912,7 +1912,7 @@
if (temp_info != NULL)
VG_(arena_free)(VG_AR_JITTER, temp_info);
- VG_(freeCodeBlock)(c1);
+ VG_(free_UCodeBlock)(c1);
if (spill_reqd)
VG_(translations_needing_spill)++;
@@ -1939,14 +1939,14 @@
u->regs_live_after = rregs_live;
- k = VG_(getRegUsage)(u, RealReg, regUse);
+ k = VG_(get_reg_usage)(u, RealReg, regUse);
/* For each reg usage ... bwds in program order. Variable is live
before this UInstr if it is read by this UInstr.
Note that regUse[j].num holds the Intel reg number, so we must
convert it to our rank number. */
for (j = k-1; j >= 0; j--) {
- SET_RREG_LIVENESS ( VG_(realRegNumToRank)(regUse[j].num),
+ SET_RREG_LIVENESS ( VG_(realreg_to_rank)(regUse[j].num),
rregs_live,
!regUse[j].isWrite );
}
@@ -1985,7 +1985,7 @@
if (!debugging_translation)
VG_TRACK( pre_mem_read, Vg_CoreTranslate, tst, "", orig_addr, 1 );
- cb = VG_(allocCodeBlock)();
+ cb = VG_(alloc_UCodeBlock)();
/* If doing any code printing, print a basic block start marker */
if (VG_(clo_trace_codegen)) {
@@ -2022,7 +2022,7 @@
VGP_PUSHCC(VgpInstrument);
cb = SK_(instrument) ( cb, orig_addr );
if (VG_(print_codegen))
- VG_(ppUCodeBlock) ( cb, "Instrumented UCode:" );
+ VG_(pp_UCodeBlock) ( cb, "Instrumented UCode:" );
VG_(saneUCodeBlock)( cb );
VGP_POPCC(VgpInstrument);
@@ -2044,7 +2044,7 @@
VGP_PUSHCC(VgpFromUcode);
final_code = VG_(emit_code)(cb, &final_code_size );
VGP_POPCC(VgpFromUcode);
- VG_(freeCodeBlock)(cb);
+ VG_(free_UCodeBlock)(cb);
#undef DECIDE_IF_PRINTING_CODEGEN_FOR_PHASE