Files
ftmemsim-valgrind/cachegrind
Nicholas Nethercote 252fb3fba9 This commit introduces two new UInstructions: CCALL_1_0, CCALL_2_0.
These are the first of a generic family for calling C functions.  CCALL_M_N
calls a function with M word-sized arguments and N word-sized return values
(N == 0 or 1, of course).  All stack management is done automatically --
register saving, argument pushing, register restoring.  Rough timings show it's
marginally faster (~3%), probably because the instrumentation phase is slightly
simpler and translations are slighly more compact.

It was introduced because the way Cachegrind was calling its helper functions
was not really legitimate -- it involved pushing RealRegs at a point where
RealRegs shouldn't have been used.  This flukily worked for Cachegrind, but
caused obscure seg faults when I tried using the same technique for the DIDUCE
stuff.  Hence this more general approach.

CCALL_M_N where M+N <= 3 are easy.  More args might be done by abusing spare
fields in the UInstr struct, if really necessary.  But it's not, yet.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@546
2002-07-28 09:53:34 +00:00
..
2002-07-26 11:34:39 +00:00
2002-06-10 15:31:16 +00:00