mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-07 12:44:45 +00:00
Added a useful skin instrumentation function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1433
This commit is contained in:
parent
cf515e3eef
commit
48b80f2249
@ -84,6 +84,15 @@ void VG_(set_global_var)(UCodeBlock* cb, Addr globvar_ptr, UInt val)
|
||||
uInstr2(cb, STORE, 4, TempReg, t_val, TempReg, t_gv);
|
||||
}
|
||||
|
||||
void VG_(set_global_var_tempreg)(UCodeBlock* cb, Addr globvar_ptr, UInt t_val)
|
||||
{
|
||||
Int t_gv = newTemp(cb);
|
||||
|
||||
uInstr2(cb, MOV, 4, Literal, 0, TempReg, t_gv);
|
||||
uLiteral(cb, globvar_ptr);
|
||||
uInstr2(cb, STORE, 4, TempReg, t_val, TempReg, t_gv);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/*--- end vg_instrument.c ---*/
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
@ -812,9 +812,13 @@ extern void VG_(call_helper_2_0) ( UCodeBlock* cb, Addr f, UInt arg1, UInt arg2,
|
||||
UInt regparms_n);
|
||||
|
||||
/* One way around the 3-arg C function limit is to pass args via global
|
||||
* variables... ugly, but it works. */
|
||||
* variables... ugly, but it works. This one puts a literal in there. */
|
||||
extern void VG_(set_global_var) ( UCodeBlock* cb, Addr globvar_ptr, UInt val);
|
||||
|
||||
/* This one puts the contents of a TempReg in the global variable. */
|
||||
extern void VG_(set_global_var_tempreg) ( UCodeBlock* cb, Addr globvar_ptr,
|
||||
UInt t_val);
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* Allocating/freeing basic blocks of UCode */
|
||||
extern UCodeBlock* VG_(setup_UCodeBlock) ( UCodeBlock* cb );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user