From e8a789067b358cd42fa8b55cafadf01d6b08ddab Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 3 Aug 2004 15:49:50 +0000 Subject: [PATCH] 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 --- coregrind/vg_needs.c | 23 ----------------------- coregrind/vg_translate.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 23 deletions(-) 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. ---*/ -- 2.47.2