From: Nicholas Nethercote Date: Mon, 3 Feb 2003 11:17:46 +0000 (+0000) Subject: Renamed VG_(nameCondcode)() as VG_(name_UCondcode)() to make it consistent X-Git-Tag: svn/VALGRIND_1_9_4~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8a14631c3892a032df4fd54d1ad209aa4ebb517;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/coregrind/vg_from_ucode.c b/coregrind/vg_from_ucode.c index 63a82ae3a2..4ec5703a99 100644 --- a/coregrind/vg_from_ucode.c +++ b/coregrind/vg_from_ucode.c @@ -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: diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h index dcd03265cd..394e57c0e7 100644 --- a/coregrind/vg_include.h +++ b/coregrind/vg_include.h @@ -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 ); diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c index a040b67f42..930156db6e 100644 --- a/coregrind/vg_to_ucode.c +++ b/coregrind/vg_to_ucode.c @@ -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; diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c index 4114d92b76..1b30f1523d 100644 --- a/coregrind/vg_translate.c +++ b/coregrind/vg_translate.c @@ -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; diff --git a/include/vg_skin.h b/include/vg_skin.h index 3958de9819..6415a9befc 100644 --- a/include/vg_skin.h +++ b/include/vg_skin.h @@ -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 );