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

Re: Problem with ColdFire restricted addressing modes (mode5.6combination)


>In order to fix this, you need to modify the 'U' constraint so it won't
>accept things that won't match a 'U' constraint after they are reloaded,
>namely, you have to stop accepting out of range constants.

I modified the 'U' case to be:

  (((C) == 'U')					\
   ? ((GET_CODE (OP) == MEM 				\
      && GET_CODE (XEXP (OP, 0)) == PLUS		\
      && GET_CODE (XEXP (XEXP (OP, 0), 0)) == REG	\
      && GET_CODE (XEXP (XEXP (OP, 0), 1)) == CONST_INT \
      && (!TARGET_COLDFIRE || (INTVAL (XEXP (XEXP (OP, 0), 1)) >= -32768	\
          && INTVAL (XEXP (XEXP (OP, 0), 1)) <= -32767)))	\
	|| (GET_CODE (OP) == MEM			\
	    && GET_CODE (XEXP (OP, 0)) == REG))		\

And the ICE goes away.  I'll have to look at the geneated code and
EXTRA_MEMORY_CONSTRAINTS to see if I can tweak the code generation.

Thanks for your help in this; your description of the innards of
reload was quite informative.

I'll build up the whole compiler (bootstrap/newlib/gcc with C++) and
then submit a patch.

-- 
Peter Barada
peter@the-baradas.com


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