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

Bian, Naimeng biannm at cn.fujitsu.com
Fri Jul 10 01:53:22 PDT 2015


Hi Nathan

Thanks for your clear explanation.
It's very helpful to me, especially what it's mean about "hard-float" vs "soft-fp" vs "soft-float". 

As you said, I think the soft-fp is the best choice as default. ^_^

Thanks
 Bian

> -----Original Message-----
> From: Nathan Rossi [mailto:nathan at nathanrossi.com]
> Sent: Friday, July 10, 2015 4:20 PM
> To: Bian, Naimeng/卞 乃猛
> Cc: meta-xilinx at yoctoproject.org
> Subject: Re: [meta-xilinx] [RFC][Question] Enable VFP?
> 
> On Fri, Jul 10, 2015 at 5:09 PM, Bian, Naimeng <biannm at cn.fujitsu.com> 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.
> 
> Hi Bian,
> 
> So this topic I believe has come up before. There are some specifics that need
> highlighting so that the concepts are fully understood as well as the reasons
> behind the choice for the DEFAULTTUNE used in meta-xilinx.
> 
> Firstly let me clear up your understanding of the Yocto/OE tune features and
> the setup of toolchain settings in relation to VFP. The
> cortexa9 tunes in OE are a derivative of the armv7a tunes, with the additional
> of the "cortexa9" feature. By default the "armv7a" tune includes the "arm",
> "armv7a" and "vfp" tunes (see here
> https://github.com/openembedded/openembedded-core/blob/master/meta/conf/ma
> chine/include/arm/arch-armv7a.inc#L17).
> Also of important note is that the "hf" refers to the "callconvention-hard"
> tune. So based on the DEFAULTTUNE set in meta-xilinx which is "cortexa9-neon"
> the 'vfp' and 'neon' tune features are enabled. This means that the default
> config for Zynq machines in meta-xilinx will emit code that uses the VFP.
> 
> What you are suggesting is to use the "cortexa9thf-neon" tune as the default.
> This would by additionally enable 'callconvention-hard' as well as 'thumb'.
> If you are unfamiliar with the "hard-float" vs "soft-fp" vs "soft-float" for
> arm here is a quick summary:
> * hard-float -> The calling ABI will pass float variables across calls in the
> VFP registers. This removes the need to copy back data into the general purpose
> registers (ABI not compatible with soft-fp)
> * soft-fp -> (not to be confused with soft-float) The calling ABI will pass
> float variables via the general purpose registers, which may or may not require
> copying from the VFP registers. This allows for compatibility with the existing
> ARM abi.
> * soft-float -> complete software float implementation, calling ABI is same
> as soft-fp
> 
> The reason for using soft-fp by default for Zynq machines/tune is that Xilinx
> started out using soft-fp since the beginning for Zynq, all the Xilinx tooling
> relies on soft-fp (e.g. FSBL, XSDK, etc). So it made sense to default to this
> in meta-xilinx to ensure users would not hit issues when moving to Yocto/OE
> or if they were porting older ARM applications/etc.
> 
> Yocto/OE is very flexible in this manner, if you need the performance gain that
> hard-float can provide (roughly 10-15% in best case) and you are prepared to
> break the compatibility with the soft-fp ABI then you can switch the DEFAULTTUNE
> for you machine (or just in your
> local.conf) to "cortexa9hf-neon" or "cortexa9thf-neon" (for thumb support).
> 
> Regards,
> Nathan
> 
> >
> > Thanks
> >  Bian
> > --
> > _______________________________________________
> > meta-xilinx mailing list
> > meta-xilinx at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-xilinx


More information about the meta-xilinx mailing list