]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Ensure the testcase compiles with clang.
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 31 Aug 2015 21:18:18 +0000 (21:18 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 31 Aug 2015 21:18:18 +0000 (21:18 +0000)
clang up to and including 3.6.2 does not recognise the fxsave64
and fxrstor64 mnemonics. It does recognise rex64/fxsave etc..
Related to BZ #339636.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15606

memcheck/tests/amd64/fxsave-amd64.c

index 1766e29eb32579bbb56cd505a8ee0bc1053f9a73..b1451b739efe767de58f93edf6fdd676fb18b946 100644 (file)
@@ -17,7 +17,7 @@ const unsigned int vecZ[4]
 __attribute__((noinline))
 void do_fxsave ( void* p, int rexw ) {
    if (rexw) {
-#if defined(VGO_linux) || defined(VGO_solaris)
+#if (defined(VGO_linux) || defined(VGO_solaris)) && ! defined(__clang__)
       asm __volatile__("fxsave64 (%0)" : : "r" (p) : "memory" );
 #else
       asm __volatile__("rex64/fxsave (%0)" : : "r" (p) : "memory" );
@@ -30,7 +30,7 @@ void do_fxsave ( void* p, int rexw ) {
 __attribute__((noinline))
 void do_fxrstor ( void* p, int rexw ) {
    if (rexw) {
-#if defined(VGO_linux) || defined(VGO_solaris)
+#if (defined(VGO_linuxx) || defined(VGO_solaris)) && ! defined(__clang__)
       asm __volatile__("fxrstor64 (%0)" : : "r" (p) : "memory" );
 #else
       asm __volatile__("rex64/fxrstor (%0)" : : "r" (p) : "memory" );