diff options
author | Clinton Popetz <cpopetz@cygnus.com> | 2000-01-11 17:42:30 +0000 |
---|---|---|
committer | Clinton Popetz <cpopetz@gcc.gnu.org> | 2000-01-11 12:42:30 -0500 |
commit | 1e7a71c15355d9e092bd76ec5eb4317a114587f5 (patch) | |
tree | 82f6fde4d86a674d0307f4f0debe1749ea5b8a35 | |
parent | a249decd13d6d5a45ffa364bbfc766b03d83f96f (diff) | |
download | gcc-1e7a71c15355d9e092bd76ec5eb4317a114587f5.zip gcc-1e7a71c15355d9e092bd76ec5eb4317a114587f5.tar.gz gcc-1e7a71c15355d9e092bd76ec5eb4317a114587f5.tar.bz2 |
mips.c (mips_va_arg): For EABI...
* 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.
From-SVN: r31328
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 16 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 12 |
3 files changed, 31 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f728c2e..eb6600a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 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 is marked dead, unconditionally clear libcall_is_dead and insn_is_dead, and only dump rtl if warnings aren't being diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 63900f2..67859df 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4226,6 +4226,9 @@ mips_va_arg (valist, type) 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); @@ -7449,9 +7452,16 @@ function_arg_pass_by_reference (cum, mode, type, named) 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) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 64212b2..1690dfc 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2804,6 +2804,13 @@ typedef struct mips_args { 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); \ \ @@ -2812,11 +2819,6 @@ typedef struct mips_args { 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); \ |