From e9296e79941f684181de988e633d2c42f8a08d90 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 7 Sep 2011 17:16:15 +0000 Subject: [PATCH] core: implement the FP_USE() macro on x86, amd64 and powerpc. --- src/core.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core.h b/src/core.h index 9affb7e0..a61d729f 100644 --- a/src/core.h +++ b/src/core.h @@ -29,7 +29,13 @@ # define __likely(x) __builtin_expect(!!(x), 1) # define __unlikely(x) __builtin_expect(!!(x), 0) # define INLINEATTR __attribute__((always_inline)) -# define FP_USE(x) __asm__("" : "+r" (x)) +# if defined __CELLOS_LV2__ +# define FP_USE(x) __asm__("" : "+f" (x)) +# elif defined __x86_64__ +# define FP_USE(x) __asm__("" : "+x" (x)) +# elif defined __i386__ +# define FP_USE(x) __asm__("" : "+t" (x)) +# endif #else # define __likely(x) x # define __unlikely(x) x