diff options
author | Jim Wilson <wilson@cygnus.com> | 1999-10-28 18:29:10 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1999-10-28 11:29:10 -0700 |
commit | c9fc373cf093aa8e63a225a38a033bd961806d75 (patch) | |
tree | 658a591e8f2cb8ac14c3be40cb4c1a0158b8d23e | |
parent | 7ab282a5a0880dea9e75e04113676d7e4139d4b9 (diff) | |
download | gcc-c9fc373cf093aa8e63a225a38a033bd961806d75.zip gcc-c9fc373cf093aa8e63a225a38a033bd961806d75.tar.gz gcc-c9fc373cf093aa8e63a225a38a033bd961806d75.tar.bz2 |
Fix stdarg bugs with MIPS EABI that caused newlib/libstdc++ build failures.
* config/mips/mips.c (mips_va_arg): Delete gen_jump as emit_jump arg.
(function_arg_pass_by_reference): Check for a NULL pointer in cum.
From-SVN: r30245
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4f2b4ee..0cee76f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Thu Oct 28 10:02:00 1999 Jim Wilson <wilson@cygnus.com> + * config/mips/mips.c (mips_va_arg): Delete gen_jump as emit_jump arg. + (function_arg_pass_by_reference): Check for a NULL pointer in cum. + * config/i960/i960.c (i960_va_start): New locals base, num. Use INDIRECT_REF instead of ARRAY_REF on valist. (i960_va_arg): Use INDIRECT_REF instead of ARRAY_REF on valist. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 9be617f..dc19e8b 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4199,7 +4199,7 @@ mips_va_arg (valist, type) if (r != addr_rtx) emit_move_insn (addr_rtx, r); - emit_jump (gen_jump (lab_over)); + emit_jump (lab_over); emit_barrier (); emit_label (lab_false); } @@ -7447,7 +7447,9 @@ function_arg_pass_by_reference (cum, mode, type, named) ??? 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. */ - if (FUNCTION_ARG (*cum, mode, type, named) != 0 + /* ??? 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; |