qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Michael Tokarev <mjt@tls.msk.ru>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"fabrice.desclaux@cea.fr" <fabrice.desclaux@cea.fr>
Subject: [Qemu-devel] [PULL 30/30] Fixes i386 xchgq test
Date: Tue, 11 Dec 2018 19:03:52 +0100	[thread overview]
Message-ID: <20181211180352.19644-31-laurent@vivier.eu> (raw)
In-Reply-To: <20181211180352.19644-1-laurent@vivier.eu>

From: "fabrice.desclaux@cea.fr" <fabrice.desclaux@cea.fr>

As "xchg" reads and writes both operands, the "+m" is required to avoid
undefined behavior on -O2 compilation.

Signed-off-by: Fabrice Desclaux <fabrice.desclaux@cea.fr>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <03506cf0-a204-f619-8ee4-4990a5e69af5@cea.fr>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/tcg/i386/test-i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index a29b41e764..18d5609665 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -1137,7 +1137,7 @@ void test_xchg(void)
     TEST_XCHG(xchgb, "b", "+q");
 
 #if defined(__x86_64__)
-    TEST_XCHG(xchgq, "", "=m");
+    TEST_XCHG(xchgq, "", "+m");
 #endif
     TEST_XCHG(xchgl, "k", "+m");
     TEST_XCHG(xchgw, "w", "+m");
-- 
2.19.2

  parent reply	other threads:[~2018-12-11 18:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 18:03 [Qemu-devel] [PULL 00/30] Trivial patches Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 01/30] hw: qdev: fix error in comment Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 02/30] virtio: pass argument by value for virtqueue_map_iovec() Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 03/30] misc: fix spelling Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 04/30] hw: set_netdev: remove useless code Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 05/30] qapi: Reduce Makefile boilerplate Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 06/30] misc: Avoid UTF-8 in error messages Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 07/30] MAINTAINERS: Add missing hw/pci-host entries Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 08/30] MAINTAINERS: Add nios2-related files to the Nios2 section Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 09/30] target: hax: replace g_malloc with g_new0 Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 10/30] MAINTAINERS: Fix ACPI tests data files path Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 11/30] MAINTAINERS: Add a missing entry to the SPARC CPU Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 12/30] MAINTAINERS: Add missing entries for the Xilinx ZynqMP machine Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 13/30] MAINTAINERS: Add missing entries for the Jazz machine Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 14/30] MAINTAINERS: Add a missing entry for the Xilinx S3A-DSP 1800 machine Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 15/30] MAINTAINERS: Add a missing entry for the Old World machines Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 16/30] MAINTAINERS: Add a missing entry for the sun4m machines Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 17/30] MAINTAINERS: Add missing entries to the PC Chipset section Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 18/30] MAINTAINERS: Add missing entries to the vhost section Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 19/30] MAINTAINERS: Add missing entries for the Canon DIGIC machine Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 20/30] MAINTAINERS: Add missing entries for the MPS2 machine Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 21/30] MAINTAINERS: Add a missing entry to SPICE Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 22/30] MAINTAINERS: Add a missing entry to the QMP section Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 23/30] MAINTAINERS: Add a missing entry for the NVDIMM device Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 24/30] MAINTAINERS: Use my work email to review Build and test automation patches Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 25/30] target: hax: fix errors in comment Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 26/30] util: vfio-helpers: use ARRAY_SIZE in qemu_vfio_init_pci() Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 27/30] cutils: Assert in-range base for string-to-integer conversions Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 28/30] MAINTAINERS: Update email address for Fam Zheng Laurent Vivier
2018-12-11 18:03 ` [Qemu-devel] [PULL 29/30] maint: Grammar fix to mailmap Laurent Vivier
2018-12-11 18:03 ` Laurent Vivier [this message]
2018-12-12 21:11 ` [Qemu-devel] [PULL 00/30] Trivial 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=20181211180352.19644-31-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=ehabkost@redhat.com \
    --cc=fabrice.desclaux@cea.fr \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /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).