127 Commits

Author SHA1 Message Date
Ivo Raisr
246bb0e25f Remove TileGX/Linux port.
Fixes BZ#379504.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16340
2017-05-08 17:21:59 +00:00
Ivo Raisr
38edd50c0e Update copyright end year to 2017 in preparation for 3.13 release.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16333
2017-05-04 15:09:39 +00:00
Petar Jovanovic
ddc3b67f41 mips: replace use of (d)addi with (d)addiu
Replace use of daddi/addi with daddiu/addiu.
This is more R6-friendly and we actually want to use the instructions
that do not cause integer overflow exception.

Patch by Vicente Olivert Riera.

Related issue - BZ#356112.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16018
2016-10-05 14:16:25 +00:00
Florian Krohm
fd4b1a19c1 Remove an unneeded header file. Spotted by Matthias Schwarzott.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15693
2015-09-30 20:34:32 +00:00
Florian Krohm
193f88fad4 Make sure no executable stack gets created.
Explanation by Matthias Schwarzott:

The linker will request an executable stack as soon as at least one
object file, that is linked in, wants an executable stack.
And the absence of the 
      .section .note.GNU-stack."",@progbits
is enough to tell the linker that an executable stack is needed.
So even an empty asm-file must at least contain this statement to not
force executable stacks on the whole executable.

* Define a helper macro MARK_STACK_NO_EXEC that disables the
  executable stack.
* Instantiate this macro unconditionally at the end of each asm file.

Patch by Matthias Schwarzott <zzam@gentoo.org>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15692
2015-09-30 20:30:48 +00:00
Julian Seward
9d215c1326 Bug 346185 - Fix typo saving altivec register v24.
Patch from Dave Lerner (david.lerner26@sbcglobal.net).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15579
2015-08-21 13:43:07 +00:00
Julian Seward
adc2dafee9 Update copyright dates, to include 2015. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577
2015-08-21 11:32:26 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Julian Seward
082f9298a1 Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
2015-04-10 12:30:09 +00:00
Carl Love
98908947c7 This commit is for Bugzilla 334834. The Bugzilla contains patch 2 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334836.

POWER PC, add the functional Little Endian support, patch 2 

The IBM POWER processor now supports both Big Endian and Little Endian.
The ABI for Little Endian also changes.  Specifically, the function
descriptor is not used, the stack size changed, accessing the TOC
changed.  Functions now have a local and a global entry point.  Register
r2 contains the TOC for local calls and register r12 contains the TOC
for global calls.  This patch makes the functional changes to the
Valgrind tool.  The patch makes the changes needed for the
none/tests/ppc32 and none/tests/ppc64 Makefile.am.  A number of the
ppc specific tests have Endian dependencies that are not fixed in
this patch.  They are fixed in the next patch.

Per Julian's comments renamed coregrind/m_dispatch/dispatch-ppc64-linux.S
to coregrind/m_dispatch/dispatch-ppc64be-linux.S  Created new file for LE
coregrind/m_dispatch/dispatch-ppc64le-linux.S.  The same was done for
coregrind/m_syswrap/syscall-ppc-linux.S.

Signed-off-by: Carl Love <carll@us.ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14239
2014-08-07 23:35:54 +00:00
Carl Love
914f75de32 This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334834 and 334836.  The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code.  This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific.  The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238
2014-08-07 23:17:29 +00:00
Julian Seward
3f6d211236 Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770
2014-01-12 12:54:00 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Dejan Jevtic
961e487650 mips64: add extra Iop cases in VEX and fix compiler
warning.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13624
2013-10-07 10:27:31 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Petar Jovanovic
eab0663602 Reserve space for frame header in disp_run_translations for MIPS.
Reserve space for frame header in disp_run_translations, as some optimizations
may decide to use it. This should fix issue #307141.

Related link:
https://bugs.kde.org/show_bug.cgi?id=307141


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13080
2012-10-22 17:43:57 +00:00
Florian Krohm
5fd9d2ae08 Change script to also handle IBM's copyright notice.
Update copyright notices.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12853
2012-08-06 18:34:24 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Julian Seward
d971e9300f Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: new non-test files for mips32-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12617
2012-06-07 09:23:23 +00:00
Florian Krohm
77e2a06efd tchain optimisation for s390 (valgrind bits)
Companion of VEX r2308
Move address arithmetic to recover place to patch into VEX.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12537
2012-04-22 17:39:37 +00:00
Florian Krohm
692fb9efff Followup to r12527. Use 32-bit arithmetic to increment xindir
performance counters. Remove #ifdef'ery.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12536
2012-04-22 15:37:15 +00:00
Julian Seward
00e1ebb540 Use 32-bit XIndir counter incs, instead of 64-bit, as per r12527.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12530
2012-04-21 23:37:16 +00:00
Julian Seward
3bf14f967a Use 32-bit XIndir counter incs, instead of 64-bit, as per r12527.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12529
2012-04-21 23:28:34 +00:00
Julian Seward
4deeeb4aa6 Use 32-bit XIndir counter incs, instead of 64-bit, as per r12527.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12528
2012-04-21 23:12:07 +00:00
Julian Seward
09bcae8ec8 Last optimisation for the day: change VG_(stats__n_xindirs) in such a
way that the fast-path through VG_(disp_cp_xindir) only has to
increment a 32 bit counter, saving memory bandwidth on 32 bit
platforms compared to a 64-bit inc.  The overall numbers of XIndirs
can still be 64 bit though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12527
2012-04-21 23:05:57 +00:00
Julian Seward
9b090c6bb2 (post-tchain-merge cleanup): un-break the build on OSX by fixing up
the dispatcher code accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12522
2012-04-21 13:55:28 +00:00
Julian Seward
4395ea6182 Changes needed to make t-chaining work on ppc64-linux (valgrind side).
git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12514
2012-04-20 10:43:08 +00:00
Julian Seward
86dc56291e Fill in some more bits to do with t-chaining for ppc64
(still doesn't work) (Valgrind side)


git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12513
2012-04-20 02:19:35 +00:00
Julian Seward
6d68ec0346 Add translation chaining support for ppc32 (tested) and to
a large extent for ppc64 (incomplete, untested) (Valgrind side)


git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12512
2012-04-20 00:14:02 +00:00
Florian Krohm
5925ffe7f1 Translation chaining for s390. To be debugged.
git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12502
2012-04-13 04:04:44 +00:00
Julian Seward
712ee2547b Make the return type of VG_(disp_run_translations) be void, rather
than the HWord it was claimed to be.  Inconsistency spotted by
Philippe Waroquiers.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12486
2012-04-04 12:23:23 +00:00
Julian Seward
8b6f93641c Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484
2012-04-02 21:56:03 +00:00
Florian Krohm
9d14305592 Terminate comment correctly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12325
2012-01-02 16:12:30 +00:00
Julian Seward
0d7caa744f Get a bunch more copyright dates in the right format, 20xx-2011,
so the auto-update script will handle them correctly in future.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12207
2011-10-23 07:49:30 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Florian Krohm
166c3bcd27 Remove code duplication from the dispatchers. Keep the core loop
in common.
To accomplish that without penalizing the non-profiling dispatcher
we do the stats gathering *after* the jitted code returns to the
dispatcher. For that to work properly, we need to stash away the
instruction adddress before entering the jitted code so we can use
it later. (See also VEX r2208).

Two other tweaks are included here:
(1) For the non-profiling dispatcher it is not necessary to update
    the LR in each iteration. Quite obviously the jitted code cannot
    modify the LR in its iteration because it needs it at the very end
    when it returns. So we move this step out of the core loop.
(2) Move loading the address of VG_(tt_fast) past testing for a changed
    guest state pointer. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12044
2011-09-25 00:15:54 +00:00
Florian Krohm
ed330ac726 Tweak s390x dispatcher. Using CG elminates two load insns.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12037
2011-09-17 22:18:01 +00:00
Florian Krohm
b1d64f9231 Dispatcher tweak. Saves ALU operation. Suggested by Julian Seward.
Implemented by Christian Borntraeger (borntraeger@de.ibm.com).
See bugzilla #274378


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12036
2011-09-17 15:46:59 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
a6ffae5ac9 Un-break Darwin build following r2155/r11786 -- use dual-entry
dispatchers for x86 and amd64, and add corresponding improvements.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11788
2011-05-29 12:40:27 +00:00
Julian Seward
9b93938907 Remove a load from the s390x dispatcher loop, as per r11781.
(Florian Krohm <britzel@acm.org>).  #274378.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11787
2011-05-29 09:38:58 +00:00
Julian Seward
ffc3968ff2 Give the amd64-linux and x86-linux dispatchers two entry points, not one,
so as to avoid a GSP-changed check in the common case.  See vex r2155.
(amd64-darwin and x86-darwin are now temporarily unbuildable.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11786
2011-05-29 09:34:30 +00:00
Julian Seward
3a131dc867 dispatch-x86-linux.S:
use test-based detection of GSP pointer changes.
   Saves one load per SB.

dispatch-amd64-linux.S:
   ditto

dispatch-amd64-linux.S:
   use movabsq to get &VG_(tt_fast) into a register,
   instead of an rsp-relative load from a constant pool.
   Saves a second load per SB.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11785
2011-05-28 17:07:53 +00:00
Julian Seward
84fa16228a Undo bogus comment changes committed in r11783.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11784
2011-05-28 16:58:45 +00:00
Julian Seward
55daaf1836 Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11783
2011-05-28 15:58:13 +00:00
Julian Seward
f8e9ab3607 Remove another memory reference from the arm dispatcher loop, by using
the fact that all {VG,VEX}_TRC_VALUES have their lowest bit set.  All
other targets can benefit from this trick too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11781
2011-05-28 11:05:44 +00:00
Julian Seward
3bcd288100 Get rid of a bunch of loads in the arm dispatcher inner loops, and
make some attempt to schedule for Cortex-A8.  Improves overall IPC
for none running perf/bz2.c "-O" from 0.879 to 0.925.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11780
2011-05-28 10:16:58 +00:00
Julian Seward
5e6d4577de Change the TT_FAST hash function for from "insn_address >> 2" to
"insn_address >> 1".  The former is appropriate for ARM code, where
all insns are 4-sized and 4-aligned, but not for Thumb code, where the
minimum size and alignment is 2.  The old scheme happened to work for
Thumb (indeed, any hash function would), but caused huge amounts of
conflict misses in the fast cache for some programs.

The change has been observed to reduce conflict misses by up to 100
times, and in some cases, improves performance significantly for Thumb
code.  Performance of ARM code is unchanged or possibly a bit worse.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11716
2011-04-28 14:58:15 +00:00
Julian Seward
fce26577fc Fix bogus .size directives which are now rejected by binutils 2.21.
Fixes #271043.  (Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11700
2011-04-15 21:21:27 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00