This is the mail archive of the 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]

[PATCH]: Fix build of libgcc for HC11/HC12 on mainline


Committed this patch on mainline to fix the build of libgcc for HC11/HC12.

When reloading some instructions, it happened that some registers have
no hard register allocated for them (reg_renumber[regno] == -1) and
the -1 is used as an index in a table to check if the register is a valid
address register.  The REG_VALID_P macro was supposed to check that.


2005-05-08  Stephane Carrez  <>

	* config/m68hc11/m68hc11.h (REG_VALID_P): A regno must be >= 0
	and -1 can happen in reg_renumber when no hard register is assigned.
Index: config/m68hc11/m68hc11.h
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.h,v
retrieving revision 1.93
diff -u -p -r1.93 m68hc11.h
--- config/m68hc11/m68hc11.h	8 May 2005 19:53:42 -0000	1.93
+++ config/m68hc11/m68hc11.h	8 May 2005 21:48:03 -0000
@@ -1069,7 +1069,7 @@ extern enum reg_class m68hc11_index_reg_
 /* Internal macro, return 1 if REGNO is a valid base register.  */
-#define REG_VALID_P(REGNO) (1)	/* ? */
+#define REG_VALID_P(REGNO) ((REGNO) >= 0)
 extern unsigned char m68hc11_reg_valid_for_base[FIRST_PSEUDO_REGISTER];

Attachment: signature.asc
Description: OpenPGP digital signature

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