]> sourceware.org Git - valgrind.git/commit
s390x regtest: Adjust various test cases for Clang
authorAndreas Arnez <arnez@linux.ibm.com>
Fri, 29 Sep 2023 14:11:31 +0000 (16:11 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Fri, 29 Sep 2023 14:11:31 +0000 (16:11 +0200)
commita23b9bf5dfc9f0fd883a16ff10ba712e205a4435
tree2ae77d4bc4f7ef8aa158472334993b3e502c445b
parent57dc8fd6d89e9f5de483583c695c217d01743f78
s390x regtest: Adjust various test cases for Clang

There are various issues when compiling the s390x test cases with
Clang (see Bug 465782):

* Bugs in inline assemblies tolerated/obscured by GCC:

  - "d" (or "r") constraint instead of "a" where a register from 1-15 is
    needed
  - mix-up between vector register and general register in inline assembly
  - too unspecific constraints such as "m" or "g"
  - use of input operand for output
  - missing register clobber declaration

* Missing Clang features:

  - "%R" (register) and "%O" (offset) modifiers with address constraints
    in inline assemblies
  - variable-length array within a struct

* Use of the -mlong-double-128 command line option -- has been redundant
  for some time with GCC, and Clang only supports 128-bit long double

* Bad definition of _FPU_SETCW/_FPU_GETCW in <fpu_control.h>
  (See https://sourceware.org/bugzilla/show_bug.cgi?id=30130)

* Use of pow() function without linking libm -- GCC optimizes the call
  away, while Clang keeps a reference to pow()

Perform appropriate changes to the test cases such that they can be
compiled both with Clang and with GCC.
16 files changed:
none/tests/s390x/Makefile.am
none/tests/s390x/bic.c
none/tests/s390x/clc.c
none/tests/s390x/lsc2.c
none/tests/s390x/misc3.c
none/tests/s390x/test_sig.c
none/tests/s390x/tre.c
none/tests/s390x/troo.c
none/tests/s390x/trot.c
none/tests/s390x/trto.c
none/tests/s390x/trtt.c
none/tests/s390x/vector.c
none/tests/s390x/vector.h
none/tests/s390x/vector.stdout.exp
none/tests/s390x/vector_integer.stdout.exp
none/tests/s390x/xc.c
This page took 0.032496 seconds and 5 git commands to generate.