Commit 78bc94a2 by Kazu Hirata Committed by Kazu Hirata

arc.c (arc_return_in_memory): Check the return value of int_size_in_bytes against -1.

	* 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
parent d8c2bed3
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.
......
......@@ -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);
}
}
......@@ -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"
......@@ -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. */
......
......@@ -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"
......@@ -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);
}
......@@ -2170,10 +2170,13 @@ xstormy16_expand_builtin(tree exp, rtx target,
return retval;
}
/* 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);
}
#undef TARGET_ASM_ALIGNED_HI_OP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment