Add VEX support for the s390x "compare and signal" instructions KEBR,
KDBR, KXBR, KEB, and KDB. For now, let them behave exactly like their
non-signalling counterparts. Enhance the bfp-4 test case to cover these
instructions as well. Update the list of supported instructions in
s390-opcodes.csv. Add a disclaimer to README.s390, explaining that FP
signalling is not handled accurately on s390x at the moment.
pthread_t is opaque type therefore we can not apply simple arithmetic to
variables of pthread_t type this test needs to pass a invalid pthread_t
handle, typcasting to uintptr_t works too and is portable across glibc and
musl
Fixes
| pth_detached3.c:24:25: error: invalid use of undefined type 'struct __pthread'
| 24 | pthread_detach(thread + 8);
| | ^
[ bvanassche: reformatted patch description and fixed up line numbers ]
s390x_features is built unconditionally on a range of platforms, accordingly
any non-portable or glibc-specific functionality must be guarded.
Fixes error reported when running 'make check' or 'make regtest' on a platform
with an alternative libc that Valgrind supports, in this case Apple's libc:
s390x_features.c:13:10: fatal error: 'features.h' file not found
#include <features.h> // __GLIBC_PREREQ
^
1 error generated.
Fixes: 161d22f0a ("s390x: Fix vector facility (vx) check in test suite")
Some lines in s390-opcodes.csv contain entries that look like this:
...,"arch12"implemented",...
They are probably introduced by some cut-and-paste error. This is fixed.
GCC10 defaults to -fno-common which exposes some latent bugs in
some of the top-level asm code in various .c test files. Some of the
tests started to segfault (even if not run under valgrind). Such code
needs to be wrapped inside a .text and a .previous asm statement to
make sure the code is generated in the .text code section and to
make sure the compiler doesn't lose track of the section currently
being used to generate data or code in. Without it code might be
generated inside a data section or the other way around.
These changes were part of my local testing of bug 416667
gcc10 ppc64le impossible constraint in 'asm' in test_isa
And shouldn't have been committed yet before review.
Thanks to Jakub Jelinek. The test is broken. It blindly assumes the
toplevel inline asm is placed into some sensible section, but that is
a wrong assumption. The right thing is to start the inline asm with
.text directive and end with .previous. The reason gcc 10 breaks it
is the -fno-common default, the int r1, ... vars are emitted into .bss
section and that is the section that is current when the inline asm is
emitted previously they were in .common at the end of the assembly file.
GCC10 defaults to -fno-common which produces this error:
guest_s390_defs.h:291: multiple definition of `s390x_vec_op_t
This is because GCC10 detects there are multiple definitions of the
variable s390x_vec_op_t. We don't want to define a variable though.
We had wanted to define a type (one that currently isn't used).
Fix this by making it a typedef enum.
https://bugzilla.redhat.com/show_bug.cgi?id=1794482
Guard withinEpsOf[FD] within none/tests/mips32/msa_fpu.c
Enclose the recently introduced functions with preprocessor guards,
much like the rest of the code is inside the main function.
Also mark the functions as static.
Minor code formatting.
Mark the immediate as signed for Iex_Get and Ist_Put for Ity_V128 on BE.
The Malu_MADD case in emit_MIPSInst in VEX/priv/host_mips_defs.c expects a
signed immediate, hence the change.
This fixes an assert in host_mips_defs.c.
Change the math tests to check whether the results are approximate to the
expected values instead of checking for exact matches since the calculations
in question are allowed to be approximate.
This fixes
/none/tests/mips64/test_math and
/none/tests/mips64/msa_fpu
on mips64r6.
This might happen when the source contains something like
if (something_involving_pcmpxstrx && foo) { .. }
which might use amd64g_dirtyhelper_PCMPxSTRx.
Instruction decoding was not correct. In some cases, BEQC has been decoded
as BNEC and vice versa.
It caused problems with musl malloc() function.
Patch by Stefan Maksimovic.
- Restore guest sigmask in VG_(sigframe_destroy)
- Use "syscall[32]" asm idiom instead of "syscall" with immediate parameter
in VG_(nanomips_linux_SUBST_FOR_rt_sigreturn)
- Call ML_(fixup_guest_state_to_restart_syscall) from PRE(sys_rt_sigreturn)
- Tiny code refactor of sigframe-nanomips-linux.c
This fixes none/tests/thread-exits.
UASWM and UALWM have not been implemented correctly.
Code used to implement SWM and LWM has been reused without making all of
the required adjustments.
This fixes memcpy() and memset() libc functions.
This code portion introduced a SEGFAULT:
- if (&i->NMin.Cas.sz){
+ if (i->NMin.Cas.sz == 8) {
The implementation of Ist_Cas has been fixed and missing logging has been
added as well.
During a save (push) instruction adjusting the SP is required before doing
a store, otherwise Memcheck reports warning because of a write operation
outside of the stack area.
- Reset syscall return register (a0) in clone_new_thread()
- Use "syscall[32]" asm idiom instead of "syscall" with immediate parameter
in ML_ (call_on_new_stack_0_1)()
- Optimize stack usage in ML_ (call_on_new_stack_0_1)()
- Code refactor of ML_ (call_on_new_stack_0_1)()
It partially fixes all tests which use clone system call, e.g. none/tests/pth_atfork1.
Patch by Aleksandar Rikalo.
Patches from Bug #400872 (Add nanoMIPS support to Valgrind) have been
merged.
Update README.mips with a correct configure line applicable for the latest
nanomips toolchain package in public.