arc.c (arc_return_in_memory): Check the return value of int_size_in_bytes against -1.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 6 Feb 2004 05:55:07 +0000 (05:55 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 6 Feb 2004 05:55:07 +0000 (05:55 +0000)
* config/arc/arc.c (arc_return_in_memory): Check the return
value of int_size_in_bytes against -1.  Don't check
TREE_ADDRESSABLE.
* config/avr/avr.c (avr_return_in_memory): Check the return
value of int_size_in_bytes against -1.
* config/ip2k/ip2k.c (ip2k_return_in_memory): Likewise.
* config/m68hc11/m68hc11.c (m68hc11_return_in_memory):
Likewise.
* config/mcore/mcore.c (mcore_return_in_memory): Likewise.
* config/stormy16/stormy16.c (xstormy16_return_in_memory):
Likewise.

From-SVN: r77377

gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/avr/avr.c
gcc/config/ip2k/ip2k.c
gcc/config/m68hc11/m68hc11.c
gcc/config/mcore/mcore.c
gcc/config/stormy16/stormy16.c

index 665435746ee24eca8631e6044c586ef252d62dd5..32c3894826cfb251c59d2bf1c9e84a1595d4802e 100644 (file)
@@ -1,3 +1,17 @@
+2004-02-06  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/arc/arc.c (arc_return_in_memory): Check the return
+       value of int_size_in_bytes against -1.  Don't check
+       TREE_ADDRESSABLE.
+       * config/avr/avr.c (avr_return_in_memory): Check the return
+       value of int_size_in_bytes against -1.
+       * config/ip2k/ip2k.c (ip2k_return_in_memory): Likewise.
+       * config/m68hc11/m68hc11.c (m68hc11_return_in_memory):
+       Likewise.
+       * config/mcore/mcore.c (mcore_return_in_memory): Likewise.
+       * config/stormy16/stormy16.c (xstormy16_return_in_memory):
+       Likewise.
+
 2004-02-06  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/frv/frv-protos.h: Remove the prototype for
index c838f32ea83c90f7b10d376bc478cfa2ca08f1bb..f0c1bf22fac09b9ca75b37465ac4b5b90865ad5b 100644 (file)
@@ -2396,7 +2396,11 @@ arc_external_libcall (rtx fun ATTRIBUTE_UNUSED)
 static bool
 arc_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return (AGGREGATE_TYPE_P (type)
-         || int_size_in_bytes (type) > 8
-         || TREE_ADDRESSABLE (type));
+  if (AGGREGATE_TYPE_P (type))
+    return true;
+  else
+    {
+      HOST_WIDE_INT size = int_size_in_bytes (type);
+      return (size == -1 || size > 8);
+    }
 }
index 331f7cdfa648e0063415ff3aea11f01b11e964dc..07540df9f3a682d87e84f8aeafcfe56b99e11ad4 100644 (file)
@@ -5384,9 +5384,13 @@ avr_asm_out_dtor (rtx symbol, int priority)
 static bool
 avr_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return ((TYPE_MODE (type) == BLKmode)
-         ? int_size_in_bytes (type) > 8
-         : 0);
+  if (TYPE_MODE (type) == BLKmode)
+    {
+      HOST_WIDE_INT size = int_size_in_bytes (type);
+      return (size == -1 || size > 8);
+    }
+  else
+    return false;
 }
 
 #include "gt-avr.h"
index 916fd1025d120b7a356597d0c31815cf827c09fd..13652e41218c3484e35b24df94bb5ae39145d0a9 100644 (file)
@@ -6201,7 +6201,13 @@ ip2k_unsigned_comparison_operator (rtx op, enum machine_mode mode)
 static bool
 ip2k_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return (TYPE_MODE (type) == BLKmode) ? int_size_in_bytes (type) > 8 : 0;
+  if (TYPE_MODE (type) == BLKmode)
+    {
+      HOST_WIDE_INT size = int_size_in_bytes (type);
+      return (size == -1 || size > 8);
+    }
+  else
+    return false;
 }
 
 /* Worker function for TARGET_SETUP_INCOMING_VARARGS.  */
index c43042115127b2f73273fb5a35b3736ec5ffaa03..e5bca2ed56ba60230790fc5285313005aea9da11 100644 (file)
@@ -5550,9 +5550,13 @@ m68hc11_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
 static bool
 m68hc11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return ((TYPE_MODE (type) == BLKmode)
-         ? (int_size_in_bytes (type) > 4)
-         : (GET_MODE_SIZE (TYPE_MODE (type)) > 4));
+  if (TYPE_MODE (type) == BLKmode)
+    {
+      HOST_WIDE_INT size = int_size_in_bytes (type);
+      return (size == -1 || size > 4);
+    }
+  else
+    return GET_MODE_SIZE (TYPE_MODE (type)) > 4;
 }
 
 #include "gt-m68hc11.h"
index 58a47623ca1d8efbacdcc09277c5e0dcb1f18feb..8f2036ce7ec7cc4e1bfb2974dcbaf9c01edb73c9 100644 (file)
@@ -3466,5 +3466,6 @@ mcore_external_libcall (rtx fun)
 static bool
 mcore_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return int_size_in_bytes (type) > 2 * UNITS_PER_WORD;
+  HOST_WIDE_INT size = int_size_in_bytes (type);
+  return (size == -1 || size > 2 * UNITS_PER_WORD);
 }
index 867cd2129a2039f29cac6f5afd88c9494a3798b6..7678ccfcafd22ce49f011ad93912d2ed70147313 100644 (file)
@@ -2170,10 +2170,13 @@ xstormy16_expand_builtin(tree exp, rtx target,
   return retval;
 }
 \f
+/* Worker function for TARGET_RETURN_IN_MEMORY.  */
+
 static bool
 xstormy16_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
 {
-  return int_size_in_bytes (type) > UNITS_PER_WORD * NUM_ARGUMENT_REGISTERS;
+  HOST_WIDE_INT size = int_size_in_bytes (type);
+  return (size == -1 || size > UNITS_PER_WORD * NUM_ARGUMENT_REGISTERS);
 }
 \f
 #undef TARGET_ASM_ALIGNED_HI_OP