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]

Help with new port: infinite looping in reload


Hi all,

I'm starting from scratch with a new processor, and trying to add it
to gcc-3.4.3. The processor doesn't have an accessible stack, so I
have to make do with assigning one register as a stack pointer, and
"manually" doing pushes and pops into it. I prefer to pass arguments
and return values in hard registers, though, to prevent lots of
instructions for push and pop.

Also, the processor registers are all limited to 8 bits.

In any case, after a week of work, I've come up with a minimal machine
definition that doesn't abort in the RTL generation phase, where the
build tries to compile _muldi3 in libgcc2. It makes it all the way to
the reload phase where gcc goes into an infinite loop, continually
increasing the frame size and not getting much of anywhere else.

The code keeps calling eliminate_regs with RTL's like this:

(mem:SI (plus:QI (reg/f:QI 19 virtual-incoming-args)
        (const_int -107 [0xffffff95])) [17 S4 A8])

and there are hundreds of them.

I've been working on this issue for a while and I can't figure out
what is preventing gcc from breaking out of the loop.

The loop that's causing the problem is specifically in reload1.c lines
880 - 959. Since the frame size keeps increasing, the code does not
get past line 959.

Does anyone have any insight as to why reload might spin like that,
and how to fix the problem? I'm including my machine files in case
anyone wants to look at them.

Thanks for any help!

--Rob

Attachment: pic.tgz
Description: GNU Zip compressed data


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