This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New gcc port (ATMEL AVR) and question
- To: law at cygnus dot com
- Subject: Re: New gcc port (ATMEL AVR) and question
- From: Nick Ing-Simmons <nik at tiuk dot ti dot com>
- Date: Wed, 30 Dec 1998 13:41:40 GMT
- Cc: egcs at egcs dot cygnus dot com, Denis Chertykov <denis at medo dot fov dot uni-mb dot si>
- Organization: via, but not speaking for : Texas Instruments Ltd.
- References: <402.914815665@upchuck>
- Reply-To: Nick Ing-Simmons <nik at tiuk dot ti dot com>
Jeffrey A Law <law@cygnus.com> writes:
> In message <m0zuMHO-000IfhC@medo.fov.uni-mb.si>you write:
> >
> > GO_IF_LEGITIMATE_ADDRESS macro in strict mode disable to using
> > X pointer with displacement -
> > (plus:HI (reg:HI 26 r26) (const_int any-number)) - not allowed.
>This is where you're going wrong.
>
>You should have GO_IF_LEGITIMATE_ADDRESS return nonzero only for those
>displacements which are always valid for each particular mode.
>
>You can have special constraints which allow the larger displacements for
>those register pairs which allow larger displacements.
Hmm, easier said than done. When GO_IF_LEGITIMATE_ADDRESS is first called
the registers will be pseudos. If at that point the large offsets are
permitted then allocate/reload must ensure that appropriate register
class gets used. On the other hand if large offsets are dis-allowed
then the index operation will be computed some other way
and put in a register. In either case it is most unlikely that "special
constraints" will match. You would need a CSE-after-reload to re-permute
the RTL.
I had similar issues trying to port gcc to a TI DSP where
the subset of valid index registers depends on the (hard) reg used as
the base. In the end I gave up as it seemed impossible to allocate/reload
to an appropriate index register based on the associated base (or vice versa).
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.