[fpc-devel] register allocator seems to be using S20 for two things at the same time (related to armhf porting work)
plugwash at p10link.net
Sun Mar 18 13:41:56 CET 2012
Daniël Mantione wrote:
> Please use the command line option -sr to check the generated code
> before register allocation.
Done and attatched.
> You can likely find the cause in there.
The code with imaginary registers looks correct to me. It seems to load
each parameter into a seperate even numbered imaginary register (using
odd numbered imaginary registers as temporaries in the process)
allocating them as it goes. Then copies them to the locations needed for
the function call deallocating them as it goes.
So it seems to me that the problem is in the translation of the form
using imaginary registers to the form using real registers. Can you
explain (or point me to documentation on) how this form is translated
into a form using real registers. In particular what exactly happens
when there are not enough real registers free to assign a real register
for every imaginary register that is in use at a given time?
My current suspiscion is that something is missing regarding handling of
running out of VFP registers and it hasn't been noticed before because
noone has tried to do what i'm doing (implementing a calling convention
using VFP registers and then stress testing it) but i've no idea where
to look in the sourcecode to confirm/refute that idea.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the fpc-devel