From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>
Subject: [PULL 1/7] tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang
Date: Mon, 7 Mar 2022 19:26:03 +0100 [thread overview]
Message-ID: <20220307182609.94466-2-thuth@redhat.com> (raw)
In-Reply-To: <20220307182609.94466-1-thuth@redhat.com>
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 | 4 ++--
tests/tcg/s390x/mvo.c | 4 ++--
tests/tcg/s390x/pack.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/tcg/s390x/mvc.c b/tests/tcg/s390x/mvc.c
index aa552d52e5..7ae4c44550 100644
--- a/tests/tcg/s390x/mvc.c
+++ b/tests/tcg/s390x/mvc.c
@@ -20,8 +20,8 @@ static inline void mvc_256(const char *dst, const char *src)
asm volatile (
" mvc 0(256,%[dst]),0(%[src])\n"
:
- : [dst] "d" (dst),
- [src] "d" (src)
+ : [dst] "a" (dst),
+ [src] "a" (src)
: "memory");
}
diff --git a/tests/tcg/s390x/mvo.c b/tests/tcg/s390x/mvo.c
index 5546fe2a97..0c3ecdde2e 100644
--- a/tests/tcg/s390x/mvo.c
+++ b/tests/tcg/s390x/mvo.c
@@ -11,8 +11,8 @@ int main(void)
asm volatile (
" mvo 0(4,%[dest]),0(3,%[src])\n"
:
- : [dest] "d" (dest + 1),
- [src] "d" (src + 1)
+ : [dest] "a" (dest + 1),
+ [src] "a" (src + 1)
: "memory");
for (i = 0; i < sizeof(expected); i++) {
diff --git a/tests/tcg/s390x/pack.c b/tests/tcg/s390x/pack.c
index 4be36f29a7..55e7e214e8 100644
--- a/tests/tcg/s390x/pack.c
+++ b/tests/tcg/s390x/pack.c
@@ -9,7 +9,7 @@ int main(void)
asm volatile(
" pack 2(4,%[data]),2(4,%[data])\n"
:
- : [data] "r" (&data[0])
+ : [data] "a" (&data[0])
: "memory");
for (i = 0; i < 8; i++) {
if (data[i] != exp[i]) {
--
2.27.0
next prev parent reply other threads:[~2022-03-07 18:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 18:26 [PULL 0/7] s390x, tests and misc patches Thomas Huth
2022-03-07 18:26 ` Thomas Huth [this message]
2022-03-07 18:26 ` [PULL 2/7] tests/tcg/s390x: Fix the exrl-trt* tests with Clang Thomas Huth
2022-03-07 18:26 ` [PULL 3/7] tests/tcg/s390x: Cleanup of mie3 tests Thomas Huth
2022-03-07 18:26 ` [PULL 4/7] MAINTAINERS: Update the files in the FreeBSD section Thomas Huth
2022-03-07 18:26 ` [PULL 5/7] tests/avocado: Cancel BootLinux tests in case there is no free port Thomas Huth
2022-03-07 18:26 ` [PULL 6/7] tests/vm: Update haiku test vm to R1/Beta3 Thomas Huth
2022-03-07 18:26 ` [PULL 7/7] Check and report for incomplete 'global' option format Thomas Huth
2022-03-08 19:30 ` [PULL 0/7] s390x, tests and misc patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220307182609.94466-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=david@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).