Commit 82c48fb7 authored by fabrice.desclaux@cea.fr's avatar fabrice.desclaux@cea.fr Committed by Laurent Vivier
Browse files

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: default avatarFabrice Desclaux <fabrice.desclaux@cea.fr>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <03506cf0-a204-f619-8ee4-4990a5e69af5@cea.fr>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent d668c82b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");