Andreas Arnez [Tue, 3 Nov 2020 17:17:30 +0000 (18:17 +0100)]
Bug 428648 - s390x: Force 12-bit amode for vector loads in isel
Similar to Bug 417452, where the instruction selector sometimes attempted
to generate vector stores with a 20-bit displacement, the same problem has
now been reported with vector loads.
The problem is caused in s390_isel_vec_expr_wrk(), where the addressing
mode is generated with s390_isel_amode() instead of
s390_isel_amode_short(). This is fixed.
Julian Seward [Fri, 30 Oct 2020 16:34:14 +0000 (17:34 +0100)]
arm64 front end: mark a couple of vector load/store insns as "verbose".
Mark
LD3/ST3 (multiple 3-elem structs to/from 3 regs
LD4/ST4 (multiple 4-elem structs to/from 4 regs
as "verbose", since they can generate so much IR that a long sequence
of them causes later stages of the JIT to run out of space.
Mark Wielaard [Fri, 16 Oct 2020 00:55:06 +0000 (02:55 +0200)]
Support new faccessat2 linux syscall (439)
faccessat2 is a new syscall in linux 5.8 and will be used by glibc 2.33.
faccessat2 is simply faccessat with a new flag argument. It has
a common number across all linux arches.
Carl Love [Wed, 13 May 2020 20:19:07 +0000 (15:19 -0500)]
Add ISA 3.1 Vector Integer Multiply/Divide/Modulo Instructions
Add support for:
vdivesd Vector Divide Extended Signed Doubleword
vdivesw Vector Divide Extended Signed Word
vdiveud Vector Divide Extended Unsigned Doubleword
vdiveuw Vector Divide Extended Unsigned Word
vdivsd Vector Divide Signed Doubleword
vdivsw Vector Divide Signed Word
vdivud Vector Divide Unsigned Doubleword
vdivuw Vector Divide Unsigned Word
vmodsd Vector Modulo Signed Doubleword
vmodsw Vector Modulo Signed Word
vmodud Vector Modulo Unsigned Doubleword
vmoduw Vector Modulo Unsigned Word
vmulhsd Vector Multiply High Signed Doubleword
vmulhsw Vector Multiply High Signed Word
vmulhud Vector Multiply High Unsigned Doubleword
vmulhuw Vector Multiply High Unsigned Word
vmulld Vector Multiply Low Doubleword
Mark Wielaard [Wed, 23 Sep 2020 10:49:34 +0000 (12:49 +0200)]
Fix isa 3.1 test code on ppc64.
On ppc64 [old big endian] altivec.h can not be included directly.
Move the HAS_ISA_3_1 guard around so the include is only done when
the full test (and test_list_t) are build.
Apparently on Fedora 33 the POSIX thread functions exist in both libc and
libpthread. Hence this patch that intercepts the pthread functions in
libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 .
On amd64, use by default the expensive instrumentation scheme for Iop_Add32.
This is necessary to avoid some false positives in code compiled by clang 10
at -O2. Some very crude measurements suggest the increase in generated code
size is around 0.2%, viz, insignificant.
Bug 425820 - Failure to recognize vpcmpeqq as a dependency breaking idiom.
In the IR optimiser (ir_opt.c): Recognise the following IROps as
dependency-breaking ops that generate an all-ones output: Iop_CmpEQ16x4
Iop_CmpEQ32x2 Iop_CmpEQ64x2 Iop_CmpEQ8x32 Iop_CmpEQ16x16 Iop_CmpEQ64x4. I
think this fixes all the known cases for sizes 32 bits to 256 bits. It also
fixes bug 425820.
This commit implements amd64 RDSEED instruction, on hosts that have it
and adds the new test case - none/tests/amd64/rdseed based on the existing
rdrand support.
Mark Wielaard [Tue, 18 Aug 2020 21:58:55 +0000 (23:58 +0200)]
Fix epoll_ctl setting of array event and data fields.
Fix for https://bugs.kde.org/show_bug.cgi?id=422623 in commit ecf5ba119
epoll_ctl warns for uninitialized padding on non-amd64 64bit arches
contained a bug. A pointer to an array is not a pointer to a pointer to
an array. Found by a Fedora user:
https://bugzilla.redhat.com/show_bug.cgi?id=1844778#c10
Mark Wielaard [Sun, 26 Jul 2020 19:17:23 +0000 (21:17 +0200)]
Handle REX prefixed JMP instruction.
The NET Core runtime might generate a JMP with a REX prefix.
For Jv (32bit offset) and Jb (8bit offset) this is valid.
Prefixes that change operand size are ignored for such JMPs.
So remove the check for sz == 4 and force sz = 4 for Jv.
Fix warning in syswrap sched_getattr print format.
m_syswrap/syswrap-linux.c:3716:10: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'RegWord' {aka 'long unsigned int'} [-Wformat=]
Mark Wielaard [Sun, 26 Jul 2020 20:40:22 +0000 (22:40 +0200)]
epoll_ctl warns for uninitialized padding on non-amd64 64bit arches
struct vki_epoll_event is packed on x86_64, but not on other 64bit
arches. This means that on 64bit arches there can be padding in the
epoll_event struct. Seperately the data field is only used by user
space (which might not set the data field if it doesn't need to).
Only check the events field on epoll_ctl. But assume both events
and data are both written to by epoll_[p]wait (exclude padding).
Mark Wielaard [Tue, 30 Jun 2020 15:51:49 +0000 (17:51 +0200)]
Add new auxchecks target that runs GNU Scientific Library tests.
Replace the gsl16test script under auxprogs that you run by hand
with a new make target auxchecks which fetches the source code,
patches, reconfigures and builds all tests. Then run all tests
under valgrind.
Carl Love [Tue, 9 Jun 2020 15:42:03 +0000 (10:42 -0500)]
Power PC Fix extraction of the L field for sync instruction
The L field is currently a two bit[22:21] field in ISA 3.0. The size of the
L field has changed over time.
Currently the ISA 3.0 Valgrind sync instruction support code sets the
flag_L for the instruction L field to a five bit value that includes bits
that are marked reserved the sync instruction. This patch fixes the issue for ISA 3.0
to only setting flag_L the specified two bits.
Mark Wielaard [Tue, 9 Jun 2020 09:23:46 +0000 (11:23 +0200)]
docs: Make sure all elements that need it have an id tag.
When generating HTML it is useful if every element that can be referenced
has a stable id. If it doesn't a random one is generated which makes it
harder to link to parts of the manual on the website. It also generates
spurious diffs. Explicitly add an id tag for the sect2 and sect3 elements
in dh-manual, a unique id for each legalnotice element and for each
FAQ question and answer.
Mark Wielaard [Mon, 8 Jun 2020 13:14:04 +0000 (15:14 +0200)]
doc/Makefile.am: Turn valid-manual and valid-manpages into real targets
Make valid-manual and valid-manpages real, separate make targets.
This means they can be run in parallel and they will only be run
once when doing make check, unless one of the manual and manpages
files has been touched.
Mark Wielaard [Mon, 8 Jun 2020 11:27:28 +0000 (13:27 +0200)]
guest_ppc_toIR: Call vpanic not just vex_printf when the impossible happens
is_Zero_Vector, is_Denorm_Vector, is_NaN_Vector and negate_Vector
only handle an Ity_I32 element size. And that is also what they are
currently being called with. In case they would ever be called with
a different element_size they would simply vex_printf and continue
(producing bogus/impossible results). To make this a bit more future
proof (and to silence a static analyzer) vpanic instead.
Mark Wielaard [Mon, 8 Jun 2020 11:24:47 +0000 (13:24 +0200)]
helgrind: If hg_cli__realloc fails, return NULL.
helgrind would not handle a failing realloc correctly and assume
cli_malloc would always succeed. If cli_malloc fails in hg_cli__realloc
do like dh and massif and fail the realloc call by returning NULL.
Assad Hashmi [Fri, 15 May 2020 14:44:14 +0000 (16:44 +0200)]
Enable v8.1 atomics and fix SWP and LDUMAX instructions.
The atomics test drd/tests/std_mutex hangs on Arm v8.1 when built
with GCC10. Add HWCAP_ATOMICS to ARM64_SUPPORTED_HWCAP and fix the
ldumax and swp instructions to make it work.
Mark Wielaard [Tue, 12 May 2020 14:58:36 +0000 (16:58 +0200)]
gcc10 arm64 build needs __getauxval for linking with libgcc
Provide a new library libgcc-sup-<platform>.a that contains symbols
needed by libgcc. This needs to be linked after -lgcc to provide
any symbols missing which would normally be provided by glibc.
At the moment this only provides __getauxval on arm64 linux.
Mark Wielaard [Thu, 14 May 2020 16:47:57 +0000 (18:47 +0200)]
Resolve id conflicts in See Also sections in valgrind and vgdb manpages.
Because the manpages are processed together they cannot contain the
same ids. Both the valgrind and vgdb manpage reference the vgdb main
manual URL. That conflicts even though the valgrind.1 and vgdb.1 manual
page are separate. Prefixing the vgdb ids (with "vgdb-") works around
the conflict. It still works fine, since in vgdb the references are only
directly used in the "See Also" refsect. The labels and urls still come
out as intended.
With this fix make valid validates both the manual index.xml and
manpages-index.xml without errors.
Mark Wielaard [Thu, 14 May 2020 14:07:04 +0000 (16:07 +0200)]
Turn manpages-index.xml into a "real" book, so it can be validated.
manpages-index.xml is just to easily get at each individual man page
with xsltproc. It wasn't a complete docbookx xml file. Now that it is
we can validate it with xmllint. It doesn't fully validate, but we
are close.
Mark Wielaard [Thu, 14 May 2020 13:11:56 +0000 (15:11 +0200)]
Use DTD DocBook XML V4.5 everywhere.
This makes the rule for xmllint easier since it doesn't need to
override the DTD to validate against. It also helps with other tools
tryinf to process the docbookx xml files.
Mark Wielaard [Thu, 14 May 2020 10:54:23 +0000 (12:54 +0200)]
Update README_DEVELOPERS and references to --vex-guest-chase-thresh.
Add a hint about using lldb in README_DEVELOPERS and fix any old references
to --vex-guest-chase-thresh=0 to --vex-guest-chase=no (mirroring the change
in commit 56e04256a "Rationalise --vex-guest* flags in the new IRSB
construction framework".