Julian Seward [Fri, 20 Jan 2006 14:31:57 +0000 (14:31 +0000)]
Changes to make function wrapping work better on ppc64-linux:
- when recording the non-redirected address in guest_NRADDR, also
snapshot the current R2 value, as that will be needed to run the
original safely
- As a consequence, the original-function information extracted by
VALGRIND_GET_ORIG_FN is different on ppc64-linux (2 words) from
all other platforms (1 word). So change the type of it from
void* to a new type OrigFn which can be defined differently for
each platform.
- Change the CALL_FN_* macros for ppc64-linux to save/restore
R2 values appropriately.
- ppc64-linux: detect overflow/underflow of the redirect stack
and bring Valgrind to a halt if this happens
- Update VG_CLREQ_SZB for ppc32/64 (was out of date).
Julian Seward [Thu, 19 Jan 2006 03:52:19 +0000 (03:52 +0000)]
Clever handling of partially defined equality does not work on
ppc32/64 at the moment. Make this test handle that whilst still
testing the facility on x86/amd64.
Julian Seward [Thu, 19 Jan 2006 03:50:48 +0000 (03:50 +0000)]
This was segfaulting on ppc64-linux, even natively. These changes
stop it doing that. Am not convinced this is a good fix -- I don't
really understand how this program works.
Julian Seward [Wed, 18 Jan 2006 04:23:10 +0000 (04:23 +0000)]
Fix an all-platforms bug introduced by the recent overhaul of function
interception and wrapping. This was causing failures matching
function names in suppressions to function names in backtraces when
the latter names were Z-encoded (eg malloc), which typically caused
all leak suppressions to fail because they contain names such as
malloc, which are Z-encoded.
Julian Seward [Wed, 18 Jan 2006 04:20:04 +0000 (04:20 +0000)]
To reduce the endless nuisance of multiple different names for "the
frame below main()" screwing up the testsuite, change all known
incarnations of said into a single name, "(below main)".
Julian Seward [Tue, 17 Jan 2006 02:06:39 +0000 (02:06 +0000)]
These files all speak about instrumentation functions.
Instrumentation functions now take a callback closure structure
(VgCallbackClosure*), so this commit changes the signatures
accordingly.
Julian Seward [Tue, 17 Jan 2006 01:57:33 +0000 (01:57 +0000)]
Rewrite VG_(translate) to make it clearer (it had grown like Topsy for
a long time) and to use the new preable-generating callback facility
supported by Vex. Use this to add support for R2 saving/restoring
needed for function replacement/wrapping on ppc64-linux.
Julian Seward [Fri, 13 Jan 2006 23:12:49 +0000 (23:12 +0000)]
Tidy up ELF symbol table reading a bit. Make a completely new
function for reading ELF symbol tables on ppc64-linux so as to avoid
cluttering up the {x86,amd64,ppc32}-linux cases with convoluted
hoop-jumping needed to handle both the dotful (older) and dotless
(newer) ppc64-linux ABI variants.
Tom Hughes [Fri, 13 Jan 2006 09:57:01 +0000 (09:57 +0000)]
Use VG_(am_mmap_anon_float_valgrind) to allocate the unredirected
translation cache. This ensures that the cache space is executable
which it isn't when it is allocated as a static variable in the data
segment, at least on my amd64 box.
Julian Seward [Thu, 12 Jan 2006 12:32:32 +0000 (12:32 +0000)]
Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive. This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.
Julian Seward [Wed, 4 Jan 2006 01:20:28 +0000 (01:20 +0000)]
Somewhat rehash the biarch-build machinery so as to (1) formalise the
distinction between primary and secondary build targets, and (2) make
it independent of the default behaviour of gcc (iow, what gcc does
when you specify neither -m32 nor -m64).
As a result, an out-of-the-box build on ppc64-linux now builds a
system which is basically for 64-bit PowerPC, but also has the ability
to run 32-bit ppc-linux binaries (exactly the same arrangement as you
get when building on amd64-linux).
There are various twists and turns. multiple-architectures.txt is
updated all the gory details.
This will break amd64 builds until such time as
<tool>/tests/{amd64,x86}/Makefile.am are fixed up (shortly).
regtest none::ppc32
- More cleanup
- Fixed rlwimi test - init r_dst to zero.
- Fixed load/store tests - print change in updated base reg, not actual value.
Julian Seward [Sun, 1 Jan 2006 23:00:49 +0000 (23:00 +0000)]
Read dwarf2 line number information even if a .debug_str section was
not found. This is believed to fix the regression in 3.1.X wherein
debug info was sometimes not read from icc-8.1 generated executables.
Julian Seward [Fri, 30 Dec 2005 22:52:20 +0000 (22:52 +0000)]
Finally fix the bug causing dynamic ppc64-linux executables not to
work: start with with the correct toc pointer (r2), rather than some
nonsense value.
Julian Seward [Wed, 28 Dec 2005 04:18:20 +0000 (04:18 +0000)]
In fbench, compute sin/cos/sqrt from "first principles", so that the
program more uniformly measures the speed of FP +/-/* load/store
across different architectures.
Julian Seward [Mon, 26 Dec 2005 17:58:58 +0000 (17:58 +0000)]
More dispatcher tuning for ppc32/64. Makes a big difference for
perf/tinycc.
- run_thread_for_a_while: just clear this thread's reservation when
starting, not all of them.
- use a different fast-cache hashing function for ppc32/64 than for
x86/amd64. This allows the former to use all the fast-cache entries
rather than just 1/4 of them.