[patch] mcore.h: Fix PREDICATE_CODES.

Kazu Hirata kazu@cs.umass.edu
Sat Apr 2 22:19:00 GMT 2005


Hi,

Attached is a patch to fix PREDICATE_CODES by adding a few more codes.

Without this patch, the straightforward conversion of predicates to
predicates.md would fail, causing several "unrecognized insns".

Note that once we move to predicates.md, checks become tighter.  For
example, if we have

(define_predicate "mcore_general_movsrc_operand"
  (match_code "mem,const_int,reg,subreg")
  :
  :

Then this predicate do not accept any code other than those listed
inside match_code.

Built mcore-elf.  OK to apply?

Kazu Hirata

2005-04-02  Kazu Hirata  <kazu@cs.umass.edu>

	* config/mcore/mcore.h (PREDICATE_CODES): Add SYMBOL_REF and
	LABEL_REF to mcore_general_movsrc_operand.  Add SYMBOL_REF to
	mcore_call_address_operand.

Index: mcore.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore.h,v
retrieving revision 1.71
diff -u -d -p -r1.71 mcore.h
--- mcore.h	30 Dec 2004 03:07:55 -0000	1.71
+++ mcore.h	2 Apr 2005 22:06:09 -0000
@@ -1128,7 +1128,7 @@ extern long mcore_current_compilation_ti
 
 #define PREDICATE_CODES							\
   { "mcore_arith_reg_operand",		{ REG, SUBREG }},		\
-  { "mcore_general_movsrc_operand",	{ MEM, CONST_INT, REG, SUBREG }},\
+  { "mcore_general_movsrc_operand",	{ MEM, CONST_INT, REG, SUBREG, SYMBOL_REF, LABEL_REF }},\
   { "mcore_general_movdst_operand",	{ MEM, CONST_INT, REG, SUBREG }},\
   { "mcore_reload_operand",	        { MEM, REG, SUBREG }},		\
   { "mcore_arith_J_operand",		{ CONST_INT, REG, SUBREG }},	\
@@ -1144,6 +1144,6 @@ extern long mcore_current_compilation_ti
   { "mcore_compare_operand",		{ CONST_INT, REG, SUBREG }},	\
   { "mcore_load_multiple_operation",	{ PARALLEL }},			\
   { "mcore_store_multiple_operation",	{ PARALLEL }},			\
-  { "mcore_call_address_operand",	{ REG, SUBREG, CONST_INT }},	\
+  { "mcore_call_address_operand",	{ REG, SUBREG, CONST_INT, SYMBOL_REF }},	\
 
 #endif /* ! GCC_MCORE_H */



More information about the Gcc-patches mailing list