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

RFA: Fix ICE building newlib for MN10300


Hi Jeff, Hi Alex,

  Currently the mn10300 port fails to build newlib because of an ICE
  in default_secondary_reload:
  
    newlib/libc/string/str-two-way.h: In function 'two_way_long_needle':
    newlib/libc/string/str-two-way.h:409: internal compiler error: in default_secondary_reload, at targhooks.c:649
    Please submit a full bug report,

  I tracked this down to the fact that mn10300_secondary_reload_class
  is returning the DATA_REGS class for stack pointer adjustments, but
  the reload_insi pattern has an 'r' constraint, ie GENERAL_REGS.

  Applying the small patch below fixes mn10300_secondary_reload_class
  and allows newlib to be built.

  May I apply it please ?

Cheers
  Nick

gcc/ChangeLog
2008-01-30  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.c (mn10300_secondary_reload_class):
        Return GENERAL_REGS for stack adjustment reloads.

Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c	(revision 131957)
+++ gcc/config/mn10300/mn10300.c	(working copy)
@@ -1361,11 +1361,7 @@ mn10300_secondary_reload_class (enum reg
   if (GET_CODE (in) == PLUS
       && (XEXP (in, 0) == stack_pointer_rtx
 	  || XEXP (in, 1) == stack_pointer_rtx))
-    {
-      if (TARGET_AM33)
-	return DATA_OR_EXTENDED_REGS;
-      return DATA_REGS;
-    }
+    return GENERAL_REGS;
 
   if (TARGET_AM33_2 && class == FP_REGS
       && GET_CODE (in) == MEM

  


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