tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang
authorThomas Huth <thuth@redhat.com>
Tue, 1 Mar 2022 09:39:11 +0000 (10:39 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 7 Mar 2022 08:04:42 +0000 (09:04 +0100)
commitf530ba8f8d69738b7516432ab2eacd727b79c3ed
tree3c8fe409105c50f78d9698758ceb6e5ef41d2be0
parent9d662a6b22a0838a85c5432385f35db2488a33a5
tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang

These instructions use addressing with a "base address", meaning
that if register r0 is used, it is always treated as zero, no matter
what value is stored in the register. So we have to make sure not
to use register r0 for these instructions in our tests. There was
no problem with GCC so far since it seems to always pick other
registers by default, but Clang likes to chose register r0, too,
so we have to use the "a" constraint to make sure that it does
not pick r0 here.

Message-Id: <20220301093911.1450719-1-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/tcg/s390x/mvc.c
tests/tcg/s390x/mvo.c
tests/tcg/s390x/pack.c