This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
MN10300: Fix definition of FUNCTION_ARG_REGNO_P
- From: Nick Clifton <nickc at redhat dot com>
- To: law at redhat dot com, aoliva at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 Feb 2010 09:24:04 +0000
- Subject: MN10300: Fix definition of FUNCTION_ARG_REGNO_P
Hi Jeff, Hi Alex,
There was a thinko in my last MN10300 patch :-( I corrected the
comment describing the FUNCTION_ARG_REGNO_P macro, so that instead of
claiming that the MN10300 had no argument registers, it claimed that
there were two. But I also changed the macro itself from:
#define FUNCTION_ARG_REGNO_P(N) ((N) <= 1)
to:
#define FUNCTION_ARG_REGNO_P(N) ((N) <= 2)
which of course is wrong since the registers are numbered from 0 not
1. Doh. Anyway I am checking in the obvious patch below to fix this
mistake.
Cheers
Nick
gcc/ChangeLog
2010-02-15 Nick Clifton <nickc@redhat.com>
* config/mn10300/mn10300.h (FUNCTION_ARG_REGNO_P): Revert previous
delta.
--- gcc/config/mn10300/mn10300.h.orig 2010-02-15 08:31:42.000000000 +0000
+++ gcc/config/mn10300/mn10300.h 2010-02-15 08:26:37.000000000 +0000
@@ -585,7 +585,7 @@ enum reg_class
/* 1 if N is a possible register number for function argument passing.
On the MN10300, d0 and d1 are used in this way. */
-#define FUNCTION_ARG_REGNO_P(N) ((N) <= 2)
+#define FUNCTION_ARG_REGNO_P(N) ((N) <= 1)
/* Define a data type for recording info about an argument list