From: Nicholas Nethercote Date: Tue, 3 Aug 2004 15:49:50 +0000 (+0000) Subject: Put UCodeBlock get functions in a more sensible place -- moved from vg_needs.c X-Git-Tag: svn/VALGRIND_2_2_0~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a789067b358cd42fa8b55cafadf01d6b08ddab;p=thirdparty%2Fvalgrind.git Put UCodeBlock get functions in a more sensible place -- moved from vg_needs.c to vg_translate.c, where the other UCodeBlock functions live. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2557 --- diff --git a/coregrind/vg_needs.c b/coregrind/vg_needs.c index cef8a15695..9de43c7633 100644 --- a/coregrind/vg_needs.c +++ b/coregrind/vg_needs.c @@ -167,29 +167,6 @@ NEEDS(sanity_checks) NEEDS(data_syms) NEEDS(shadow_memory) -/*--------------------------------------------------------------------*/ -/* UCodeBlocks */ - -Int VG_(get_num_instrs) ( UCodeBlock* cb ) -{ - return cb->used; -} - -Int VG_(get_num_temps) ( UCodeBlock* cb ) -{ - return cb->nextTemp; -} - -UInstr* VG_(get_instr) ( UCodeBlock* cb, Int i ) -{ - return & cb->instrs[i]; -} - -UInstr* VG_(get_last_instr) ( UCodeBlock* cb ) -{ - return & cb->instrs[cb->used-1]; -} - /*--------------------------------------------------------------------*/ /*--- end vg_needs.c ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c index 6412a58ccf..716b426466 100644 --- a/coregrind/vg_translate.c +++ b/coregrind/vg_translate.c @@ -339,6 +339,26 @@ Int VG_(realreg_to_rank) ( Int realReg ) } } +Int VG_(get_num_instrs) ( UCodeBlock* cb ) +{ + return cb->used; +} + +Int VG_(get_num_temps) ( UCodeBlock* cb ) +{ + return cb->nextTemp; +} + +UInstr* VG_(get_instr) ( UCodeBlock* cb, Int i ) +{ + return & cb->instrs[i]; +} + +UInstr* VG_(get_last_instr) ( UCodeBlock* cb ) +{ + return & cb->instrs[cb->used-1]; +} + /*------------------------------------------------------------*/ /*--- Sanity checking uinstrs. ---*/