This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] fix FUNCTION_ARG_REGNO_P for mips
- From: Eric Christopher <echristo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Sandiford <rsandifo at redhat dot com>
- Date: Thu, 04 Mar 2004 02:01:43 -0800
- Subject: [committed] fix FUNCTION_ARG_REGNO_P for mips
So here's a checkin to fix the problems after a nice long email
discussion between Richard S. and I about exactly what
FUNCTION_ARG_REGNO_P means (b below). He'll be submitting a
documentation patch later for this.
So, what this does:
a) fixed_regs[n] will return for soft float, so that case is handled
b) all of the various registers are valid for arguments, because if
they're not passed in them then it uses them anyhow. Did a look around
and everything that uses such things (that we could find) checks
HARD_REGNO_MODE_OK before using the register and FP_INC is used in that
case.
Tested on mips64-elf and mips64vr-elf.
Committed.
-eric
--
Eric Christopher <echristo@redhat.com>
2004-03-04 Eric Christopher <echristo@redhat.com>
* config/mips/mips.h (FUNCTION_ARG_REGNO_P): Fix to check
only range of valid arg registers and fixed_regs.
Index: mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.325
diff -u -p -w -r1.325 mips.h
--- mips.h 3 Mar 2004 08:59:29 -0000 1.325
+++ mips.h 4 Mar 2004 09:55:00 -0000
@@ -2201,8 +2201,7 @@ extern enum reg_class mips_char_to_class
#define FUNCTION_ARG_REGNO_P(N) \
((IN_RANGE((N), GP_ARG_FIRST, GP_ARG_LAST) \
- || (IN_RANGE((N), FP_ARG_FIRST, FP_ARG_LAST) \
- && ((N) % FP_INC == 0) && mips_abi != ABI_O64)) \
+ || (IN_RANGE((N), FP_ARG_FIRST, FP_ARG_LAST))) \
&& !fixed_regs[N])
/* This structure has to cope with two different argument allocation