Commit edf29c5169b06fcfc241445e152e325bc3c50e0e

Anthony Green 2014-02-28T00:50:25

Merge pull request #75 from joshtriplett/longdouble Fix build error on x86 without distinct long double

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c
index fd31424..5a5e043 100644
--- a/src/x86/ffi64.c
+++ b/src/x86/ffi64.c
@@ -203,10 +203,12 @@ classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
     case FFI_TYPE_DOUBLE:
       classes[0] = X86_64_SSEDF_CLASS;
       return 1;
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
     case FFI_TYPE_LONGDOUBLE:
       classes[0] = X86_64_X87_CLASS;
       classes[1] = X86_64_X87UP_CLASS;
       return 2;
+#endif
     case FFI_TYPE_STRUCT:
       {
 	const size_t UNITS_PER_WORD = 8;