]> sourceware.org Git - valgrind.git/commit
s390x regtest: Additional test case fixes
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)
commit70932c0363bd0f71e5d48c945f012cc2e9f82bc6
tree40fbd7a4deb3b2d7042c0cf0e9d469ad01e28b27
parent3f401afeeea0b928a79cfd2ea143bb49593e4a3f
s390x regtest: Additional test case fixes

While fixing Clang compilation issues, I noticed additional problematic
constructs in s390x test cases, some of which are uncovered with compiler
optimization options such as -O3:

* `bic.c' relies on an int to be sign-extended when passing it in a
  register to an inline-assembly.

* `cksm.c' clobbers a register in an inline assembly without specifying
  that.

* `cu12.c' and `cu14.c' read the variable `pattern1' beyond its size.

* `mvst.c' modifies input operands in inline assemblies.

* `srnmb.c' relies on Valgrind's error message for a bad rounding mode to
  point to the line number where get_rounding_mode() is called, not to the
  function itself.

* `stfle.c' has a code path with an uninitialized variable that may cause
  a compiler warning.

* `stmg.c' modifies r15 in an inline assembly and doesn't expect the
  compiler to use r15 as the base address for an input operand.

* Various inline assemblies use the "=m" constraint even when the
  instruction only supports more restricted address operands.

Fix all of the above.  For consistency and clarity, avoid the "=m"
constraint even when it would be applicable.
23 files changed:
none/tests/s390x/bic.c
none/tests/s390x/cksm.c
none/tests/s390x/cu12.c
none/tests/s390x/cu12.stdout.exp
none/tests/s390x/cu12_1.stdout.exp
none/tests/s390x/cu14.c
none/tests/s390x/cu14.stdout.exp
none/tests/s390x/cu14_1.stdout.exp
none/tests/s390x/cvd.c
none/tests/s390x/flogr.c
none/tests/s390x/mvst.c
none/tests/s390x/rounding-2.c
none/tests/s390x/rounding-3.c
none/tests/s390x/srnm.c
none/tests/s390x/srnmb.c
none/tests/s390x/srnmb.stderr.exp
none/tests/s390x/srnmt.c
none/tests/s390x/stfle.c
none/tests/s390x/stmg.c
none/tests/s390x/stmg.stdout.exp
none/tests/s390x/test.h
none/tests/s390x/tm.c
none/tests/s390x/tmll.c
This page took 0.036049 seconds and 5 git commands to generate.