From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH 13/25] tests/tcg: fix constraints in test-i386-adcox
Date: Wed, 26 Feb 2025 09:26:24 -0800 [thread overview]
Message-ID: <5facb17d-c559-46df-be17-b37d22a212bc@linaro.org> (raw)
In-Reply-To: <20250226140343.3907080-14-alex.bennee@linaro.org>
On 2/26/25 06:03, Alex Bennée wrote:
> Clang complains:
>
> clang -O2 -m64 -mcx16 /home/alex/lsrc/qemu.git/tests/tcg/i386/test-i386-adcox.c -o test-i386-adcox -static
> /home/alex/lsrc/qemu.git/tests/tcg/i386/test-i386-adcox.c:32:26: error: invalid input constraint '0' in asm
> : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox));
> ^
> /home/alex/lsrc/qemu.git/tests/tcg/i386/test-i386-adcox.c:57:26: error: invalid input constraint '0' in asm
> : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox));
> ^
> 2 errors generated.
>
> Pointing out a numbered input constraint can't point to a read/write
> output [1]. Convert to a read-only input constraint to allow this.
>
> [1] https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20101101/036036.html
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> tests/tcg/i386/test-i386-adcox.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/tcg/i386/test-i386-adcox.c b/tests/tcg/i386/test-i386-adcox.c
> index 16169efff8..b56dbc00f2 100644
> --- a/tests/tcg/i386/test-i386-adcox.c
> +++ b/tests/tcg/i386/test-i386-adcox.c
> @@ -28,7 +28,7 @@ void test_adox_adcx(uint32_t in_c, uint32_t in_o, REG adcx_operand, REG adox_ope
> "adox %3, %2;"
> "adcx %3, %1;"
> "pushf; pop %0"
> - : "+r" (flags), "+r" (out_adcx), "+r" (out_adox)
> + : "=r"(flags), "=r"(out_adcx), "=r"(out_adox)
> : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox));
Alternately, drop all of the matching constraints as redundant.
That's what "+r" does, anyway.
r~
next prev parent reply other threads:[~2025-02-26 17:28 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 14:03 [PATCH 00/25] maintainer updates for 10.0 softfreeze (gpu/tcg tests, plugins, MAINTAINERS) Alex Bennée
2025-02-26 14:03 ` [PATCH 01/25] tests/functional: move aarch64 GPU test into own file Alex Bennée
2025-02-26 15:27 ` Thomas Huth
2025-02-26 17:19 ` Richard Henderson
2025-02-26 18:08 ` Alex Bennée
2025-02-26 14:03 ` [PATCH 02/25] tests/functional: factor out common code in gpu test Alex Bennée
2025-02-26 15:32 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 03/25] tests/functional: ensure we have a GPU device for tests Alex Bennée
2025-02-26 15:59 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 04/25] tests/functional: expand tests to cover virgl Alex Bennée
2025-02-26 16:03 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 05/25] plugins: add explicit dependency in functional tests Alex Bennée
2025-02-26 14:03 ` [PATCH 06/25] tests/functional: Introduce the dso_suffix() helper Alex Bennée
2025-02-26 14:03 ` [PATCH 07/25] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Alex Bennée
2025-02-27 9:03 ` Daniel P. Berrangé
2025-02-26 14:03 ` [PATCH 08/25] tests/functional: skip vulkan tests with nVidia Alex Bennée
2025-02-26 16:07 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 09/25] libvirt-ci: bump to latest for vulkan-tools (libvirt MR 525) Alex Bennée
2025-02-26 16:14 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 10/25] tests/vm: bump timeout for shutdown Alex Bennée
2025-02-26 16:15 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 11/25] tests/tcg: mark test-vma as a linux-only test Alex Bennée
2025-02-26 16:16 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 12/25] tests/tcg: add message to _Static_assert in test-avx Alex Bennée
2025-02-26 16:17 ` Thomas Huth
2025-02-26 14:03 ` [PATCH 13/25] tests/tcg: fix constraints in test-i386-adcox Alex Bennée
2025-02-26 17:26 ` Richard Henderson [this message]
2025-02-28 11:35 ` Alex Bennée
2025-02-28 17:35 ` Richard Henderson
2025-02-26 14:03 ` [PATCH 14/25] tests/tcg: enable -fwrapv for test-i386-bmi Alex Bennée
2025-02-26 17:27 ` Richard Henderson
2025-02-26 14:03 ` [PATCH 15/25] plugins/api: use qemu_target_page_mask() to get value Alex Bennée
2025-02-26 17:27 ` Richard Henderson
2025-02-26 22:19 ` Philippe Mathieu-Daudé
2025-02-26 14:03 ` [PATCH 16/25] plugins/loader: populate target_name with target_name() Alex Bennée
2025-02-26 14:03 ` [PATCH 17/25] include/qemu: plugin-memory.h doesn't need cpu-defs.h Alex Bennée
2025-02-26 14:03 ` [PATCH 18/25] plugins/api: clean-up the includes Alex Bennée
2025-02-26 14:03 ` [PATCH 19/25] plugins/plugin.h: include queue.h Alex Bennée
2025-02-26 14:03 ` [PATCH 20/25] plugins/loader: compile loader only once Alex Bennée
2025-02-26 14:03 ` [PATCH 21/25] plugins/api: split out binary path/start/end/entry code Alex Bennée
2025-02-26 15:28 ` Warner Losh
2025-02-26 17:29 ` Richard Henderson
2025-02-26 14:03 ` [PATCH 22/25] plugins/api: split out the vaddr/hwaddr helpers Alex Bennée
2025-02-26 14:03 ` [PATCH 23/25] plugins/api: split out time control helpers Alex Bennée
2025-02-26 14:03 ` [PATCH 24/25] plugins/api: build only once Alex Bennée
2025-02-26 14:03 ` [PATCH 25/25] MAINTAINERS: remove widely sanctioned entities Alex Bennée
2025-02-27 15:45 ` Daniel Henrique Barboza
2025-02-28 10:39 ` Alex Bennée
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=5facb17d-c559-46df-be17-b37d22a212bc@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.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).