[meta-xilinx] [RFC][Question] Enable VFP?

Mike Looijmans mike.looijmans at topic.nl
Fri Jul 10 01:17:27 PDT 2015


On 10-07-15 09:09, Bian, Naimeng wrote:
> Hi all,
>
> As I know, VFP is an optional unit for ARMv7, but do all of Zynq Soc support VFP,
> if so, IMO we should set DEFAULTTUNE to 'cortexa9thf-neon' in conf/machine/include/tune-zynq.

Your suggestion is probably based on the misconception that the "hf" directive 
enables the VFP.

The "hf" switch only enables the hard-float ABI, which means that the 
interface between libraries etc. will use the VFP registers for parameter 
transfers.
Whether gcc outputs VFD code is determined by tuning settings, which are 
already set to "neon", and neon implies VFD, hence gcc will output VFD 
floating point code regardless of whether "hf" is in your tune settings.

Using cortexa9thf-neon will break ABI compatibility with other ARMv7 code, 
that is why it is rarely used, and OE defaults to soft-float ABI. The 
difference in performance is neglegible, unless you have some weird library 
interface that passes lots of floats on the stack.

The issue is not specific to Zynq, it is generic for all ARM cpus with hard 
float support.

cortexa9thf-neon will only work if all code is built from within the same 
environment, or at least, all use the hard-float ABI. For example, using the 
Xilinx SDK to compile a linux binary will then not work correctly (if there 
are any floats in the interface) since the SDK also defaults to the soft-float 
ABI.


Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
Telefax: +31 (0) 499 33 69 70
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail








More information about the meta-xilinx mailing list