Julian Seward [Tue, 24 Jan 2006 01:01:17 +0000 (01:01 +0000)]
Vex can't simulate floor() or ceil() correctly on ppc32/64 from
glibc-2.3.4 onwards, so just replace the functions with the older
glibc implementation. This is an ugly kludge.
Julian Seward [Sun, 22 Jan 2006 01:15:36 +0000 (01:15 +0000)]
Two unrelated changes:
- create an IMark at the start of the IR for the ppc64 magic return stub
as cachegrind will barf if it doesn't find one in a BB
- ppc64: for the same reason that _NRADDR is set to zero at the start of
redirect block which is a function replacement entry (as opposed to a
function wrapper entry), also set _NRADDR_GPR2 to zero.
Julian Seward [Sun, 22 Jan 2006 01:12:51 +0000 (01:12 +0000)]
Index the BB_info table by redirected guest address, not
non-redirected guest address. This is a small but significant change
needed to make function wrapping work. The problem is that with
function wrapping two different translations are associated with the
non-redirected address (of a wrapped function entry point), and so
cachegrind asserts. Whereas the redirected guest addresses reflect
the reality of only one translation associated with each address. So
use them instead.
Julian Seward [Fri, 20 Jan 2006 16:48:31 +0000 (16:48 +0000)]
Yet another possible output, due to trivial differences in backtraces.
This is getting rediculous. We need a better way to compare
backtraces in regression test outputs.
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.