aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
diff options
context:
space:
mode:
authorfabrice.desclaux@cea.fr <fabrice.desclaux@cea.fr>2018-12-07 15:44:40 +0100
committerLaurent Vivier <laurent@vivier.eu>2018-12-11 18:41:25 +0100
commit82c48fb79df5596a9d0a3b6d998c4491e542aa7a (patch)
tree1ae4ca300516d648a51efa123f4e2d98b2ede8c5 /tests/tcg
parentd668c82bfb5ba0e83342f313257e9b58bccf194d (diff)
downloadqemu-82c48fb79df5596a9d0a3b6d998c4491e542aa7a.zip
qemu-82c48fb79df5596a9d0a3b6d998c4491e542aa7a.tar.gz
qemu-82c48fb79df5596a9d0a3b6d998c4491e542aa7a.tar.bz2
Fixes i386 xchgq test
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>
Diffstat (limited to 'tests/tcg')
-rw-r--r--tests/tcg/i386/test-i386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index a29b41e..18d5609 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");