This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bugs in MIPS FUNCTION_ARG_REGNO_P ?


On Tue, 2004-03-02 at 23:25, Mark Mitchell wrote:
> >>#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))		\
> >>   && !fixed_regs[N])

This changed between 3.2 and 3.3.  3.2 has
#define FUNCTION_ARG_REGNO_P(N)                                 \
  (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST)                  \
   || (! TARGET_SOFT_FLOAT                                      \
       && ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST)           \
       && (TARGET_FLOAT64 || (0 == (N) % 2))))
which will work.

Note that a || was changed to a && and a set of parentheses was dropped,
which breaks the code.

The key point here is that O32 uses f12/f14 because we can't access odd
numbered registers, but O64 uses f12/f13/f14/f15.  This assumes that O64
always uses TARGET_FLOAT64, but that is probably a reasonable
assumption.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]