+2000-01-11 Clinton Popetz <cpopetz@cygnus.com>
+
+ * config/mips/mips.c (mips_va_arg): For EABI, emit the queued
+ integer vararg POSTINCREMENT before the destination of the jump
+ for the hard fp case.
+ (function_arg_pass_by_reference): Pass a copy of CUM to
+ FUNCTION_ARG.
+
+ * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Move check
+ for CONSTANT_ADDRESS_P above while loop for subreg.
+
2000-01-11 Clinton Popetz <cpopetz@cygnus.com>
* flow.c (propagate_block): When a prologue/epilogue insn
if (r != addr_rtx)
emit_move_insn (addr_rtx, r);
+ /* Ensure that the above POSTINCREMENT is emitted before lab_over */
+ emit_queue();
+
if (lab_over)
emit_label (lab_over);
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 && FUNCTION_ARG (*cum, mode, type, named) != 0
- && MUST_PASS_IN_STACK (mode, type))
- return 1;
+ if (cum && MUST_PASS_IN_STACK (mode, type))
+ {
+ /* Don't pass the actual CUM to FUNCTION_ARG, because we would
+ get double copies of any offsets generated for small structs
+ passed in registers. */
+ CUMULATIVE_ARGS temp = *cum;
+ if (FUNCTION_ARG (temp, mode, type, named) != 0)
+ return 1;
+ }
+
/* Otherwise, we only do this if EABI is selected. */
if (mips_abi != ABI_EABI)
GO_DEBUG_RTX (xinsn); \
} \
\
+ /* Check for constant before stripping off SUBREG, so that we don't \
+ accept (subreg (const_int)) which will fail to reload. */ \
+ if (CONSTANT_ADDRESS_P (xinsn) \
+ && ! (mips_split_addresses && mips_check_split (xinsn, MODE)) \
+ && (! TARGET_MIPS16 || mips16_constant (xinsn, MODE, 1, 0))) \
+ goto ADDR; \
+ \
while (GET_CODE (xinsn) == SUBREG) \
xinsn = SUBREG_REG (xinsn); \
\
if (GET_CODE (xinsn) == REG && REG_MODE_OK_FOR_BASE_P (xinsn, MODE)) \
goto ADDR; \
\
- if (CONSTANT_ADDRESS_P (xinsn) \
- && ! (mips_split_addresses && mips_check_split (xinsn, MODE)) \
- && (! TARGET_MIPS16 || mips16_constant (xinsn, MODE, 1, 0))) \
- goto ADDR; \
- \
if (GET_CODE (xinsn) == LO_SUM && mips_split_addresses) \
{ \
register rtx xlow0 = XEXP (xinsn, 0); \