DDE & VFP Support for RPi
Volkert (1705) 24 posts |
Dear all, is there a compiler/linker flag to enable VFP support? I found no information in the documentation. DDE24 BW, |
Martin Bazley (331) 379 posts |
No, there isn’t. objasm (the assembler) will accept VFP instructions, but it isn’t possible to get the C compiler to emit them. (You can’t even use the inline assembler.) So, if you want VFP, you have to ‘roll it yourself’ in the ‘s’ directory rather than use C. If you don’t want to learn assembler, there’s always the route which RISC OS developers have been taking for the past 25 years – avoid floating point at all costs. |
Volkert (1705) 24 posts |
;-) I found out that Charm supports VFP. But i was not able to re-build Charm (2.6.3) for VFP. The linker crashed. Any other HLL that supports VFP? BW, |
Theo Markettos (89) 919 posts |
GCC should support it, though I haven’t tried it. |
Martin Bazley (331) 379 posts |
AFAIK, GCC has three floating point options. ‘soft’ uses software emulation (very slow), ‘softfp’ uses VFP with ‘slow’ calling conventions (I’ve no idea what that means either), and ‘hard’ is (I presume) better than ‘softfp’. ‘softfp’ is implemented in the RISC OS port, but ‘hard’ isn’t. |
Martin Avison (27) 1491 posts |
I thought VFP support was added to Basic? |
Theo Markettos (89) 919 posts |
ICBW, but I think there’s VFP support in the BASIC assembler, but no actual VFP support in BASIC for FP operations. It still uses FPA instructions which get emulated. From what I read there’s not much point in using ‘softfp’ with GCC because it’s designed so you can mix soft and hard code. On RISC OS I imagine it’s only relevant if you have libraries compiled with soft-float that you can’t recompile. |