This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross gcc port problem
- To: "Hans-Peter Nilsson" <hans-peter dot nilsson at axis dot com>
- Subject: Re: cross gcc port problem
- From: "Oleg I. Vdovikin" <vdovikin at jscc dot ru>
- Date: Tue, 27 Mar 2001 13:18:01 +0400
- Cc: <gcc at gcc dot gnu dot org>
- References: <200103270128.DAA14448@ignucius.axis.se>
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
>