From: fabrice.desclaux@cea.fr Date: Fri, 7 Dec 2018 14:44:40 +0000 (+0100) Subject: Fixes i386 xchgq test X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=82c48fb79df5596a9d0a3b6d998c4491e542aa7a;p=qmiga%2Fqemu.git 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 Reviewed-by: Richard Henderson Message-Id: <03506cf0-a204-f619-8ee4-4990a5e69af5@cea.fr> Signed-off-by: Laurent Vivier --- 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");