From 46af8e31a333e6ef7066c006b8e47d1e2140c3a3 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Mon, 23 Dec 1996 17:59:00 -0800 Subject: [PATCH] (FUNCTION_ARG_REGNO_P): Correct for TARGET_SOFT_FLOAT and TARGET_FLOAT64 cases. From-SVN: r13341 --- gcc/config/mips/mips.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 9b430ab5f48..df526545213 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2088,11 +2088,15 @@ extern struct mips_frame_info current_frame_info; #define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_RETURN || (N) == FP_RETURN) -/* 1 if N is a possible register number for function argument passing. */ - -#define FUNCTION_ARG_REGNO_P(N) (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST) \ - || ((N) >= FP_ARG_FIRST && (N) <= FP_ARG_LAST \ - && (0 == (N) % 2))) +/* 1 if N is a possible register number for function argument passing. + We have no FP argument registers when soft-float. When FP registers + are 32 bits, we can't directly reference the odd numbered ones. */ + +#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)))) /* A C expression which can inhibit the returning of certain function values in registers, based on the type of value. A nonzero value says -- 2.30.2