Commit 3998d2604b5c0d45a098ff3119a9fd9710ef429d

Josh Triplett 2014-02-17T11:20:33

Fix build error on x86 without distinct long double src/x86/ffi64.c: In function 'classify_argument': src/x86/ffi64.c:205:5: error: duplicate case value case FFI_TYPE_LONGDOUBLE: ^ src/x86/ffi64.c:202:5: error: previously used here case FFI_TYPE_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 bd917f0..34e395b 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 int UNITS_PER_WORD = 8;