This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: stormy16: limit SI reload regs
- From: Geoff Keating <geoffk at geoffk dot org>
- To: dj at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Apr 2003 17:23:28 -0700
- Subject: Re: stormy16: limit SI reload regs
- References: <200304292136.h3TLa8809569@greed.delorie.com> <jmwuhd55hn.fsf@desire.geoffk.org> <200304300401.h3U41L007885@greed.delorie.com> <200304301928.h3UJSjF17432@greed.delorie.com> <200304302031.h3UKVL911399@desire.geoffk.org> <200304302310.h3UNArW18812@greed.delorie.com>
> X-Original-To: geoffk@foam.wonderslug.com
> Date: Wed, 30 Apr 2003 19:10:53 -0400
> From: DJ Delorie <dj@redhat.com>
> Cc: gcc-patches@gcc.gnu.org
> X-OriginalArrivalTime: 30 Apr 2003 23:10:59.0930 (UTC) FILETIME=[C3522BA0:01C30F6D]
>
>
> > That won't work in general; sometimes you'll just happen to have a
> > variable in the wrong register, and reload won't reload it because it
> > fits the constraint even though it's not preferred.
>
> How about this one? This should stop everyone from putting an SI in
> $r7. Too bad we can't check both operands for this, as it stops us
> from doing reg-reg moves to/from $r7/$r8 also.
I really think it would be better to fix reload than to keep trying to
work around this in the port.
> 2003-04-30 DJ Delorie <dj@redhat.com>
>
> * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Don't allow
> an SImode in $r7 because we can't always split those.
>
> Index: stormy16.h
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/config/stormy16/stormy16.h,v
> retrieving revision 1.73
> diff -p -2 -r1.73 stormy16.h
> *** stormy16.h 17 Apr 2003 10:35:08 -0000 1.73
> --- stormy16.h 30 Apr 2003 23:06:56 -0000
> *************** do { \
> *** 343,347 ****
> registers are not in class `GENERAL_REGS', they will not be used unless some
> pattern's constraint asks for one. */
> ! #define HARD_REGNO_MODE_OK(REGNO, MODE) ((REGNO) != 16 || (MODE) == BImode)
>
> /* A C expression that is nonzero if it is desirable to choose register
> --- 343,349 ----
> registers are not in class `GENERAL_REGS', they will not be used unless some
> pattern's constraint asks for one. */
> ! #define HARD_REGNO_MODE_OK(REGNO, MODE) \
> ! (((REGNO) != 16 || (MODE) == BImode) \
> ! && ((REGNO) != 7 || (MODE) != SImode))
>
> /* A C expression that is nonzero if it is desirable to choose register
>
--
- Geoffrey Keating <geoffk@geoffk.org>