]> git.ipfire.org Git - thirdparty/valgrind.git/commit
x86 and amd64 tests: Use .text and .previous around all top-level asm.
authorMark Wielaard <mark@klomp.org>
Sat, 25 Jan 2020 17:34:58 +0000 (18:34 +0100)
committerMark Wielaard <mark@klomp.org>
Sat, 25 Jan 2020 17:34:58 +0000 (18:34 +0100)
commitfe6805efc1b6db0cfa5f1cd5fb1854775cbfa31a
tree0ae6e429b0a2244fb3a471a3e8412376f9387ce6
parenta9cad5d1338d981269a5389977f396f687d17c41
x86 and amd64 tests: Use .text and .previous around all top-level asm.

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.
12 files changed:
memcheck/tests/amd64/shr_edx.c
none/tests/amd64/fxtract.c
none/tests/amd64/jrcxz.c
none/tests/amd64/looper.c
none/tests/amd64/sbbmisc.c
none/tests/amd64/shrld.c
none/tests/amd64/slahf-amd64.c
none/tests/x86/cmpxchg8b.c
none/tests/x86/fxtract.c
none/tests/x86/lahf.c
none/tests/x86/looper.c
none/tests/x86/sbbmisc.c