]> git.ipfire.org Git - thirdparty/valgrind.git/commit
s390x regtest: Rework dfp-2
authorAndreas Arnez <arnez@linux.ibm.com>
Thu, 7 Sep 2023 14:43:25 +0000 (16:43 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 7 Sep 2023 14:43:25 +0000 (16:43 +0200)
commit64f2f358dc899cf34d134f88375bbef55ae944dc
tree20b53ce83fa4d205d37f8c4f24244463962fd2b9
parent673b497030e3f2281a62e841a8b7187eaf176d64
s390x regtest: Rework dfp-2

The dfp-2 test case has two issues:

* It doesn't test the rounding modes correctly.  Since the inline assembly
  uses a "d" constraint to pass the rounding mode, a random register
  number is placed into the instruction's rounding mode field instead of
  the intended rounding mode.

* It cannot be compiled with Clang.  (See Bug 465782.)

Fix these with a rewrite.  Fixing the first issue also requires adjusting
the test case output `dfp-2.stdout.exp', while fixing the second requires
avoiding `_Decimal*' data types.  Also reduce some code duplication.
none/tests/s390x/dfp-2.c
none/tests/s390x/dfp-2.stdout.exp