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]

Re: cross gcc port problem


Hello,
    Hans-Peter, sorry for my typos. Yes I'm using ACCUM_REGS for this
purpose, but I've changed this definition many times in order to see if
something changes... But have no luck. :-((
    For now I'm using approach similar to m68hc11 port, i.e. software
registers instead of real accumulator register. So this brings me 6 regs
instead of 1 in the general purpose regs, so the problems with register
pressure go away, but sometimes I'm still got "unable to generate reloads"
because of only 2 available index regs. Most programs compiles only with
"-O -fomit-frame-pointer" options specified...
    This solution does not describe accumulator as available register for
register allocator (because the contents of accumulator clobbered by every
insn I have).
    It's mostly funny, but the code size increased for only 5% compared with
the solution with only 1 accumulator register available...
    But I'm still looking for the solution with only one accumulator
register.
Regards,
    Oleg.

----- Original Message -----
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: <vdovikin@jscc.ru>
Cc: <gcc@gcc.gnu.org>
Sent: Tuesday, March 27, 2001 5:28 AM
Subject: Re: cross gcc port problem


> > From: "Oleg I. Vdovikin" <vdovikin@jscc.ru>
> > Date: Tue, 20 Mar 2001 19:26:15 +0300
>
> (Hmm, nobody else replied to the base problem.  Well, ok, here goes.)
>
> > #define SECONDARY_RELOAD_CLASS(CLASS,MODE,X) \
> >     (class == BASE_REGS && GET_CODE(x) == MEM) ? BASE_REGS : NO_REGS;
>
> Better make it
>   ((CLASS) == BASE_REGS && GET_CODE (x) == MEM) ? ACCUM_REGS : NO_REGS;
> if memory accesses have to go through the accumulator.  In
> SECONDARY_RELOAD_CLASS you are supposed to specify a register
> class that the move has to go *through* (i.e. an intermediate
> class), not the class that *needs* the reload.  If the wording
> in the manual caused confusion, please help improve it.
>
> brgds, H-P
>


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