Finally reverted parts of my escaped patch. (quilt sucks).

From-SVN: r135607
This commit is contained in:
Kai Tietz 2008-05-20 12:24:43 +02:00
parent d29899bad2
commit f680436bce
3 changed files with 15 additions and 44 deletions

View File

@ -134,10 +134,7 @@ extern rtx ix86_libcall_value (enum machine_mode);
extern bool ix86_function_value_regno_p (int);
extern bool ix86_function_arg_regno_p (int);
extern int ix86_function_arg_boundary (enum machine_mode, tree);
extern bool ix86_return_in_memory (const_tree, const_tree);
extern bool ix86_sol10_return_in_memory (const_tree,const_tree);
extern bool ix86_i386elf_return_in_memory (const_tree,const_tree);
extern bool ix86_i386interix_return_in_memory (const_tree,const_tree);
extern rtx ix86_force_to_memory (enum machine_mode, rtx);
extern void ix86_free_from_memory (enum machine_mode);
extern void ix86_split_fp_branch (enum rtx_code code, rtx, rtx,

View File

@ -4901,17 +4901,21 @@ return_in_memory_ms_64 (const_tree type, enum machine_mode mode)
return (size != 1 && size != 2 && size != 4 && size != 8);
}
bool
static bool
ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
const enum machine_mode mode = type_natural_mode (type);
#ifdef SUBTARGET_RETURN_IN_MEMORY
return SUBTARGET_RETURN_IN_MEMORY (type, fntype);
#else
const enum machine_mode mode = type_natural_mode (type);
if (TARGET_64BIT_MS_ABI)
return return_in_memory_ms_64 (type, mode);
else if (TARGET_64BIT)
return return_in_memory_64 (type, mode);
else
return return_in_memory_32 (type, mode);
return return_in_memory_ms_64 (type, mode);
else if (TARGET_64BIT)
return return_in_memory_64 (type, mode);
else
return return_in_memory_32 (type, mode);
#endif
}
/* Return false iff TYPE is returned in memory. This version is used
@ -4951,20 +4955,6 @@ ix86_sol10_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED
return size > 12;
}
bool
ix86_i386elf_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
return (TYPE_MODE (type) == BLKmode
|| (VECTOR_MODE_P (TYPE_MODE (type)) && int_size_in_bytes (type) == 8));
}
bool
ix86_i386interix_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
return (TYPE_MODE (type) == BLKmode
|| (AGGREGATE_TYPE_P (type) && int_size_in_bytes(type) > 8 ));
}
/* When returning SSE vector types, we have a choice of either
(1) being abi incompatible with a -march switch, or
(2) generating an error.
@ -25795,6 +25785,9 @@ x86_builtin_vectorization_cost (bool runtime_test)
}
/* Initialize the GCC target structure. */
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY ix86_return_in_memory
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE ix86_attribute_table
#if TARGET_DLLIMPORT_DECL_ATTRIBUTES

View File

@ -1261,25 +1261,6 @@ do { \
#define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"
/* A C expression which can inhibit the returning of certain function
values in registers, based on the type of value. A nonzero value
says to return the function value in memory, just as large
structures are always returned. Here TYPE will be a C expression
of type `tree', representing the data type of the value.
Note that values of mode `BLKmode' must be explicitly handled by
this macro. Also, the option `-fpcc-struct-return' takes effect
regardless of this macro. On most systems, it is possible to
leave the macro undefined; this causes a default definition to be
used, whose value is the constant 1 for `BLKmode' values, and 0
otherwise.
Do not use this macro to indicate that structures and unions
should always be returned in memory. You should instead use
`DEFAULT_PCC_STRUCT_RETURN' to indicate this. */
#define TARGET_RETURN_IN_MEMORY ix86_return_in_memory
/* This is overridden by <cygwin.h>. */
#define MS_AGGREGATE_RETURN 0