Renamed VG_(nameCondcode)() as VG_(name_UCondcode)() to make it consistent

with similar functions, and made it visible to skins (useful).

Also bumped up the skin interface minor version number due to this change; this
bumping will cover any other binary-compatible changes between now and the next
release (after 1.9.3).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1410
This commit is contained in:
Nicholas Nethercote 2003-02-03 11:17:46 +00:00
parent 4483794906
commit c8a14631c3
5 changed files with 16 additions and 23 deletions

View File

@ -1556,7 +1556,7 @@ void VG_(emit_jcondshort_delta) ( Bool simd_flags, Condcode cond, Int delta )
VG_(emitB) ( (UChar)delta );
if (dis)
VG_(printf)( "\n\t\tj%s-8\t%%eip+%d\n",
VG_(nameCondcode)(cond), delta );
VG_(name_UCondcode)(cond), delta );
}
/* Same as above, but defers emitting the delta */
@ -1567,7 +1567,7 @@ void VG_(emit_jcondshort_target) ( Bool simd, Condcode cond, Int *tgt )
VG_(emit_target_delta) (tgt);
if (dis)
VG_(printf)( "\n\t\tj%s-8\t%%eip+(%d)\n",
VG_(nameCondcode)(cond), tgt_addr(*tgt) );
VG_(name_UCondcode)(cond), tgt_addr(*tgt) );
}
@ -1579,7 +1579,7 @@ static void emit_setb_reg ( Bool simd, Int reg, Condcode cond )
VG_(emit_amode_ereg_greg) ( reg, 0 );
if (dis)
VG_(printf)("\n\t\tset%s %s\n",
VG_(nameCondcode)(cond), nameIReg(1,reg));
VG_(name_UCondcode)(cond), nameIReg(1,reg));
}
static void emit_ret ( void )
@ -2217,7 +2217,7 @@ static void synth_jcond_lit ( Condcode cond,
default:
VG_(printf)("synth_jcond_lit: unhandled simd case %d (%s)\n",
(Int)cond, VG_(nameCondcode)(cond) );
(Int)cond, VG_(name_UCondcode)(cond) );
VG_(core_panic)("synth_jcond_lit: unhandled simd case");
simple:

View File

@ -1085,7 +1085,6 @@ extern void VG_(translate) ( ThreadState* tst,
UInt* trans_size,
UShort jumps[VG_MAX_JUMPS]);
extern Char* VG_(nameCondcode) ( Condcode cond );
extern Bool VG_(saneUInstr) ( Bool beforeRA, Bool beforeLiveness,
UInstr* u );
extern void VG_(saneUCodeBlock) ( UCodeBlock* cb );

View File

@ -3016,7 +3016,7 @@ Addr dis_cmov_E_G ( UCodeBlock* cb,
uInstr2(cb, PUT, size, TempReg, tmpd, ArchReg, gregOfRM(rm));
if (dis) VG_(printf)("cmov%c%s %s,%s\n",
nameISize(size),
VG_(nameCondcode)(cond),
VG_(name_UCondcode)(cond),
nameIReg(size,eregOfRM(rm)),
nameIReg(size,gregOfRM(rm)));
return 1+eip0;
@ -3034,7 +3034,7 @@ Addr dis_cmov_E_G ( UCodeBlock* cb,
uInstr2(cb, PUT, size, TempReg, tmpd, ArchReg, gregOfRM(rm));
if (dis) VG_(printf)("cmov%c%s %s,%s\n",
nameISize(size),
VG_(nameCondcode)(cond),
VG_(name_UCondcode)(cond),
dis_buf,
nameIReg(size,gregOfRM(rm)));
return HI8(pair)+eip0;
@ -3539,7 +3539,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
/* The above 3 lines would be removed if the bb was not to end
here. */
if (dis)
VG_(printf)("j%s-8 0x%x\n", VG_(nameCondcode)(opc - 0x70), d32);
VG_(printf)("j%s-8 0x%x\n", VG_(name_UCondcode)(opc - 0x70), d32);
break;
case 0xE3: /* JECXZ or perhaps JCXZ, depending on OSO ? Intel
@ -4574,7 +4574,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
*isEnd = True;
if (dis)
VG_(printf)("j%s-32 0x%x\n",
VG_(nameCondcode)(opc - 0x80), d32);
VG_(name_UCondcode)(opc - 0x80), d32);
break;
/* =-=-=-=-=-=-=-=-=- RDTSC -=-=-=-=-=-=-=-=-=-=-= */
@ -4626,7 +4626,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
uFlagsRWU(cb, FlagsOSZACP, FlagsEmpty, FlagsEmpty);
uInstr2(cb, PUT, 1, TempReg, t1, ArchReg, eregOfRM(modrm));
if (dis) VG_(printf)("set%s %s\n",
VG_(nameCondcode)(opc-0x90),
VG_(name_UCondcode)(opc-0x90),
nameIReg(1,eregOfRM(modrm)));
} else {
pair = disAMode ( cb, sorb, eip, dis?dis_buf:NULL );
@ -4637,7 +4637,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
uFlagsRWU(cb, FlagsOSZACP, FlagsEmpty, FlagsEmpty);
uInstr2(cb, STORE, 1, TempReg, t1, TempReg, t2);
if (dis) VG_(printf)("set%s %s\n",
VG_(nameCondcode)(opc-0x90),
VG_(name_UCondcode)(opc-0x90),
dis_buf);
}
break;

View File

@ -712,7 +712,7 @@ Bool VG_(saneUCodeBlockCalls) ( UCodeBlock* cb )
/* Global that dictates whether to print generated code at all stages */
Bool VG_(print_codegen);
Char* VG_(nameCondcode) ( Condcode cond )
Char* VG_(name_UCondcode) ( Condcode cond )
{
switch (cond) {
case CondO: return "o";
@ -732,7 +732,7 @@ Char* VG_(nameCondcode) ( Condcode cond )
case CondLE: return "le";
case CondNLE: return "nle";
case CondAlways: return "MP"; /* hack! */
default: VG_(core_panic)("nameCondcode");
default: VG_(core_panic)("name_UCondcode");
}
}
@ -903,7 +903,7 @@ void pp_UInstrWorker ( Int instrNo, UInstr* u, Bool ppRegsLiveness )
VG_(printf)("\t%4d: %s", instrNo,
VG_(name_UOpcode)(True, u->opcode));
if (u->opcode == JMP || u->opcode == CC2VAL)
VG_(printf)("%s", VG_(nameCondcode(u->cond)));
VG_(printf)("%s", VG_(name_UCondcode)(u->cond));
switch (u->size) {
case 0: VG_(printf)("o"); break;

View File

@ -112,21 +112,14 @@ typedef unsigned char Bool;
/* The major version number indicates binary-incompatible changes to the
interface; if the core and skin major versions don't match, Valgrind
will abort. The minor version indicates binary-compatible changes.
We don't want the variables themselves in the core, only in the skins,
hence the #ifndef. But the core needs to know of their existence, hence
the #else branch. Phew.
In summary: skins don't need to do anything, the core works it all out.
*/
#define VG_CORE_INTERFACE_MAJOR_VERSION 1
#define VG_CORE_INTERFACE_MINOR_VERSION 1
#define VG_CORE_INTERFACE_MINOR_VERSION 2
extern const Int VG_(skin_interface_major_version);
extern const Int VG_(skin_interface_minor_version);
/* Every skin must define this macro somewhere, exactly once. */
/* Every skin must include this macro somewhere, exactly once. */
#define VG_DETERMINE_INTERFACE_VERSION \
const Int VG_(skin_interface_major_version) = VG_CORE_INTERFACE_MAJOR_VERSION; \
const Int VG_(skin_interface_minor_version) = VG_CORE_INTERFACE_MINOR_VERSION;
@ -833,6 +826,7 @@ extern void VG_(pp_UInstr) ( Int instrNo, UInstr* u );
extern void VG_(pp_UInstr_regs) ( Int instrNo, UInstr* u );
extern void VG_(up_UInstr) ( Int instrNo, UInstr* u );
extern Char* VG_(name_UOpcode) ( Bool upper, Opcode opc );
extern Char* VG_(name_UCondcode) ( Condcode cond );
extern void VG_(pp_UOperand) ( UInstr* u, Int operandNo,
Int sz, Bool parens );