mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause.

* config/mips/mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause.
	* config/mips/mips.c (function_arg_pass_by_reference): Never return
	true for n32 & n64.

From-SVN: r70641
This commit is contained in:
Richard Sandiford 2003-08-21 11:32:16 +00:00 committed by Richard Sandiford
parent 35c18a2035
commit 7bc224514a
3 changed files with 12 additions and 27 deletions

View File

@ -1,3 +1,9 @@
2003-08-21 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause.
* config/mips/mips.c (function_arg_pass_by_reference): Never return
true for n32 & n64.
2003-08-21 Josef Zlomek <zlomekj@suse.cz>
* fold-const.c (fold): Fix bug in (A & C) == D where D & ~C != 0

View File

@ -7657,29 +7657,13 @@ mips_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
nonzero when an argument must be passed by reference. */
int
function_arg_pass_by_reference (const CUMULATIVE_ARGS *cum,
function_arg_pass_by_reference (const CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
enum machine_mode mode, tree type,
int named ATTRIBUTE_UNUSED)
{
int size;
if (mips_abi == ABI_32 || mips_abi == ABI_O64)
return 0;
/* We must pass by reference if we would be both passing in registers
and the stack. This is because any subsequent partial arg would be
handled incorrectly in this case.
??? This is really a kludge. We should either fix GCC so that such
a situation causes an abort and then do something in the MIPS port
to prevent it, or add code to function.c to properly handle the case. */
/* ??? cum can be NULL when called from mips_va_arg. The problem handled
here hopefully is not relevant to mips_va_arg. */
if (cum && MUST_PASS_IN_STACK (mode, type)
&& FUNCTION_ARG (*cum, mode, type, named) != 0)
return 1;
/* Otherwise, we only do this if EABI is selected. */
/* The EABI is the only one to pass args by reference. */
if (mips_abi != ABI_EABI)
return 0;

View File

@ -2372,18 +2372,13 @@ typedef struct mips_args {
(mips_abi == ABI_EABI && (NAMED) \
&& FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED))
/* Modified version of the macro in expr.h. */
/* Modified version of the macro in expr.h. Only return true if
the type has a variable size or if the front end requires it
to be passed by reference. */
#define MUST_PASS_IN_STACK(MODE,TYPE) \
((TYPE) != 0 \
&& (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \
|| TREE_ADDRESSABLE (TYPE) \
|| ((MODE) == BLKmode \
&& mips_abi != ABI_32 && mips_abi != ABI_O64 \
&& ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
&& 0 == (int_size_in_bytes (TYPE) \
% (PARM_BOUNDARY / BITS_PER_UNIT))) \
&& (FUNCTION_ARG_PADDING (MODE, TYPE) \
== (BYTES_BIG_ENDIAN ? upward : downward)))))
|| TREE_ADDRESSABLE (TYPE)))
/* True if using EABI and varargs can be passed in floating-point
registers. Under these conditions, we need a more complex form