Fix PPC32 SVR4 ABI bug with 128-bit long double.
authorJim Wilson <wilson@redhat.com>
Tue, 10 Dec 2002 19:24:38 +0000 (19:24 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 10 Dec 2002 19:24:38 +0000 (11:24 -0800)
* rs6000.h (RETURN_IN_MEMORY): If ABI_V4, then TFmode is returned in
memory.

From-SVN: r60006

gcc/ChangeLog
gcc/config/rs6000/rs6000.h

index d3ed606..3b506ef 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-10  Jim Wilson  <wilson@redhat.com>
+
+       * rs6000.h (RETURN_IN_MEMORY): If ABI_V4, then TFmode is returned in
+       memory.
+
 2002-12-10  Andrew Haley  <aph@redhat.com>
 
        * cse.c (cse_insn): Don't cse past a basic block boundary.
index ab38f56..e5e9e27 100644 (file)
@@ -1550,13 +1550,17 @@ typedef struct rs6000_stack {
    default, and -m switches get the final word.  See
    rs6000_override_options for more details.
 
+   The PPC32 SVR4 ABI uses IEEE double extended for long double, if 128-bit
+   long double support is enabled.  These values are returned in memory.
+
    int_size_in_bytes returns -1 for variable size objects, which go in
    memory always.  The cast to unsigned makes -1 > 8.  */
 
 #define RETURN_IN_MEMORY(TYPE) \
-  (AGGREGATE_TYPE_P (TYPE) && \
-   (TARGET_AIX_STRUCT_RET || \
-    (unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 8))
+  ((AGGREGATE_TYPE_P (TYPE)                                            \
+    && (TARGET_AIX_STRUCT_RET                                          \
+       || (unsigned HOST_WIDE_INT) int_size_in_bytes (TYPE) > 8))      \
+   || (DEFAULT_ABI == ABI_V4 && TYPE_MODE (TYPE) == TFmode))
 
 /* DRAFT_V4_STRUCT_RET defaults off.  */
 #define DRAFT_V4_STRUCT_RET 0