[fpc-devel] Patch: Add support for armhf
plugwash at p10link.net
Tue Mar 20 23:43:25 CET 2012
I attatch a patch which adds support for armhf to freepascal.
Armhf reffers to arm with the VFP hardfloat variant of EABI. The
defaults are setup to
be suitable for debian armhf (armv7 vfpv3_d16).
The changes in the patch are documented below.
rtl/arm/setjump.inc, rtl/arm/math.inc, rtl/arm/mathu.inc rtl/arm/arm.inc,
rtl/arm/setjumph.inc. compiler/arm/narminl.pas, compiler/arm/cgcpu.pas,
Add support for the vfpv3_d16 variant of vfp. Currently I Don't think
actually uses any vfp version specific instructions so the code
won't be any different from when vfpv2 is selected. Still I think we
this FPU version as it's what debian uses and we want to pass the
option to the assembler for inline asm users.
While writing this part of the patch I came to wonder if we should
introduce a FPUVFP
define that is defined when any variant of VFP is selected. It would
simplify a lot of
conditionals in the RTL and would make it a lot less work to add a new
Fix an internal error number that was used twice in two different places.
Add new abi target "EABIHF"
add and document FPC_ARMHF define to create an armhf compiler.
check that the parameter/result is actually in an integer register
before taking special
codepath to handle that case
compiler/arm/armreg.dat compiler/arm/rarmnum.inc, compiler/arm/rarmsup.inc,
Give odd numbered single registers their own numbers so we can use them
Fix a typo in the stdname for S30
Raise the minimum imaginary multimeter number to make room for the
numbered single registers.
Mark appropriate odd numbered single registers as volatile.
Tell the assembler that we are using VFP and what version we are using.
Pass some armhf specific options (copied from what gcc does) when we are
for the eabihf abi target.
Actually implement the new ABI
Define FPC_ABI_EABI in addition to FPC_ABI_EABIHF on EABI VFP hardfloat
most code needs to behave the same on both
Set default CPU and FPU types to appropriate values when the EABIHF abi
target is selected.
Error out if the user tries to select EABIHF target with a non vfp FPU.
compiler/msg/errore.msg, compiler/msgtxt.inc, compiler/msgidx.inc:
Add new message for error mentioned in previous section and run make
messages (note: make messages seems to have added a lot of noise in the
Please review this patch and consider it for inclusion.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 76637 bytes
Desc: not available
More information about the fpc-devel