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
frv_setup_incoming_varargs.
* config/frv/frv.c (TARGET_SETUP_INCOMING_VARARGS): New.
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);
+ }
}
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"
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. */
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"
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);
}
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