Adding MIPS N32 ABI support.
BZ issue - #345763.
Contributed and maintained by mulitple people over the years:
Crestez Dan Leonard, Maran Pakkirisamy, Dimitrije Nikolic,
Aleksandar Rikalo, Tamara Vlahovic.
* Addition of a new configure option --enable-lto=yes or --enable-lto=no
Default value is --enable-lto=no, as the build is significantly slower,
so is not appropriate for valgrind development : this should be used
only on buildbots and/or by packagers.
* Some files containins asm functions have to be compiled without lto:
coregrind/m_libcsetjmp.c
coregrind/m_main.c
If these are compiled with lto, that gives undefined symbols at link time.
The files to compile without lto are
coregrind/m_libcsetjmp.c
coregrind/m_main.c
To compile these files with other options, a noinst target lib is defined.
The objects of this library are then added to the libcoregrind.
* memcheck/mc_main.c : move the handwritten asm helpers to mc_main_asm.c.
This avoids undefined symbols on some toolchains. Due to this,
the preprocessor symbols that activate the fast or asm memcheck helpers
are moved to mc_include.h
Platforms with handwritten helpers will also have the memcheck primary
map defined non static.
* In VEX, auxprogs/genoffsets.c also has to be compiled without lto,
as the asm produced by the compiler is post-processed to produce
pub/libvex_guest_offsets.h. lto not producing asm means the generation
fails if we used -flto to compile this file.
* all the various Makefile*am are modified to use LTO_CFLAGS for
(most) targets. LTO_CFLAGS is empty when --enable-lto=no,
otherwise is set to the flags needed for gcc.
If --enable-lto=no, LTO_AR and LTO_RANLIB are the standard AR and RANLIB,
otherwise they are the lto capable versions (gcc-ar and gcc-ranlib).
* This has been tested on:
debian 9.4/gcc 6.3.0/amd64+x86
rhel 7.4/gcc 6.4.0/amd64
ubuntu 17.10/gcc 7.2.0/amd64+x86
fedora26/gcc 7.3.1/s390x
No regressions on the above.
Use AC_PROG_CC_C99 in configure.ac to make sure the compiler we use is
always in C99 mode. If we detect the compiler doesn't support C99 then
error out.
This set of tests covers the whole MSA instruction set:
none/tests/mips32/msa_arithmetic
none/tests/mips32/msa_comparison
none/tests/mips32/msa_data_transfer
none/tests/mips32/msa_fpu
none/tests/mips32/msa_logical_and_shift
none/tests/mips32/msa_shuffle
none/tests/mips64/msa_arithmetic (symlink to mips32)
none/tests/mips64/msa_comparison (symlink to mips32)
none/tests/mips64/msa_data_transfer
none/tests/mips64/msa_fpu (symlink to mips32)
none/tests/mips64/msa_logical_and_shift (symlink to mips32)
none/tests/mips64/msa_shuffle (symlink to mips32)
Contributed by:
Tamara Vlahovic, Aleksandar Rikalo and Aleksandra Karadzic.
Related BZ issue - #382563.
If native compiler can build Valgrind for mips32 o32 on native mips64
system, it should do it.
This change adds a second architecture for MIPS in a similar way how it has
been previously done for amd64 and ppc64.
clang has been reasonably good at standards compliance for a while now, and
the Apple-shipped clang-variant in Xcode remains fairly close to upstream.
Let's assume that the Apple-shipped clang-variant is sufficient for
building valgrind, provided it is above a minimum version of 5.1.
Some compilers actually do not support -pie and report its usage
as an error. We need to check if it is safe to use it first.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16463
We need to actually link instead of just compile.
Fixes BZ#382256.
Patch by: Ross Burton <ross@burtonini.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16459
Note: this just unbreaks the build on avx + non_adx capable systems
(such as gcc farm gcc20).
adx capable system should probably be better handled:
* ./tests/x86_amd64_features cannot check for adx flag
(so fb_test_amd64 is run if compiled and system is avx capable, which
might give problems if gcc/as can compile the test, but the cpu
cannot execute adx instructions)
* on an adx capable system, a native run of cpuid tells it is adx capable
but under valgrind, cpuid reports the valgrind synthetic cpu is not adx
capable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16401
Fixes BZ#374963.
Previously Valgrind failed to start when the executable contained
large text, data or bss segments. The load address was increased
for almost all platforms to 0x58000000 (from 0x38000000),
giving another 512 MB for the executable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16383
Compiler produces position independent executables (PIE) by default
which gets in the way of some unit tests.
Fixes BZ#377066.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16349
- add musl libc detection (prevents configure error)
- adjust preload and symbol names (based on the OpenWrt patch, see [1])
[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/
200-musl_fix.patch?rev=46302
Patch by Peter Seiderer <ps.report@gmx.net>
It fixes Bug 359202.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16296
variable to not be set.
The mask64 value, in file VEX/priv/guest_ppc_toIR.c is missing the
HWCAPS bit for ISA3.0.
vex commit 3317.
bugzilla 377478
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16270
on Solaris so that only shared library is considered.
Previously a binary was checked which now started to produce
incorrect results with regards to vg_preload.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16142
This patch makes the following updates:
- Update the configure scripts to fix a configure/build issue seen on Power 7
- Update the ISA 3.0 hwcaps string.
- Update the ISA 3.0 ifdef value to be consistent with the hwcaps string
The patch was submitted by Will Schmidt. Patch reviewed and tested by Carl Love
on Power 7, Power 8 LE and BE, ISA 3.0 simulator for LE and BE.
Bugzilla 369175
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16034
An earlier change introduced a think-o in the altivec capability
check, allowing a false positive if the compiler supported altivec
but the hardware did not.
Resolves bug #368412 - False positive result for altivec capability check
Patch by Will Schmidt <will_schmidt@vnet.ibm.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15952
SUNWDTRACE program header. Newer Solaris no longer utilizes
this program header as a scratchspace for DTrace fasttrap
provider, before libc is loaded.
For the time being, it serves as a space for initial thread
pointer.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15936
- zlib ELF gABI format with SHF_COMPRESSED flag (gcc option -gz=zlib)
- zlib GNU format with .zdebug sections (gcc option -gz=zlib-gnu)
Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>
Fixes BZ#303877
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15868
The Floating-point condition code bits FPCC is bits[15:12] of the FPSCR.
The instructions fcmpu, fcmpo, dcmpu, dcmpq, dtstdc, dtstdcq, xscmpodq
and xscmpudq set the FPCC bits in addition to the BE field of the CC
register. This support is needed by the ISA 3.0 instructions to be added.
Added support to emulate the modsw, moduw, modsd, modud, extswsli,
maddld, maddhd, maaddhdu, xxperm, xxpermr, vabsdub, vabsduh, vabsduw,
mtvsrws, xxextractuw, xxinsertw, xxspltib, xxbrh, xxbrw, xxbrd, xxbrq,
vpermr, vextractub, vextractuh, vextractuw, vextractd, vinsertb, vinserth,
vinsertw, vinsertd, lxvwsx, stxvb16x, stxvx, lxvb16x, lxvh8x, lxvx
instructions.
valgrind bugzilla 359767
VEX commit 3214
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15837
The new memcheck/tests/arm64-linux/scalar test is based on the
memcheck/tests/x86-linux/scalar test and contains all syscalls
that are also available on arm64. To make comparison of exp results
easier the order of the tested syscalls is the same as on x86.
This enables a couple extra arm64 syscalls. Part of the fix for
bug #359503 - Add missing syscalls for aarch64 (arm64).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15825
Instead of passing an option to the configure script, use runtime detection
of the page size. Remove the "--with-pagesize" parameter from the configure
script.
Also accept 8k and 32k as valid page sizes.
Patch by Maran Pakkirisamy
It fixes BZ#342356.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15813