From 76ecd8f6073a6745bdcf4e372b5959b7a213fa47 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 31 Aug 2015 21:18:18 +0000 Subject: [PATCH] Ensure the testcase compiles with clang. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/amd64/fxsave-amd64.c b/memcheck/tests/amd64/fxsave-amd64.c index 1766e29eb3..b1451b739e 100644 --- a/memcheck/tests/amd64/fxsave-amd64.c +++ b/memcheck/tests/amd64/fxsave-amd64.c @@ -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" ); -- 2.47.2