16673 Commits

Author SHA1 Message Date
Paul Floyd
b45e5c56cd Fix build on Solaris 11.3 - ar does not like empty object files. 2020-11-05 15:58:23 +01:00
Andreas Arnez
ba73f8d2eb 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.
2020-11-04 19:58:23 +01:00
Julian Seward
2471e0521d 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.
2020-10-30 17:34:14 +01:00
Bart Van Assche
3073d03e4b drd: Unbreak the musl build
See also https://bugs.kde.org/show_bug.cgi?id=428035.

Reported-by: Stacy <stacy.gaikovaia@windriver.com>
Fixes: 15330adf7c24 ("drd: Port to Fedora 33")
2020-10-21 17:33:30 -07:00
Mark Wielaard
fe4b349df3 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.

https://bugs.kde.org/427787
2020-10-16 02:55:06 +02:00
Bart Van Assche
01f01fd910 drd: Update copyright notices 2020-10-10 18:11:31 -07:00
Carl Love
ef76075436 SIMD Permute-Class operations powerpc tests 2020-10-07 12:17:32 -05:00
Carl Love
349102dcc7 ISA 3.1 SIMD Permute-Class Operations
Add support for:

vxvkq Load VSX Vector Special Value Quadword
vextddvlx Vector Extract Double Dword to VSR Left-Indexed
vextddvrx Vector Extract Double Dword to VSR Right-Indexed
vextdubvlx Vector Extract Double Unsigned Byte to VR Left-Indexed
vextdubvrx Vector Extract Double Unsigned Byte to VR Right-Indexed
vextduhvlx Vector Extract Double Unsigned Hword to VR Left-Indexed
vextduhvrx Vector Extract Double Unsigned Hword to VR Right-Indexed
vextduwvlx Vector Extract Double Unsigned Word to VR Left-Indexed
vextduwvrx Vector Extract Double Unsigned Word to VR Right-Indexed
vinsblx Vector Insert Byte from GPR Left-Indexed
vinsbrx Vector Insert Byte from GPR Right-Indexed
vinsbvlx Vector Insert Byte from VSR Left-Indexed
vinsbvrx Vector Insert Byte from VSR Right-Indexed
vinsd Vector Insert Dword from GPR
vinsdlx Vector Insert Dword from GPR Left-Indexed
vinsdrx Vector Insert Dword from GPR Right-Indexed
vinshlx Vector Insert Hword from GPR Left-Indexed
vinshrx Vector Insert Hword from GPR Right-Indexed
vinshvlx Vector Insert Hword from VSR Left-Indexed
vinshvrx Vector Insert Hword from VSR Right-Indexed
vinsw Vector Insert Word from GPR
vinswlx Vector Insert Word from GPR Left-Indexed
vinswrx Vector Insert Word from GPR Right-Indexed
vinswvlx Vector Insert Word from VSR Left-Indexed
vinswvrx Vector Insert Word from VSR Right-Indexed
vsldbi Vector Shift Left Double by Bit Immediate
vsrdbi Vector Shift Right Double by Bit Immediate
xxblendvb VSX Vector Blend Variable Byte
xxblendvd VSX Vector Blend Variable Dword
xxblendvh VSX Vector Blend Variable Hword
xxblendvw VSX Vector Blend Variable Word
xxpermx VSX Vector Permute Extended
xxsplti32dx VSX Vector Splat Immediate32 Dword Indexed
xxspltidp VSX Vector Splat Immediate DP
xxspltiw VSX Vector Splat Immediate Word
2020-10-07 11:36:08 -05:00
Carl Love
e3d3255421 Vector Integer Multiply/Divide/Modulo Instruction tests 2020-10-07 11:33:27 -05:00
Carl Love
78e7de504c VSX 32-byte storage access operations 2020-10-07 10:52:52 -05:00
Carl Love
5fcffeabeb Set boolean support tests 2020-10-07 10:52:47 -05:00
Carl Love
ba7b334361 Add byte reverse tests ; cleanups to foundation patch. 2020-10-07 10:52:42 -05:00
Carl Love
02b6a1de06 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
2020-10-07 10:52:29 -05:00
Will Schmidt
34d142fffb Add ISA 3.1 VSX 32-byte Storage Access Operations
Add support for the new ISA 3.1 load and store
instructions:

lxvpx Load VSX Vector Paired Indexed
plxvp Prefixed Load VSX Vector Paired
pstxvp Prefixed Store VSX Vector Paired
stxvpx Store VSX Vector Paired Indexed

Update the parsing of the lxvp and stxvp instructions that
were previously added.

lxvp Load VSX Vector Paired
stxvp Store VSX Vector Paired

A couple of format changes for the arguments to the
calculate_prefix_EA function.

Add comments to the else if and case statement to
clarify which instructions meet this condition.
2020-10-07 10:52:21 -05:00
Carl Love
4e75ca1578 Add ISA 3.1 Set Boolean Extension instruction support
Add support for the new ISA 3.1 set boolean condition
word instructions:

setbc Set Boolean Condition
setbcr Set Boolean Condition Reverse
setnbc Set Negative Boolean Condition
setnbcr Set Negative Boolean Condition Reverse.
2020-10-07 10:52:16 -05:00
Carl Love
298a0b02c8 Add ISA 3.1 Byte-Reverse Instruction support
Add support for the new ISA 3.1 word instructions:

brd Byte-Reverse Doubleword
brh Byte-Reverse Halfword
brw Byte-Reverse Word
2020-10-07 10:52:04 -05:00
Mark Wielaard
2593ccd82c Update .gitignore with none/tests/amd64/rdseed 2020-09-25 21:21:35 +02:00
Carl Love
3bef7de98b PPC64 tests Makefile.am cleanup
Fix the file consistency check in none/tests/ppc64/Makefile.am.  Subsequent
patches for the PPC ISA 3.1 support will fully add the additional tests.
2020-09-25 11:16:12 -05:00
Mark Wielaard
686f2a7747 ir_defs.c: Iop_MAddF32 and Iop_MSubF32 are no (longer) s390 specific. 2020-09-23 12:51:27 +02:00
Mark Wielaard
7090a99bfc VEX/priv/guest_arm64_toIR.c: Fix vpanic messages mixup in mkDIVF. 2020-09-23 12:51:27 +02:00
Mark Wielaard
cea0056fcf 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.
2020-09-23 12:51:27 +02:00
Carl Love
baf60c0f06 Fix common isa 3.1 test code
The code in test_isa_3_1_common.c should only be included
if ISA 3.1 support exists.
2020-09-22 19:17:37 -05:00
Carl Love
336b8c514d Prefixed load-store support 2020-09-22 11:48:30 -05:00
Carl Love
2a88a98f5b valgrind isa 3.1 foundation
header files and other common parts associated with the initial isa v3.1
support
2020-09-22 11:48:25 -05:00
Carl Love
459d52ec1f Add prefixed support for the following word instructions.
addi    Add Immediate
lbz     Load Byte & Zero
ld      Load Doubleword
lfd     Load Floating Double
lfs     Load Floating Single
lha     Load Halfword Algebraic
lhz     Load Halfword & Zero
lq      Load Quadword
lwa     Load Word Algebraic
lwz     Load Word & Zero
lxsd    Load VSX Scalar Doubleword
lxssp   Load VSX Scalar Single-Precision
lxv     Load VSX Vector
stb     Store Byte
std     Store Doubleword
stfd    Store Floating Double
stfs    Store Floating Single
sth     Store Halfword
stq     Store Quadword
stw     Store Word
stxsd   Store VSX Scalar Doubleword
stxssp  Store VSX Scalar Single-Precision
stxv    Store VSX Vector
2020-09-22 11:48:21 -05:00
Carl Love
ad293d5168 Instruction Prefix Support 2020-09-22 11:48:16 -05:00
Carl Love
ebcf62b047 Add check for isa 3.1 support 2020-09-22 11:48:08 -05:00
Bart Van Assche
15330adf7c drd: Port to Fedora 33
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 .
2020-09-19 08:50:37 -07:00
Julian Seward
913ed1fa17 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.
2020-09-19 12:11:43 +02:00
Julian Seward
92eec784a3 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.
2020-09-19 12:05:26 +02:00
Alexandra Hájková
17d2989a9e amd64: Implement RDSEED
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.

https://bugs.kde.org/show_bug.cgi?id=424298
2020-09-03 23:33:07 +02:00
Mark Wielaard
cd2e52bfdf Correct vpanic message in guest_arm64_toIR.c for mkABSF/mkSQRTF.
I didn't actually see these vpanics, so they might never trigger. But
both would vpanic as if for mkNEGF, which is clearly wrong and confusing.
2020-08-31 12:25:54 +02:00
Mark Wielaard
86277041a2 Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave*
Newer glibc have alternate ld.so _ld_runtime_resolve functions.
Namely _dl_runtime_resolve_xsave and _dl_runtime_resolve_xsavec

This patch recognizes the xsave, xsvec and fxsave variants and
changes callgrind so that any variant counts as _dl_runtime_resolve.

Original patch by paulo.cesar.pereira.de.andrade@gmail.com
https://bugs.kde.org/show_bug.cgi?id=415293
2020-08-25 16:37:43 +02:00
Mark Wielaard
b74f9f23c8 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
2020-08-18 23:58:55 +02:00
Mark Wielaard
0c23373b70 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.

https://bugs.kde.org/show_bug.cgi?id=422174
2020-08-17 21:02:39 +02:00
Philippe Waroquiers
24b247aec5 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=]
2020-08-15 17:18:52 +02:00
Philippe Waroquiers
c6bb6c8954 Document format of suppression files comment lines and blank lines.
Seems this was not documented.
2020-08-15 16:45:54 +02:00
Mark Wielaard
ecf5ba1197 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).

https://bugs.kde.org/show_bug.cgi?id=422623
2020-08-01 16:15:02 +02:00
Mark Wielaard
6323fd5bfd Handle linux syscalls sched_getattr and sched_setattr
The only "special" thing about these syscalls is that the given
struct sched_attr determines its own size for future expansion.

Original fix by "ISHIKAWA,chiaki" <ishikawa@yk.rim.or.jp>

https://bugs.kde.org/show_bug.cgi?id=369029
2020-08-01 15:34:48 +02:00
Mark Wielaard
cf5bc65e02 Add armhf debian specific suppression to auxprogs/gsl-1.6.supp.
On debian armhf write goes through the __libc_do_syscall function.
2020-07-20 11:35:42 +02:00
Rhys Kidd
efbc655366 Small fixes for new auxchecks target that runs GNU Scientific Library tests
Fixes:
- Ensure proper slash is present in default folder path: auxprogs/auxchecks.
- Ensure intermediate build artifacts aren't accidentally committed to git.

Fixes: 5efd866df ("Add new auxchecks target that runs GNU Scientific Library tests.")
2020-07-03 10:29:42 +10:00
Mark Wielaard
5efd866df2 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.
2020-07-02 18:44:56 +02:00
Rhys Kidd
6630e2ae58 update .gitignore with new docs/valid-* targets
Fixes: 4facc497b ("doc/Makefile.am: Turn valid-manual and valid-manpages into real targets")
2020-07-02 19:13:58 +10:00
Carl Love
8151414f0c Bugzilla 423021 - PPC: Add missing ISA 3.0 documentation link and HWCAPS test.
Add the check for the PPC_FEATURE2_ARCH_3_00 setting in the HWCAP2 string.

Add the information on where to find the public IBM ISA 3.0B document.
2020-06-15 13:39:19 -05:00
Julian Seward
71e3870dd3 Update NEWS following the fix of #422715. 2020-06-11 09:07:52 +02:00
Julian Seward
6aa4f7e7e7 expr_is_guardable, stmt_is_guardable, add_guarded_stmt_to_end_of: handle GetI/PutI cases.
This fixes #422715.
2020-06-11 09:03:52 +02:00
Carl Love
fb6f7abcbc 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.

Valgrind bugzilla:   https://bugs.kde.org/show_bug.cgi?id=422677
2020-06-10 16:30:47 -05:00
Mark Wielaard
ab85a40053 docs: Always generate UTF-8 encoding 2020-06-09 12:59:40 +02:00
Mark Wielaard
a489f40f78 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.
2020-06-09 11:23:46 +02:00
Mark Wielaard
0a69a8f5bd Add execveat for arm[64], [nano]mips[32|64], ppc[32|64], s390x and x86.
https://bugs.kde.org/show_bug.cgi?id=345077
2020-06-09 09:03:02 +02:00