Do not build soft-fp code at all for powerpc64-linux-gnu.
[gcc.git] / libobjc / encoding.c
index d392193f707d8b36fe828b058150c5d735e29272..a603b8c3c7a86baf0c9c68ca8cd770eb9af5736f 100644 (file)
@@ -1,6 +1,5 @@
 /* Encoding of types for Objective C.
-   Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 1993-2014 Free Software Foundation, Inc.
    Contributed by Kresten Krab Thorup
    Bitfield support by Ovidiu Predescu
 
@@ -112,6 +111,32 @@ static int __attribute__ ((__unused__)) not_target_flags = 0;
 #undef ALTIVEC_VECTOR_MODE
 #define ALTIVEC_VECTOR_MODE(MODE) (0)
 
+/* Replace TARGET_VSX, TARGET_ALTIVEC, and TARGET_64BIT with constants based on
+   the current switches, rather than looking in the options structure.  */
+#ifdef _ARCH_PPC
+#undef TARGET_VSX
+#undef TARGET_ALTIVEC
+#undef TARGET_64BIT
+
+#ifdef __VSX__
+#define TARGET_VSX 1
+#else
+#define TARGET_VSX 0
+#endif
+
+#ifdef __ALTIVEC__
+#define TARGET_ALTIVEC 1
+#else
+#define TARGET_ALTIVEC 0
+#endif
+
+#ifdef _ARCH_PPC64
+#define TARGET_64BIT 1
+#else
+#define TARGET_64BIT 0
+#endif
+#endif
+
 /* Furthermore, some (powerpc) targets also use TARGET_ALIGN_NATURAL
  in their alignment macros. Currently[4.5/6], rs6000.h points this
  to a static variable, initialized by target overrides. This is reset
@@ -167,6 +192,7 @@ _darwin_rs6000_special_round_type_align (const char *struc, int comp, int spec)
    ? MAX (MAX (COMPUTED, SPECIFIED), 64)                               \
    : MAX (COMPUTED, SPECIFIED));})
 
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) 0
 
 /* Skip a variable name, enclosed in quotes (").  */
 static inline
@@ -993,22 +1019,6 @@ method_getNumberOfArguments (struct objc_method *method)
     }
 }
 
-int
-method_get_number_of_arguments (struct objc_method *mth)
-{
-  return method_getNumberOfArguments (mth);
-}
-
-/* Return the size of the argument block needed on the stack to invoke
-   the method MTH.  This may be zero, if all arguments are passed in
-   registers.  */
-int
-method_get_sizeof_arguments (struct objc_method *mth)
-{
-  const char *type = objc_skip_typespec (mth->method_types);
-  return atoi (type);
-}
-
 unsigned
 objc_get_type_qualifiers (const char *type)
 {
@@ -1052,7 +1062,7 @@ objc_get_type_qualifiers (const char *type)
   These functions are used by objc_sizeof_type and objc_alignof_type
   functions to compute the size and alignment of structures. The
   previous method of computing the size and alignment of a structure
-  was not working on some architectures, particulary on AIX, and in
+  was not working on some architectures, particularly on AIX, and in
   the presence of bitfields inside the structure.  */
 void
 objc_layout_structure (const char *type,