[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH] Fixes i386 xchgq test
From: |
fabrice.desclaux |
Subject: |
[Qemu-trivial] [PATCH] Fixes i386 xchgq test |
Date: |
Fri, 7 Dec 2018 15:44:40 +0100 |
As "xchg" reads and writes both operands, the "+m" is required to avoid
undefined behavior on -O2 compilation.
Signed-off-by: Fabrice Desclaux <address@hidden>
---
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
- [Qemu-trivial] [PATCH] Fixes i386 xchgq test,
fabrice.desclaux <=