]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
6 years agoPPC64, fix test_isa_3_0_other.c test
Carl Love [Fri, 5 Apr 2019 20:04:23 +0000 (15:04 -0500)] 
PPC64, fix test_isa_3_0_other.c test

Valgrind ppc64 test_isa_3_0_other test will attempt to display
all of the bits of the XER as part of the test case results.
The tests have no existing logic to clear those bits, so this can
pick up straggling values that cascade into a testcase failure.
This adds some code to correct this in two directions;
    - Print only the bits that are expected by the tests.  This
    is currently just the OV and OV32 bits.
    - print all of the bits when run under higher verbosity levels.

Bugzilla 406198 - none/tests/ppc64/test_isa_3_0_other test sporadically
                  including CA bit in output

Patch submitted by  Will Schmidt <will_schmidt@vnet.ibm.com>
Patch reviewed, committed by: Carl Love <cel@us.ibm.com>

6 years agoBug 404843 - s390x: backtrace sometimes ends prematurely.
Julian Seward [Fri, 5 Apr 2019 18:10:46 +0000 (20:10 +0200)] 
Bug 404843 - s390x: backtrace sometimes ends prematurely.

On s390x-linux, adds CFI based unwinding for %f0..%f7, since these are sometimes
used by gcc >= 8.0 to spill integer register values in leaf functions.  Hence the
lack of unwinding them was causing unwind failures on this platform.

6 years agoPPC64, patch to test case issues reported in bugzilla 401827 and 401828.
Carl Love [Thu, 4 Apr 2019 17:31:05 +0000 (12:31 -0500)] 
PPC64, patch to test case issues reported in bugzilla 401827 and 401828.

This corrects a valgrind instruction emulation issue revealed by
a GCC change.
The xscvdpsp,xscvdpspn,xscvdpuxws instructions each convert
double precision values to single precision values, and write
the results into bits 0-32 of the 128 bit target register.
To get the value into the normal position for a scalar register
the result needed to be right-shifted 32 bits, so gcc always
did that.
It was determined that hardware also always did that, so the (redundant)
gcc shift was removed.
This exposed an issue because valgrind was only writing the result to
bits 0-31 of the target register.

This patch updates the emulation to write the result to both of the involved
32-bit fields.

VEX/priv/guest_ppc_toIR.c:
  - rearrange ops in dis_vx_conv to update more portions of the target
    register with copies of the result.   xscvdpsp,xscvdpspn,xscvdpuxws

none/tests/ppc64/test_isa_2_06_part1.c
  - update res32 checking to explicitly include fcfids and fcfidus in the
    32-bit result grouping.

none/tests/ppc64/test_isa_2_07_part2.c
  - correct NULL initializer for logic_tests definition

[*1] - GCC change referenced:
    2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
            * config/rs6000/rs6000.md (movsi_from_sf): Adjust code to
              eliminate doing a 32-bit shift right or vector extract after
              doing  XSCVDPSPN.

patch submitted by:   Will Schmidt <will_schmidt@vnet.ibm.com>
reviewed, committed by:  Carl Love <cel@us.ibm.com>

6 years agoDHAT: when the run ends, print a how-to-view-the-profile hint message. n-i-bz.
Julian Seward [Thu, 4 Apr 2019 10:08:26 +0000 (12:08 +0200)] 
DHAT: when the run ends, print a how-to-view-the-profile hint message.  n-i-bz.

The aim is to make it zero-effort for users to view the profile after
a run.  The printed message is as follows:

  To view the resulting profile, open
    file:///path/to/valgrind/installation/lib/valgrind/dh_view.html
  in a web browser, click on "Load..." and then select the file
    /path/to/dhat.out.12345
  Scroll to the end the displayed page to see a short
  explanation of some of the abbreviations used in the page.

This patch adds printing of the message, then filters it out in
dhat/tests/filter_stderr, and updates the .stderr.exp files to
remove blank lines.

6 years agomips32: pass correct syscall value to kernel in case of __NR_syscall
Petar Jovanovic [Wed, 3 Apr 2019 17:38:08 +0000 (17:38 +0000)] 
mips32: pass correct syscall value to kernel in case of __NR_syscall

The syscall number has to be put in register v0 before call into the kernel.
This was omitted when system call is __NR_syscall (and when the syscall
argument is the system call number of interest).

Patch by Nikola Milutinovic.

6 years agoSupport arm64 core dump
Alexandra Hajkova [Wed, 20 Mar 2019 09:10:44 +0000 (10:10 +0100)] 
Support arm64 core dump

Fixes BZ #405722.
Implements coredump-elf.c fill_prstatus()
and fill_fpu () for VGP_arm64_linux.

6 years agoUpdate NEWS and docs/internals/3_14_BUGSTATUS.txt to reflect current bug-fix status.
Julian Seward [Mon, 1 Apr 2019 13:31:13 +0000 (15:31 +0200)] 
Update NEWS and docs/internals/3_14_BUGSTATUS.txt to reflect current bug-fix status.

6 years agoAnnounce fix 405782 "VEX temporary storage exhausted" when attempting to debug slic3r-pe
Philippe Waroquiers [Sat, 30 Mar 2019 18:09:31 +0000 (19:09 +0100)] 
Announce fix 405782  "VEX temporary storage exhausted" when attempting to debug slic3r-pe

This bug was fixed by various optimisations done by Julian.

6 years agomips: get rid of format and implicit-fallthrough warnings
Petar Jovanovic [Thu, 28 Mar 2019 17:33:31 +0000 (18:33 +0100)] 
mips: get rid of format and implicit-fallthrough warnings

Indicate when the fall through from the previous case label is intentional.
Fix format warnings related to arguments in printf calls.

6 years agoupdate NEWS about fixed KDE #400975
Petar Jovanovic [Thu, 28 Mar 2019 10:20:47 +0000 (10:20 +0000)] 
update NEWS about fixed KDE #400975

KDE #400975 has been fixed with commit
e61d13087096139024788393218367572751b4b6

6 years agomips: code refactoring (NFC)
Petar Jovanovic [Wed, 27 Mar 2019 18:42:05 +0000 (18:42 +0000)] 
mips: code refactoring (NFC)

Code in VEX/priv/guest_mips_toIR.c is notably refactored.
DSP ASE dissasembly has been put in a separate file: guest_mipsdsp_toIR.c.

Patch by Aleksandar Rikalo.

6 years agoUse ULong instead of unsigned long in s390_irgen_EX_SS.
Mark Wielaard [Wed, 27 Mar 2019 14:51:34 +0000 (15:51 +0100)] 
Use ULong instead of unsigned long in s390_irgen_EX_SS.

ovl was defined as an unsigned long. This would cause warnings from gcc:

  guest_s390_toIR.c:195:30: warning: right shift count >= width of type
  [-Wshift-count-overflow]

when building on 32bit arches, or building a 32bit secondary arch.

Fix this by defining ovl as ULong which is always guaranteed 64bit.

6 years agoUse gcc -Wimplicit-fallthrough=2 by default if available
Mark Wielaard [Tue, 12 Mar 2019 22:17:32 +0000 (23:17 +0100)] 
Use gcc -Wimplicit-fallthrough=2 by default if available

GCC 7 instroduced -Wimplicit-fallthrough
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

It caught a couple of bugs, but it does need a bit of extra comments to
explain when a switch case statement fall-through is deliberate. Luckily
with -Wimplicit-fallthrough=2 various existing comments already do that.
I have fixed the bugs, but adding explicit break statements where
necessary and added comments where the fall-through was correct.

https://bugs.kde.org/show_bug.cgi?id=405430

6 years agomips: use local labels for do_acasW()
Petar Jovanovic [Mon, 25 Mar 2019 18:53:21 +0000 (19:53 +0100)] 
mips: use local labels for do_acasW()

use local labels for do_acasW() to avoid defining symbols multiple times
when the function gets inlined.

It fixes assembler error reported in KDE #400164.

6 years agoupdate .gitignore with amd64 tests f16c and rdrand
Petar Jovanovic [Mon, 25 Mar 2019 17:45:04 +0000 (17:45 +0000)] 
update .gitignore with amd64 tests f16c and rdrand

Add
  /none/tests/amd64/f16c
  /none/tests/amd64/rdrand

to .gitignore.

6 years agomips: if revision is specified, use it for compilation
Petar Jovanovic [Mon, 25 Mar 2019 17:39:38 +0000 (17:39 +0000)] 
mips: if revision is specified, use it for compilation

If user has specified a particular MIPS revision in configure line,
do not interfere with this (i.e. skip setting FLAG_M32/FLAG_M64).

Related KDE issues #402123 and #400975.

Patch by Stefan Maksimovic.

6 years agomips: add a comment about decoding LX on Cavium
Petar Jovanovic [Mon, 25 Mar 2019 16:45:47 +0000 (16:45 +0000)] 
mips: add a comment about decoding LX on Cavium

Interpret LX as a Cavium instruction, otherwise try decoding it as a DSP
instruction.
The fallthrough is deliberate.

Related to KDE #405430.

6 years agoPPC64, fix for vrlwnm, vrlwmi, vrldrm, vrldmi instructions.
Carl Love [Fri, 22 Mar 2019 17:50:52 +0000 (12:50 -0500)] 
PPC64, fix for vrlwnm, vrlwmi, vrldrm, vrldmi instructions.

Fixes the case where the specified end bit is less then the start bit.

Valgrind bug 405734

6 years agoPPC64, fix output for xvcvdpsp instruction.
Carl Love [Fri, 22 Mar 2019 17:42:27 +0000 (12:42 -0500)] 
PPC64, fix output for xvcvdpsp instruction.

The instruction should write the output to the upper and lower 32-bit
halfs of the results.

Valgrind bugzilla 405733.

6 years agoPPC64, The function _get_maxmin_fp_NaN does not handle the case of QNaN, SNaN correctly.
Carl Love [Fri, 22 Mar 2019 17:32:29 +0000 (12:32 -0500)] 
PPC64, The function _get_maxmin_fp_NaN does not handle the case of QNaN, SNaN correctly.

This patch fixes Valgrind to handle the case of QNaN, SNaN input the same
as the HW handles it.

Valgrind bug 405365.

6 years agoPPC64, instructions xvcvdpsxws, xvcvdpuxws do not handle over/underflow, NaN correctly
Carl Love [Fri, 22 Mar 2019 17:26:00 +0000 (12:26 -0500)] 
PPC64, instructions xvcvdpsxws, xvcvdpuxws do not handle over/underflow, NaN correctly

The instructions are not checking for overflow, underflow, NaN and setting
the output correctly.

Valgrind bugzilla 405363

6 years agoPPC64, fix for vmsummbm instruction.
Carl Love [Fri, 22 Mar 2019 17:06:31 +0000 (12:06 -0500)] 
PPC64, fix for vmsummbm instruction.

The instruction needs to have the 32-bit "lane" values chopped to 32-bits.
The current lane implementation is not doing the chopping.  Need to
explicitly do the chop and add.

Valgrind bug 405362

6 years agoPPC64, fix implementation of xvcvsxdsp and xvcvuxddp instructions.
Carl Love [Fri, 22 Mar 2019 16:56:38 +0000 (11:56 -0500)] 
PPC64, fix implementation of xvcvsxdsp and xvcvuxddp instructions.

Instructions need to write result to upper and lower 32-bit half of the
64-bit result.

This is a fix for Valgrind bug 405356.

6 years agodrd: Fix an integer overflow in the stack margin calculation
Bart Van Assche [Fri, 22 Mar 2019 03:08:45 +0000 (20:08 -0700)] 
drd: Fix an integer overflow in the stack margin calculation

6 years agoupdate NEWS about the fix for KDE #405458
Petar Jovanovic [Mon, 18 Mar 2019 15:55:09 +0000 (15:55 +0000)] 
update NEWS about the fix for KDE #405458

KDE #405458 has been fixed in the previous commit

  commit 029f1196fcafb49183c87c53e3a7febc762a0dc8
  Author: Petar Jovanovic <mips32r2@gmail.com>
  Date:   Mon Mar 18 16:47:50 2019 +0100

  mips: correct order of function arguments for mkFormVEC

6 years agomips: correct order of function arguments for mkFormVEC
Petar Jovanovic [Mon, 18 Mar 2019 15:47:50 +0000 (16:47 +0100)] 
mips: correct order of function arguments for mkFormVEC

Vectors wt and ws were incorrectly received in mkFormVEC().
Issue spotted by Mark Wielaard and reported as KDE #405458.

6 years agoamd64: Implement RDRAND, VCVTPH2PS and VCVTPS2PH.
Julian Seward [Sun, 17 Mar 2019 20:41:42 +0000 (21:41 +0100)] 
amd64: Implement RDRAND, VCVTPH2PS and VCVTPS2PH.

Bug 398870 - Please add support for instruction vcvtps2ph
Bug 353370 - RDRAND amd64->IR: unhandled instruction bytes: 0x48 0xF 0xC7 0xF0

This commit implements:

* amd64 RDRAND instruction, on hosts that have it.

* amd64 VCVTPH2PS and VCVTPS2PH, on hosts that have it.

  The presence/absence of these on the host is now reflected in the CPUID
  results returned to the guest.  So code that tests for these features in
  CPUID and acts accordingly should "just work".

* New test cases, none/tests/amd64/rdrand and none/tests/amd64/f16c.  These
  are built if the host's assembler can handle them, in the usual way.

6 years agoFix Bug 404638 - Add VG_(replaceIndexXA)
Philippe Waroquiers [Sat, 16 Mar 2019 11:08:01 +0000 (12:08 +0100)] 
Fix Bug 404638 - Add VG_(replaceIndexXA)

Based on a patch from Ćukasz Marek.

Note that this function differs from:
   *(T*)VG_(indexXA)(arr, index) = new_value;
as the function will mark the array as unsorted.

Note that this function is currently unused in the current valgrind code basis,
but it is useful for tools outside of valgrind tree.

6 years agoBug 405403 - s390x: Allow using disInstr_S390 on little-endian hosts
Ilya Leoshkevich [Tue, 12 Mar 2019 18:23:55 +0000 (19:23 +0100)] 
Bug 405403 - s390x: Allow using disInstr_S390 on little-endian hosts

Certain projects, e.g. https://angr.io, use VEX as an intermediate
representation for the binary code analysis. In order to make it
possible to use them to analyze S/390 code on Intel, this patch
resolves the following issues in the disassembler:

- Bit fields, which are used to describe instruction formats, map to
  different bits on different hosts. This patch replaces them with
  macros, e.g. SS.l bit field becomes SS_l macro. Most bit field usages
  are replaced using the following perl script:

    perl -p -i \
         -e 's/\(&ovl\.value\)/&ovl/g;' \
         -e 's/ovl\.value/ovl/g;' \
         -e 's/ovl\.fmt\.([a-zA-Z\d_]+)\.([a-z\d]+)/$1_$2(ovl)/g' \
         priv/guest_s390_toIR.c

  Since after that there are no more structs, #pragma pack is also
  removed.

- Instructions are loaded from memory as words, which behaves
  differently depending on host endianness. Such loads are replaced by
  assembly of words from separately loaded bytes. This affects regular
  disassembly functions, and also s390_irgen_EXRL(), which loads
  last_execute_target this way.

- disInstr_S390() explicitly prohibits little-endian hosts with an
  assert, which is removed in this patch.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
6 years agoFinetune arch_hwcaps() in none/tests/libvex_test.c
Petar Jovanovic [Thu, 14 Mar 2019 16:02:53 +0000 (16:02 +0000)] 
Finetune arch_hwcaps() in none/tests/libvex_test.c

The libvexmultiarch_test failed on s390, since VEX was configured for MIPS64
with 32bit FPUs. Modify arch_hwcaps() to a realist case with 64bit FPUs.

This fixes KDE #402351.

6 years agoDocument 403123 as fixed
Tom Hughes [Thu, 14 Mar 2019 15:22:44 +0000 (15:22 +0000)] 
Document 403123 as fixed

6 years agoSuppress FSGSBASE flag from cpuid results
Tom Hughes [Thu, 14 Mar 2019 15:15:41 +0000 (15:15 +0000)] 
Suppress FSGSBASE flag from cpuid results

We don't support {rd,wr}{fs,gs}base so we shouldn't say we do.

6 years agoBug 399287 - amd64 front end: Illegal Instruction vcmptrueps. Add test cases.
Julian Seward [Wed, 13 Mar 2019 13:24:46 +0000 (14:24 +0100)] 
Bug 399287 - amd64 front end: Illegal Instruction vcmptrueps.  Add test cases.

6 years agoBug 399287 - amd64 front end: Illegal Instruction vcmptrueps. Fix, but no test cases.
Julian Seward [Wed, 13 Mar 2019 13:22:52 +0000 (14:22 +0100)] 
Bug 399287 - amd64 front end: Illegal Instruction vcmptrueps.  Fix, but no test cases.

6 years agoRename gettid() to gettid_sys() in gdbserver_tests.
Mark Wielaard [Mon, 4 Mar 2019 18:47:59 +0000 (19:47 +0100)] 
Rename gettid() to gettid_sys() in gdbserver_tests.

glibc might defined gettid() itself through unistd.h:
https://sourceware.org/bugzilla/show_bug.cgi?id=6399

Rename to gettid_sys() so we don't clash with the glibc definition.

6 years agoVEX/auxprogs/genoffsets.c: Add cast to my_offsetof. n-i-bz.
Julian Seward [Tue, 12 Mar 2019 17:37:15 +0000 (18:37 +0100)] 
VEX/auxprogs/genoffsets.c: Add cast to my_offsetof.  n-i-bz.

Clang/LLVM trips over my_offsetof in VEX/auxprogs/genoffsets.c.  See LLVM
PR 40890 for details (https://bugs.llvm.org/show_bug.cgi?id=40890).

Now, it's a Clang bug that Clang exits on an assertion failure rather than
emits a diagnostic, but the previous my_offsetof expression is a pointer,
not an integer.  Add a cast as done in other definitions of offsetof in
the tree.  Patch from Ed Maste <emaste@freebsd.org>.

6 years agoAdd missing documentation file from EXTRA_DIST
Rhys Kidd [Fri, 1 Feb 2019 03:21:22 +0000 (22:21 -0500)] 
Add missing documentation file from EXTRA_DIST

Ensure this documentation file is included in tarball.

Fixes: 9f3d49a ("Create 3.10.0 section in NEWS, add (first draft of) README_DEVELOPERS_processes")
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agomacOS: Don't duplicate -fno-stack-protector
Rhys Kidd [Sat, 2 Feb 2019 23:22:16 +0000 (18:22 -0500)] 
macOS: Don't duplicate -fno-stack-protector

Since f38d96d -fno-stack-protector has been added to $(AM_CFLAGS_BASE) on all
platforms, if the compiler supports it. Accordingly, there's no need to still add
this a second time specifically for macOS.

Fixes: f38d96d ("Add -Wformat -Wformat-security to the list of compile flags.")
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoconfig: Conditionalize -finline-functions on compiler support
Rhys Kidd [Sat, 2 Feb 2019 22:53:33 +0000 (17:53 -0500)] 
config: Conditionalize -finline-functions on compiler support

Certain clang compiler versions do not support -finline-functions, so only apply
this compiler option conditionally if supported.

Warnings with Apple LLVM version 8.0.0 (clang-800.0.42.1), based on upstream clang 3.9.0:

  clang: warning: optimization flag '-finline-functions' is not supported
  clang: warning: argument unused during compilation: '-finline-functions'

Fixes: 7dd9a7f ("Add -finline-functions to standard build flags, so gcc will
                 consider all functions as candidates for inlining.")

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoMakefile.am: Consistent indent and align
Rhys Kidd [Sun, 3 Feb 2019 03:18:05 +0000 (22:18 -0500)] 
Makefile.am: Consistent indent and align

This approach is utilized consistently throughout the file, and would make
alphabetical reordering easier. Adopt it here as well.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoconfig: Set automake options consistenly in one location
Rhys Kidd [Thu, 31 Jan 2019 04:12:53 +0000 (23:12 -0500)] 
config: Set automake options consistenly in one location

Avoid use of two manners of setting automake configuration options,
and consolidate them into AM_INIT_AUTOMAKE macro.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoconfig: remove unrequired AC_HEADER_STDC
Rhys Kidd [Thu, 31 Jan 2019 03:52:07 +0000 (22:52 -0500)] 
config: remove unrequired AC_HEADER_STDC

Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".

Was previously required to ensure the system has C header files conforming
to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h,
stdarg.h, string.h, and float.h.

This autoconf option was used to provide conditional fallback support
via defined STDC_HEADERS.

valgrind does not utilize conditional fallback support so, so this macro
is both obsolete and unused, so let's drop it.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoAdd a 3_14_BUGSTATUS.txt file and add to it all bugs reported since 3.14 was release.
Julian Seward [Sun, 10 Mar 2019 10:11:16 +0000 (11:11 +0100)] 
Add a 3_14_BUGSTATUS.txt file and add to it all bugs reported since 3.14 was release.

At least, the bugs are post-triaged ones, so some have been removed.

6 years agobb_to_IR(): increase assertion limits on the maximum size of self-checking translatio...
Julian Seward [Sat, 9 Mar 2019 16:58:11 +0000 (17:58 +0100)] 
bb_to_IR(): increase assertion limits on the maximum size of self-checking translations.  n-i-bz.

6 years agomodify massif/tests/mmapunmap.vgtest to comply with glibc change
Petar Jovanovic [Mon, 4 Mar 2019 18:24:55 +0000 (19:24 +0100)] 
modify massif/tests/mmapunmap.vgtest to comply with glibc change

The change in the glibc version (2.27 -> 2.28) results in one additional
function call being present in the backtrace for mips64, which leads to the
line to be checked to be out of bounds.

Changed the post line in mmapunmap.vgtest to work around this.

This fixes massif/tests/mmapunmap failure on mips64.

Patch by Stefan Maksimovic.

6 years agoBug 405079 - unhandled ppc64le-linux syscall: 131 (quotactl)
Mark Wielaard [Mon, 4 Mar 2019 16:22:56 +0000 (17:22 +0100)] 
Bug 405079 - unhandled ppc64le-linux syscall: 131 (quotactl)

quotactl is really a "generic" linux syscall that just happened to not
have been hooked up for ppc64le. Add it to syswrap-ppc64-linux.c.

6 years agoAdjust the built-in profiler so that it can try to count host insns as well as guest...
Julian Seward [Tue, 26 Feb 2019 08:57:57 +0000 (09:57 +0100)] 
Adjust the built-in profiler so that it can try to count host insns as well as guest insns.  n-i-bz.

6 years agoFix another format string signedness warning, arm64-linux only. n-i-bz.
Julian Seward [Mon, 25 Feb 2019 10:48:43 +0000 (11:48 +0100)] 
Fix another format string signedness warning, arm64-linux only.  n-i-bz.

6 years agomemcheck powerpc subfe x, x, x initializes x to 0 or -1 based on CA
Mark Wielaard [Thu, 21 Feb 2019 16:21:53 +0000 (17:21 +0100)] 
memcheck powerpc subfe x, x, x initializes x to 0 or -1 based on CA

GCC might use subfe x, x, x to initialize x to 0 or -1, based on
whether the carry flag is set. This happens in some cases when g++
compiles resetting a unique_ptr. The "trick" used by the compiler is
that it can AND a pointer with the register x (now 0x0 or 0xffffffff)
to set something to NULL or to the given pointer.

subfe is implemented as rD = (log not)rA + rB + XER[CA]
if we instead implement it as rD = rB - rA - (XER[CA] ^ 1)
then memcheck can see that rB and Ra cancel each other out if they
are the same.

https://bugs.kde.org/show_bug.cgi?id=404054

6 years agoFix missed changes from Rename some int<->fp conversion IROps patch
Carl Love [Tue, 5 Feb 2019 16:15:09 +0000 (10:15 -0600)] 
Fix missed changes from Rename some int<->fp conversion IROps patch

The previous commit 6b16f0e2a0427f57fb5dc76cbe9177ee35f997ab dated
Sat Jan 26 17:38:01 2019 by Julian Seward <jseward@acm.org> renamed some of
the int<->fp conversion Iops to add a trailing _DEP.  The patch missed
renaming two of the Iops.  This patch renames the missed Iops.

6 years agoMake the DHAT viewer components be copied into the distribution tarball. Followup...
Julian Seward [Sun, 3 Feb 2019 09:31:15 +0000 (10:31 +0100)] 
Make the DHAT viewer components be copied into the distribution tarball.  Followup to 441bfc5f51c7f5f80cc6491d23cbe2dc711d191f (dhat overhaul).

6 years agoMake the DHAT viewer components be copied into the install tree. Followup to 441bfc5...
Julian Seward [Sun, 3 Feb 2019 09:06:36 +0000 (10:06 +0100)] 
Make the DHAT viewer components be copied into the install tree.  Followup to 441bfc5f51c7f5f80cc6491d23cbe2dc711d191f (dhat overhaul).

6 years agoFix "make post-regtest-checks" after 441bfc5f51c7f5f80cc6491d23cbe2dc711d191f (dhat...
Julian Seward [Sat, 2 Feb 2019 15:10:50 +0000 (16:10 +0100)] 
Fix "make post-regtest-checks" after 441bfc5f51c7f5f80cc6491d23cbe2dc711d191f (dhat overhaul).

6 years agoAnother -Wformat-signedness fix that was missed in dee1c5ac841ef11151ddf92b1ca98be704...
Julian Seward [Sat, 2 Feb 2019 13:22:43 +0000 (14:22 +0100)] 
Another -Wformat-signedness fix that was missed in dee1c5ac841ef11151ddf92b1ca98be7041f0785.

6 years agoEnable -Wformat-signedness, if the compiler supports it.
Julian Seward [Sat, 2 Feb 2019 13:20:49 +0000 (14:20 +0100)] 
Enable -Wformat-signedness, if the compiler supports it.

6 years agoFix format string warnings from gcc9. No functional change (I think!)
Julian Seward [Sat, 2 Feb 2019 13:03:17 +0000 (14:03 +0100)] 
Fix format string warnings from gcc9.  No functional change (I think!)

6 years agoRemove reference to non-existent *.post.exp files in dhat/tests/.
Nicholas Nethercote [Fri, 1 Feb 2019 20:41:02 +0000 (07:41 +1100)] 
Remove reference to non-existent *.post.exp files in dhat/tests/.

6 years agoAdd missing stuff for a DHAT test.
Nicholas Nethercote [Fri, 1 Feb 2019 04:08:31 +0000 (15:08 +1100)] 
Add missing stuff for a DHAT test.

6 years agoOverhaul DHAT.
Nicholas Nethercote [Thu, 4 Oct 2018 01:00:22 +0000 (11:00 +1000)] 
Overhaul DHAT.

This commit thoroughly overhauls DHAT, moving it out of the
"experimental" ghetto. It makes moderate changes to DHAT itself,
including dumping profiling data to a JSON format output file. It also
implements a new data viewer (as a web app, in dhat/dh_view.html).

The main benefits over the old DHAT are as follows.

- The separation of data collection and presentation means you can run a
  program once under DHAT and then sort the data in various ways. Also,
  full data is in the output file, and the viewer chooses what to omit.

- The data can be sorted in more ways than previously. Some of these
  sorts involve useful filters such as "short-lived" and "zero reads or
  zero writes".

- The tree structure view avoids the need to choose stack trace depth.
  This avoids both the problem of not enough depth (when records that
  should be distinct are combined, and may not contain enough
  information to be actionable) and the problem of too much depth (when
  records that should be combined are separated, making them seem less
  important than they really are).

- Byte and block measures are shown with a percentage relative to the
  global count, which helps gauge relative significance of different
  parts of the profile.

- Byte and blocks measures are also shown with an allocation rate
  (bytes and blocks per million instructions), which enables comparisons
  across multiple profiles, even if those profiles represent different
  workloads.

- Both global and per-node measurements are taken at the global heap
  peak ("At t-gmax"), which gives Massif-like insight into the point of
  peak memory use.

- The final/liftimes stats are a bit more useful than the old deaths
  stats. (E.g. the old deaths stats didn't take into account lifetimes
  of unfreed blocks.)

- The handling of realloc() has changed. The sequence `p = malloc(100);
  realloc(p, 200);` now increases the total block count by 2 and the
  total byte count by 300. Previously it increased them by 1 and 200.
  The new handling is a more operational view that better reflects the
  effect of allocations on performance. It makes a significant
  difference in the results, giving paths involving reallocation (e.g.
  repeated pushing to a growing vector) more prominence.

Other things of note:

- There is now testing, both regression tests that run within the
  standard test suite, and viewer-specific tests that cannot run within
  the standard test suite. The latter are run by loading
  dh_view.html?test=1 in a web browser.

- The commit puts all tool lists in Makefiles (and similar files) in the
  following consistent order: memcheck, cachegrind, callgrind, helgrind,
  drd, massif, dhat, lackey, none; exp-sgcheck, exp-bbv.

- A lot of fields in dh_main.c have been given more descriptive names.
  Those names now match those used in dh_view.js.

6 years agos390 back end: s390_isel_vec_expr_wrk: fix some enum type confusion. n-i-bz.
Julian Seward [Thu, 31 Jan 2019 06:56:26 +0000 (07:56 +0100)] 
s390 back end: s390_isel_vec_expr_wrk: fix some enum type confusion.  n-i-bz.

In s390_isel_vec_expr_wrk() there has been some assignments of enum-typed
values to variables of different enum types.  This fixes it.  It also adds a
few initialisations to variables of type HReg for safety against the
possibility of them being used uninitialised.  No functional change.  Tested
by Andreas Arnez.

6 years agomemcheck,macos: Fix vbit-test building on macOS x86 architectures. n-i-bz.
Rhys Kidd [Tue, 29 Jan 2019 06:07:09 +0000 (01:07 -0500)] 
memcheck,macos: Fix vbit-test building on macOS x86 architectures. n-i-bz.

Secondary architectures on macOS are generally x86, which requires additional
LDFLAGS to be set to avoid linker errors.

apple clang (clang-800.0.42.1) error:
  ld: illegal text-relocation to '___stderrp' in /usr/lib/libSystem.dylib from '_main'
      in vbit_test_sec-main.o for architecture i386

Fixes: 49ca185 ("Also test memcheck/tests/vbit-test on any secondary arch.")
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
6 years agoFix callgrind_annotate Use of uninitialized value in numeric gt (>)
Philippe Waroquiers [Sun, 27 Jan 2019 12:12:42 +0000 (13:12 +0100)] 
Fix callgrind_annotate Use of uninitialized value in numeric gt (>)

When a callgrind dump file contains no event (at all I think),
then callgrind_annotate can produce the below error messages:
Ir sysCount sysTime  file:function
--------------------------------------------------------------------------------
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
 .        .       .  /build/glibc-yWQXbR/glibc-2.24/csu/../csu/libc-start.c:(below main) [/lib/x86_64-linux-gnu/libc-2.24.so]
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
 .        .       .  /build/glibc-yWQXbR/glibc-2.24/elf/../sysdeps/x86_64/dl-trampoline.h:_dl_runtime_resolve_xsave [/lib/x86_64-linux-gnu/ld-2.24.so]
Use of uninitialized value in numeric gt (>) at ../trunk_untouched/Inst/bin/callgrind_annotate line 957.
.....

The above can be produced by:
  run sleep 100 under callgrind.
  take some callgrind dumps after the startup.
  ./Inst/bin/callgrind_annotate --threshold=1  callgrind.out.31377.2

Check that the value is defined before doing the comparison.

Note: callgrind_annotate shows functions which have undefined costs
for all events (and I guess it would also show functions that have zero
costs for all events).
Maybe it would be better to not show at all such functions, rather than
show them with all '.'.

6 years agoFix callgrind_annotate --threshold=100 does not print all functions.
Philippe Waroquiers [Sun, 27 Jan 2019 11:36:33 +0000 (12:36 +0100)] 
Fix callgrind_annotate --threshold=100 does not print all functions.

6 years agoUpdate callgrind_annotate documentation.
Philippe Waroquiers [Sun, 27 Jan 2019 11:32:32 +0000 (12:32 +0100)] 
Update callgrind_annotate documentation.

Clarify the meaning of the threshold argument.
Document the per event thresholds that can be given as part
of the --sort option.

6 years agoFix callgrind_annotate non deterministic order for equal total
Philippe Waroquiers [Sun, 27 Jan 2019 10:15:30 +0000 (11:15 +0100)] 
Fix callgrind_annotate non deterministic order for equal total

Patch by Matthias Schwarzott

6 years agoSort the bug entries by bug nr, add a entry for a fixed bug.
Philippe Waroquiers [Sun, 27 Jan 2019 10:04:01 +0000 (11:04 +0100)] 
Sort the bug entries by bug nr, add a entry for a fixed bug.

6 years agoEnable warning flag -Wenum-conversion if the compiler supports it.
Julian Seward [Sat, 26 Jan 2019 17:19:50 +0000 (18:19 +0100)] 
Enable warning flag -Wenum-conversion if the compiler supports it.

This picks up some enum type confusion, and so looks useful.  Unfortunately
only Clang seems to have it; gcc doesn't.

6 years agos390 front end: remove unused function 'put_gpr_int'. n-i-bz.
Julian Seward [Sat, 26 Jan 2019 17:18:28 +0000 (18:18 +0100)] 
s390 front end: remove unused function 'put_gpr_int'.  n-i-bz.

6 years agoamd64 pipeline: generate a much better translation for PMADDUBSW.
Julian Seward [Sat, 26 Jan 2019 17:00:41 +0000 (18:00 +0100)] 
amd64 pipeline: generate a much better translation for PMADDUBSW.

This seems pretty common in some codecs, and the existing translation
was somewhat longwinded.

6 years agoRename some int<->fp conversion IROps for consistency. No functional change. n...
Julian Seward [Sat, 26 Jan 2019 16:38:01 +0000 (17:38 +0100)] 
Rename some int<->fp conversion IROps for consistency.  No functional change.  n-i-bz.

2018-Dec-27: some of int<->fp conversion operations have been renamed so as to
have a trailing _DEP, meaning "deprecated".  This is because they don't
specify a rounding mode to be used for the conversion and so are
underspecified.  Their use should be replaced with equivalents that do specify
a rounding mode, either as a first argument or using a suffix on the name,
that indicates the rounding mode to use.

6 years agoVG_(discard_translations): try to avoid invalidating the entire VG_(tt_fast) cache...
Julian Seward [Fri, 25 Jan 2019 11:06:37 +0000 (12:06 +0100)] 
VG_(discard_translations): try to avoid invalidating the entire VG_(tt_fast) cache.  n-i-bz.

It is very commonly the case that a call to VG_(discard_translations) results
in the discarding of exactly one superblock.  In such cases, it's much cheaper
to find and invalidate the VG_(tt_fast) cache entry associated with the block,
than it is to invalidate the entire cache, because

(1) invalidating the fast cache is expensive, and

(2) repopulating the fast cache after invalidation is even more expensive.

For QEMU, which intensively invalidates individual translations (presumably
due to patching them), this reduces the fast-cache miss rate from circa one in
33 lookups to around one in 130 lookups.

6 years agoUpdate.
Julian Seward [Fri, 25 Jan 2019 08:31:19 +0000 (09:31 +0100)] 
Update.

6 years agoBug 402781 - Redo the cache used to process indirect branch targets.
Julian Seward [Fri, 25 Jan 2019 08:27:23 +0000 (09:27 +0100)] 
Bug 402781 - Redo the cache used to process indirect branch targets.

Implementation for x86-solaris and amd64-solaris.  This completes the
implementations for all targets.  Note these two are untested because I don't
have any way to test them.

6 years agoBug 402781 - Redo the cache used to process indirect branch targets.
Julian Seward [Fri, 25 Jan 2019 08:14:56 +0000 (09:14 +0100)] 
Bug 402781 - Redo the cache used to process indirect branch targets.

[This commit contains an implementation for all targets except amd64-solaris
and x86-solaris, which will be completed shortly.]

In the baseline simulator, jumps to guest code addresses that are not known at
JIT time have to be looked up in a guest->host mapping table.  That means:
indirect branches, indirect calls and most commonly, returns.  Since there are
huge numbers of these (often 10+ million/second) the mapping mechanism needs
to be extremely cheap.

Currently, this is implemented using a direct-mapped cache, VG_(tt_fast), with
2^15 (guest_addr, host_addr) pairs.  This is queried in handwritten assembly
in VG_(disp_cp_xindir) in dispatch-<arch>-<os>.S.  If there is a miss in the
cache then we fall back out to C land, and do a slow lookup using
VG_(search_transtab).

Given that the size of the translation table(s) in recent years has expanded
significantly in order to keep pace with increasing application sizes, two bad
things have happened: (1) the cost of a miss in the fast cache has risen
significantly, and (2) the miss rate on the fast cache has also increased
significantly.  This means that large (~ one-million-basic-blocks-JITted)
applications that run for a long time end up spending a lot of time in
VG_(search_transtab).

The proposed fix is to increase associativity of the fast cache, from 1
(direct mapped) to 4.  Simulations of various cache configurations using
indirect-branch traces from a large application show that is the best of
various configurations.  In an extreme case with 5.7 billion indirect
branches:

* The increase of associativity from 1 way to 4 way, whilst keeping the
  overall cache size the same (32k guest/host pairs), reduces the miss rate by
  around a factor of 3, from 4.02% to 1.30%.

* The use of a slightly better hash function than merely slicing off the
  bottom 15 bits of the address, reduces the miss rate further, from 1.30% to
  0.53%.

Overall the VG_(tt_fast) miss rate is almost unchanged on small workloads, but
reduced by a factor of up to almost 8 on large workloads.

By implementing each (4-entry) cache set using a move-to-front scheme in the
case of hits in ways 1, 2 or 3, the vast majority of hits can be made to
happen in way 0.  Hence the cost of having this extra associativity is almost
zero in the case of a hit.  The improved hash function costs an extra 2 ALU
shots (a shift and an xor) but overall this seems performance neutral to a
win.

6 years agoBug 403552 s390x: Fix vector facility bit number
Andreas Arnez [Mon, 21 Jan 2019 13:10:00 +0000 (14:10 +0100)] 
Bug 403552 s390x: Fix vector facility bit number

The wrong bit number was used when checking for the vector facility.  This
can result in a fatal emulation error: "Encountered an instruction that
requires the vector facility.  That facility is not available on this
host."

In many cases the wrong facility bit was usually set as well, hence
nothing bad happened.  But when running Valgrind within a Qemu/KVM guest,
the wrong bit was not (always?) set and the emulation error occurred.

This fix simply corrects the vector facility bit number, changing it from
128 to 129.

6 years agoFix false positive 'Conditional jump or move' on amd64 64 bits ptracing 32 bits.
Philippe Waroquiers [Sat, 12 Jan 2019 14:08:59 +0000 (15:08 +0100)] 
Fix false positive 'Conditional jump or move' on amd64 64 bits ptracing 32 bits.

PTRACE_GET_THREAD_AREA is not handled by amd64 linux syswrap, which leads
to false positive errors in 64 bits program ptrace-ing 32 bits processes.

For example, the below error was wrongly reported on GDB:
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x8A1D7EC: td_thr_get_info (td_thr_get_info.c:35)
==25377==    by 0x526819: thread_from_lwp(thread_info*, ptid_t) (linux-thread-db.c:417)
==25377==    by 0x5281D4: thread_db_notice_clone(ptid_t, ptid_t) (linux-thread-db.c:442)
==25377==    by 0x51773B: linux_handle_extended_wait(lwp_info*, int) (linux-nat.c:2027)
....
==25377==  Uninitialised value was created by a stack allocation
==25377==    at 0x69A360: x86_linux_get_thread_area(int, void*, unsigned int*) (x86-linux-nat.c:278)

Fix this by implementing PTRACE_GET|SET_THREAD_AREA on amd64.

6 years agoreaddwarf3.c (parse_type_DIE): Accept DW_TAG_subrange_type with DW_AT_count
Mark Wielaard [Fri, 11 Jan 2019 20:52:26 +0000 (21:52 +0100)] 
readdwarf3.c (parse_type_DIE): Accept DW_TAG_subrange_type with DW_AT_count

GCC9 generates a subrange_type with a lower_bound and count, but no
upper_bound attribute. This simply means the upper bound is lower
plus count.

6 years agoBug 402480 Do not use %esp in clobber list.
Mark Wielaard [Fri, 11 Jan 2019 19:00:17 +0000 (20:00 +0100)] 
Bug 402480 Do not use %esp in clobber list.

This is the same fix as for amd64-linux, but now for x86-linux.

6 years agoBug 402519 - POWER 3.0 addex instruction incorrectly implemented
Mark Wielaard [Mon, 31 Dec 2018 21:26:31 +0000 (22:26 +0100)] 
Bug 402519 - POWER 3.0 addex instruction incorrectly implemented

addex uses OV as carry in and carry out. For all other instructions
OV is the signed overflow flag. And instructions like adde use CA
as carry.

Replace set_XER_OV_OV32 with set_XER_OV_OV32_ADDEX, which will
call calculate_XER_CA_64 and calculate_XER_CA_32, but with OV
as input, and sets OV and OV32.

Enable test_addex in none/tests/ppc64/test_isa_3_0.c and update
the expected output. test_addex would fail to match the expected
output before this patch.

6 years agoAdd memcheck/tests/vbit-test/vbit-test-sec in .gitignore
Philippe Waroquiers [Sat, 29 Dec 2018 09:23:35 +0000 (10:23 +0100)] 
Add memcheck/tests/vbit-test/vbit-test-sec in .gitignore

6 years agoSome more .exp changes following --show-error-list new option
Philippe Waroquiers [Sat, 29 Dec 2018 09:20:33 +0000 (10:20 +0100)] 
Some more .exp changes following --show-error-list new option

A few .exp files (not tested on amd64) have to be changed to
have the messages in the new order:
  Use --track-origins=yes to see where uninitialised values come from
  For lists of detected and suppressed errors, rerun with: -s

6 years agoFix the name of the option in the FIXED BUGS section
Philippe Waroquiers [Fri, 28 Dec 2018 23:25:34 +0000 (00:25 +0100)] 
Fix the name of the option in the FIXED BUGS section

6 years agoDocument new options --show-error-list=no|yes and -s in NEWS
Philippe Waroquiers [Sun, 23 Dec 2018 22:48:41 +0000 (23:48 +0100)] 
Document new options --show-error-list=no|yes and -s in NEWS

6 years agoDocument the new options --show-error-list and -s
Philippe Waroquiers [Sun, 23 Dec 2018 22:44:54 +0000 (23:44 +0100)] 
Document the new options --show-error-list and -s

6 years agoModify .exp files following the new error message.
Philippe Waroquiers [Sun, 23 Dec 2018 22:35:17 +0000 (23:35 +0100)] 
Modify .exp files following the new error message.

Change:
For counts of detected and suppressed errors, rerun with: -v
to
For lists of detected and suppressed errors, rerun with: -s

6 years agoImplement option --show-error-list=no|yes -s
Philippe Waroquiers [Sun, 23 Dec 2018 21:56:38 +0000 (22:56 +0100)] 
Implement option --show-error-list=no|yes -s

This option allows to list the detected errors and show the used
suppressions without increasing the verbosity.
Increasing the verbosity also activates a lot of messages that
are often not very useful for the user.
So, this option allows to see the list of errors and used suppressions
independently of the verbosity.

Note if a high verbosity is selected, the behaviour is unchanged.
In other words, when specifying -v, the list of detected errors
and the used suppressions are still shown, even if
--show-error-list=yes and -s are not used.

6 years agoFactorize producing the 'For counts of detected and suppressed errors' msg
Philippe Waroquiers [Sun, 23 Dec 2018 19:35:09 +0000 (20:35 +0100)] 
Factorize producing the 'For counts of detected and suppressed errors' msg

Each tool producing errors had identical code to produce this msg.
Factorize the production of the message in m_main.c

This prepares the work to have a specific option to show the list
of detected errors and the count of suppressed errors.

This has a (small) visible effect on the output of memcheck:
Instead of producing
  For counts of detected and suppressed errors, rerun with: -v
  Use --track-origins=yes to see where uninitialised values come from
memcheck now produces:
  Use --track-origins=yes to see where uninitialised values come from
  For counts of detected and suppressed errors, rerun with: -v

i.e. the track origin and counts of errors msg are inverted.

6 years agoAdd vbit-test-sec.vgtest and vbit-test-sec.stderr.exp to EXTRA_DIST.
Mark Wielaard [Sun, 23 Dec 2018 22:42:27 +0000 (23:42 +0100)] 
Add vbit-test-sec.vgtest and vbit-test-sec.stderr.exp to EXTRA_DIST.

6 years agoMention 402481 as fixed in NEWS.
Mark Wielaard [Sun, 23 Dec 2018 22:11:42 +0000 (23:11 +0100)] 
Mention 402481 as fixed in NEWS.

6 years agotests/amd64: Do not clobber %rsp register
Khem Raj [Sat, 22 Dec 2018 23:28:40 +0000 (15:28 -0800)] 
tests/amd64: Do not clobber %rsp register

This is seen with gcc-9.0 compiler now which is fix that gcc community
did recently
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813

Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 years agoAlso test memcheck/tests/vbit-test on any secondary arch.
Mark Wielaard [Sun, 23 Dec 2018 12:29:27 +0000 (13:29 +0100)] 
Also test memcheck/tests/vbit-test on any secondary arch.

If we are building a secondary arch then also build and run the
memcheck vbit-test for that architecture.

6 years agoBug 402481 - vbit-test fails on x86 for Iop_CmpEQ64 iselInt64Expr Sar64(Sub64(t14...
Julian Seward [Sun, 23 Dec 2018 21:02:03 +0000 (22:02 +0100)] 
Bug 402481 - vbit-test fails on x86 for Iop_CmpEQ64 iselInt64Expr Sar64(Sub64(t14,Shr64(t14,0x1:I8)),0x3F:I8).

Fixes the failure by implementing Iop_Sar64 in the x86 back end.

6 years agoFix 402395 coregrind/vgdb-invoker-solaris.c: 2 * poor error checking
Philippe Waroquiers [Sun, 23 Dec 2018 13:49:25 +0000 (14:49 +0100)] 
Fix 402395  coregrind/vgdb-invoker-solaris.c: 2 * poor error checking

2 size_t variables were used as return value of read syscalls,
while ssize_t must be used.

6 years agoamd64 back end: generate improved SIMD64 code.
Julian Seward [Sat, 22 Dec 2018 18:01:50 +0000 (19:01 +0100)] 
amd64 back end: generate improved SIMD64 code.

For most SIMD operations that happen on 64-bit values (as would arise from MMX
instructions, for example, such as Add16x4, CmpEQ32x2, etc), generate code
that performs the operation using SSE/SSE2 instructions on values in the low
halves of XMM registers.  This is much more efficient than the previous scheme
of calling out to helper functions written in C.  There are still a few SIMD64
operations done via helpers, though.

6 years agoamd64 back end: generate better code for 2x64<-->V128 and 4x64<-->V256 transfers ..
Julian Seward [Sat, 22 Dec 2018 17:04:42 +0000 (18:04 +0100)] 
amd64 back end: generate better code for 2x64<-->V128 and 4x64<-->V256 transfers ..

.. by adding support for MOVQ xmm/ireg and using that to implement 64HLtoV128,
4x64toV256 and their inverses.  This reduces the number of instructions,
removes the use of memory as an intermediary, and avoids store-forwarding
stalls.

6 years agoamd64 pipeline: improve performance of cvtdq2ps and cvtps2dq (128 and 256 bit version...
Julian Seward [Sat, 22 Dec 2018 15:11:39 +0000 (16:11 +0100)] 
amd64 pipeline: improve performance of cvtdq2ps and cvtps2dq (128 and 256 bit versions) ..

.. by giving them their own vector IROps rather than doing each lane individually.

6 years agoamd64 back end: generate better code for 128/256 bit vector shifts by immediate....
Julian Seward [Sat, 22 Dec 2018 12:34:11 +0000 (13:34 +0100)] 
amd64 back end: generate better code for 128/256 bit vector shifts by immediate.  n-i-bz.

6 years agoamd64 pipeline: generate much better code for pshufb mm/xmm/ymm. n-i-bz.
Julian Seward [Sat, 22 Dec 2018 06:23:00 +0000 (07:23 +0100)] 
amd64 pipeline: generate much better code for pshufb mm/xmm/ymm.  n-i-bz.

pshufb mm/xmm/ymm rearranges byte lanes in vector registers.  It's fairly
widely used, but we generated terrible code for it.  With this patch, we just
generate, at the back end, pshufb plus a bit of masking, which is a great
improvement.

6 years agoamd64 hosts: detect SSSE3 (not SSE3) capabilities on the host. As-yet unused. n...
Julian Seward [Sat, 22 Dec 2018 05:06:19 +0000 (06:06 +0100)] 
amd64 hosts: detect SSSE3 (not SSE3) capabilities on the host.  As-yet unused.  n-i-bz.

6 years agoFix memcheck/tests/undef_malloc_args failure.
Julian Seward [Wed, 12 Dec 2018 12:55:01 +0000 (13:55 +0100)] 
Fix memcheck/tests/undef_malloc_args failure.

Try harder to trigger a memcheck error if a value is (partially) undefined.