[fpc-devel] More on freepascal armhf porting attempt, some progress made but now stuck.

peter green plugwash at p10link.net
Sun Mar 11 18:28:06 CET 2012

>> Are you saying that VFP registers are treated as multimedia registers and not as FPU registers? If so presumablly that mean I should be using LOC_MMREG and not LOC_FPUREG as the location for parameters and return values?
> Yes.
Thank you for your help so-far, i'm gradually making progress though 
there is still some way to go.

While i'm currently working on doubles (since double is the dominant 
floating point type in my experiance and is also easier) at some point I 
will need to support singles correctly as well and I just ran into an 
issue that could pose a problem for making singles work correctly.

It seems freepascal identifies registers using a series of constants 
defined in rarmcon.inc which is generated from armreg.dat however to 
workarround a deficiency in the register allocator the same "register 
number" was allocated to both of the single precision registers that 
overlap with any given double precision register. So it seems there is 
no way to identify the two seperately within the compiler. This is a 
problem because to correctly implement the EABI VFP calling convention I 
need to use those registers.

Any thoughts on how to get arround this?

More information about the fpc-devel mailing list