qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 15/32] tests/tcg: fix constraints in test-i386-adcox
Date: Tue, 4 Mar 2025 14:45:56 -0800	[thread overview]
Message-ID: <ac986fa1-00ae-4870-a78b-208834a555a3@linaro.org> (raw)
In-Reply-To: <20250304222439.2035603-16-alex.bennee@linaro.org>

On 3/4/25 14:24, 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>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> ---
> v2
>    - followed rth's suggestion and removed additional matches.
> ---
>   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..d653fa86a7 100644
> --- a/tests/tcg/i386/test-i386-adcox.c
> +++ b/tests/tcg/i386/test-i386-adcox.c
> @@ -53,8 +53,8 @@ void test_adcx_adox(uint32_t in_c, uint32_t in_o, REG adcx_operand, REG adox_ope
>           "adcx %3, %1;"
>           "adox %3, %2;"
>           "pushf; pop %0"
> -        : "+r" (flags), "+r" (out_adcx), "+r" (out_adox)
> -        : "r" ((REG)-1), "0" (flags), "1" (out_adcx), "2" (out_adox));
> +        : "+r"(flags), "+r"(out_adcx), "+r"(out_adox)
> +        : "r" ((REG)-1));
>   
>       assert(out_adcx == in_c + adcx_operand - 1);
>       assert(out_adox == in_o + adox_operand - 1);



  reply	other threads:[~2025-03-04 22:46 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 22:24 [PATCH v2 00/32] maintainer updates for 10.0 softfreeze (gpu/tcg tests, plugins, MAINTAINERS) pre-PR Alex Bennée
2025-03-04 22:24 ` [PATCH v2 01/32] tests/functional: move aarch64 GPU test into own file Alex Bennée
2025-03-05  8:17   ` Thomas Huth
2025-03-04 22:24 ` [PATCH v2 02/32] tests/functional: factor out common code in gpu test Alex Bennée
2025-03-05  8:29   ` Thomas Huth
2025-03-04 22:24 ` [PATCH v2 03/32] tests/functional: ensure we have a GPU device for tests Alex Bennée
2025-03-04 22:24 ` [PATCH v2 04/32] tests/functional: bail early if vkmark hangs Alex Bennée
2025-03-05  8:30   ` Thomas Huth
2025-03-04 22:24 ` [PATCH v2 05/32] tests/functional: skip vulkan tests with nVidia Alex Bennée
2025-03-04 22:24 ` [PATCH v2 06/32] tests/functional: expand tests to cover virgl Alex Bennée
2025-03-04 22:24 ` [PATCH v2 07/32] tests/functional: update the aarch64_virg_gpu images Alex Bennée
2025-03-05  8:35   ` Thomas Huth
2025-03-05 16:58     ` Alex Bennée
2025-03-04 22:24 ` [PATCH v2 08/32] plugins: add explicit dependency in functional tests Alex Bennée
2025-03-04 22:24 ` [PATCH v2 09/32] tests/functional: Introduce the dso_suffix() helper Alex Bennée
2025-03-04 22:24 ` [PATCH v2 10/32] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Alex Bennée
2025-03-04 22:24 ` [PATCH v2 11/32] libvirt-ci: bump to latest for vulkan-tools Alex Bennée
2025-03-04 22:24 ` [PATCH v2 12/32] tests/vm: bump timeout for shutdown Alex Bennée
2025-03-04 22:24 ` [PATCH v2 13/32] tests/tcg: mark test-vma as a linux-only test Alex Bennée
2025-03-04 22:49   ` Richard Henderson
2025-03-04 22:24 ` [PATCH v2 14/32] tests/tcg: add message to _Static_assert in test-avx Alex Bennée
2025-03-04 22:48   ` Richard Henderson
2025-03-04 22:24 ` [PATCH v2 15/32] tests/tcg: fix constraints in test-i386-adcox Alex Bennée
2025-03-04 22:45   ` Richard Henderson [this message]
2025-03-04 22:24 ` [PATCH v2 16/32] tests/tcg: enable -fwrapv for test-i386-bmi Alex Bennée
2025-03-04 22:24 ` [PATCH v2 17/32] tests/tcg: Suppress compiler false-positive warning on sha1.c Alex Bennée
2025-03-04 22:24 ` [PATCH v2 18/32] gitlab: add a new build_unit job to track build size Alex Bennée
2025-03-04 22:24 ` [PATCH v2 19/32] tests/functional: add boot error detection for RME tests Alex Bennée
2025-03-04 22:24 ` [PATCH v2 20/32] plugins/api: use qemu_target_page_mask() to get value Alex Bennée
2025-03-04 22:24 ` [PATCH v2 21/32] plugins/loader: populate target_name with target_name() Alex Bennée
2025-03-05  0:01   ` Philippe Mathieu-Daudé
2025-03-05  6:57     ` Alex Bennée
2025-03-04 22:24 ` [PATCH v2 22/32] include/qemu: plugin-memory.h doesn't need cpu-defs.h Alex Bennée
2025-03-04 22:24 ` [PATCH v2 23/32] plugins/api: clean-up the includes Alex Bennée
2025-03-04 22:24 ` [PATCH v2 24/32] plugins/plugin.h: include queue.h Alex Bennée
2025-03-04 22:24 ` [PATCH v2 25/32] plugins/loader: compile loader only once Alex Bennée
2025-03-04 22:24 ` [PATCH v2 26/32] plugins/api: split out binary path/start/end/entry code Alex Bennée
2025-03-04 22:24 ` [PATCH v2 27/32] plugins/api: split out the vaddr/hwaddr helpers Alex Bennée
2025-03-04 22:24 ` [PATCH v2 28/32] plugins/api: split out time control helpers Alex Bennée
2025-03-04 22:24 ` [PATCH v2 29/32] plugins/api: build only once Alex Bennée
2025-03-04 22:24 ` [PATCH v2 30/32] plugins/core: make a single build unit Alex Bennée
2025-03-04 22:54   ` Richard Henderson
2025-03-04 22:24 ` [PATCH v2 31/32] MAINTAINERS: remove widely sanctioned entities Alex Bennée
2025-03-04 22:24 ` [PATCH v2 32/32] meson.build: default to -gsplit-dwarf for debug info Alex Bennée
2025-03-04 23:05   ` Richard Henderson

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=ac986fa1-00ae-4870-a78b-208834a555a3@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).