Julian Seward [Tue, 27 Jan 2015 23:35:58 +0000 (23:35 +0000)]
Change AMD64Instr_CMov64 so that the source can only be a register
instead of register-or-memory (an AMD64RM). This avoids duplicating
conditional load functionality introduced in r3075 via
AMD64Instr_CLoad and in practice has no effect on the quality of the
generated code.
Julian Seward [Tue, 27 Jan 2015 23:17:02 +0000 (23:17 +0000)]
AMD64 front end: translate AVX2 PMASKMOV load instructions (vector
conditional loads) using IR conditional load statements IRLoadG rather
than the previous rather ingenious hack.
AMD64 back end:
* Add instruction selection etc for 32- and 64-bit conditional loads (IRLoadG)
* Handle dirty helper calls that return a value and that are conditional. These
result from Memcheck's instrumentation of IRLoadGs.
No functional change. This is a cleanup as part of supporting AVX2
PMASKMOV loads and stores by using the existing IR facilities for
conditional loads and stores.
Rhys Kidd [Mon, 26 Jan 2015 03:27:01 +0000 (03:27 +0000)]
Partial fix for bz339745. Mac OS: Further progress worker queue thread support. Additional magic constants have been checked against OS X 10.9 and 10.10
Florian Krohm [Sat, 24 Jan 2015 18:26:05 +0000 (18:26 +0000)]
Followup to r14886. So it turned out that in m_addrinfo we were already
strduping the filename which I failed to spot. Thanks to Philippe for
pointing that out.
Florian Krohm [Sat, 24 Jan 2015 00:02:19 +0000 (00:02 +0000)]
VG_(am_get_filename) returns a pointer to memory that belongs to the
address space manager. Callers should neither modify the string nor
free it (as the string resides is statically allocated memory). That
calls for a const HChar *
The type change exposed two bugs. One in m_addrinfo.c and one in
m_debuginfo.c. In both cases the returned string could possibly be freed later
on. So we need to strdup it first. Now fixed.
Florian Krohm [Tue, 13 Jan 2015 17:33:59 +0000 (17:33 +0000)]
Export VG_(discard_tranalsations_safely) to the tools. It is
only allowed to be called in certain contexts which is
enforced at runtime.
Change callgrind accordingly.
New header file pub_tool_transtab.h added.
Rhys Kidd [Mon, 12 Jan 2015 13:29:29 +0000 (13:29 +0000)]
Add to svn ignore auxprogs/getoff-*-darwin files created on OS X. The equivalent files are ignored from other architectures in this folder. Simple change, no-BZ.
Rhys Kidd [Sun, 11 Jan 2015 07:04:20 +0000 (07:04 +0000)]
Add to svn ignore gdbserver_tests/*.dSYM intermediate files created on OS X. These files are ignored in all other sub folders where created. Simple change, no-BZ.
Rhys Kidd [Fri, 9 Jan 2015 15:41:15 +0000 (15:41 +0000)]
Darwin13.supp should include suppression for known uninitialised read in pthread_rwlock_init() as required to pass the memcheck/tests/darwin/pth-supp test. Patch and discussion per BZ #339780.
When the info struct for a BB is created, we use the first guest
instruction address as key to insert the info into a hash table.
We should do the same when discarding.
This actually is not a real problem, as Callgrind obviously
is used very rarely with redirections. But we should be consistent
with cachegrind.
Florian Krohm [Wed, 7 Jan 2015 14:47:15 +0000 (14:47 +0000)]
When creating a log-file (xml or otherwise) give everybody
read permission. Previously, only user could read which was
incovenient for some typical workflows.
Suggested in BZ #339542.
Florian Krohm [Wed, 7 Jan 2015 14:42:11 +0000 (14:42 +0000)]
Add command line option --max-connect=INT to allow the user to provide
an upper bound for the number of connected processes.
Part of fixing BZ #337869.
The toUInt() should only be used if we are running in 32-bit mode. The lines
were changed to only convert the pointer to 32-bit if running in 32-bit mode.
There is no bugzilla for this issue. It was noticed by Florian Krohm.
Fix assert
vex: priv/guest_generic_bb_to_IR.c:224 (bb_to_IR): Assertion `vex_control.guest_max_insns < 100' failed.
caused by giving --vex-guest-max-insns=100
100 should be allowed as described by --help-debug:
--vex-guest-max-insns=<1..100> [50]
Florian Krohm [Sun, 4 Jan 2015 17:20:19 +0000 (17:20 +0000)]
Change remaining use of Addr64 in the VEX API to Addr. The reduces
the size of VexGuestExtent to 20 bytes on a 32-bit platform.
Change prototypes of x86g_dirtyhelper_loadF80le and
x86g_dirtyhelper_storeF80le to give the address in the parameter
list type Addr. Likewise for amd64g_dirtyhelper_loadF80le and
amd64g_dirtyhelper_storeF80le.
Update switchback.c - but not tested.
Florian Krohm [Sun, 4 Jan 2015 11:30:11 +0000 (11:30 +0000)]
TyEnt::TyStOrUn::fieldRs is never NULL as VG_(newXA) always returns
something != NULL. Testing fieldRs for NULL-ness was confusing static
analysis. It usually takes such tests as evidence that the pointer
can in fact be NULL and may report false positives as a consequence.
Florian Krohm [Wed, 31 Dec 2014 12:09:38 +0000 (12:09 +0000)]
It has long been assumed that host and guest architectures
are the same - even though the initial design goal was likely
different allowing a cross-valgrind of sorts. But as Julian
put it:
But it's been 12+ years and I've never once heard any mention of
such a thing. So perhaps it's time to give up on that one.
Now let's take advantage of this decision and tighten up the VEX
API using Addr instead of Addr64. As a first step move the definition
of Addr into VEX proper and change the chase_into_ok callback
accordingly.
Florian Krohm [Mon, 29 Dec 2014 22:18:58 +0000 (22:18 +0000)]
As a library, VEX should not export the offsetof and vg_alignof
macros. The latter isn't even used by VEX.
Move them to pub_tool_basics.h.
offsetof also goes to VEX's private header main_util.h.
Florian Krohm [Mon, 29 Dec 2014 22:07:35 +0000 (22:07 +0000)]
Add a command line option to allow the user to provide an upper bound
for the number of connected processes. This is still lame but better
than asking her to recompile.
Part of fixing BZ #337869.
Carl Love [Wed, 17 Dec 2014 21:41:58 +0000 (21:41 +0000)]
This commit fixes a redundant #if defined line. The define
VG_PLAT_USES_PPCTOC is only true for PPC64 big endian, do not
need to quailify the #if statement condition of VG_PLAT_USES_PPCTOC
with !VGP_ppc64le_linux.
There is no associated bugzilla. The fix is in response to an
email message.
Fix 341789 - aarch64: shmat fails with valgrind on ARMv8
arm64, like amd64, must not use VKI_IPC_64, even
if this symbol is defined.
This makes the shmctl fail, which results in a zero size returned,
which means that the succesful shmat is not reported to the aspacemgr.