Andrew Cagney wrote:
> These changes fix 16 testsuite failures, based in the Irix native
> compiler running with -n32 (and produce no regressions for -o32).
Yes, with tweaks.
General comment. You may want to consider restructuring the function to
read:
for (argument in arguments)
for (argument broken down in to 8 byte chunks)
if (fp argument && fnpreg <= num fp arg regs)
write argument chunk to fp register
else if (!fp argument && reg <= num arg regs)
write chunk (carefully aligned) to gp register
else
write chunk to (carefully aligned) memory
OK, I've checked in, with all of your tweaks except for the above.
Come on, you can't ask me to restructure the whole function just
to get what was originally a 5-line change in!!! ;-)
If you haven't already, look through the document:2002-08-09 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (ROUND_DOWN, ROUND_UP): Move to global scope.
(mips_push_arguments): Correct some comments. Use paddr_nz
for printing addresses in debug output. Replace static
allocation using MAX_REGISTER_RAW_SIZE with alloca.
(mips_n32n64_push_arguments): New function, cloned from
mips_push_arguments and tuned for the n32/n64 ABI.
(mips_push_register): Buffer needs dynamic allocation.
(mips_print_register): Ditto.
(do_gp_register_row): Ditto.
(mips_store_return_value): Ditto.
(mips_gdbarch_init): Set gdbarch_push_arguments per ABI.