This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NEON vs VFP usage

Note: This was originally posted on 29th August 2011 at http://forums.arm.com

Hi,

Could I use NEON and VFP at the same time in my application?
What would be the downsides of that?

I read also in the documentation that the compilation flags are as following:
GCC
-mfpu=neon -mfloat-abi=softfp
-mfpu=vfpv3 -mfloat-abi=softfp
ARMCC
--cpu=Cortex-A9 --apcs=/softfp
--cpu=Cortex-A9 --fpu=VFPv3 --apcs=/softfp

Do this control just the usage of NEON intrinsics? Does specifying th option for one(e.g. neon)
prevents me from using the other(e.g. vfp) directly in the code?

Also specifying "softfp" seems to incur some overhead in my application(at least from the preliminary benchmarks).
I tried to use the "hard" option but then I have linkage error as the runtime libraries are not built with support for that.
Could I get somewhere the runtime libraries built with "hard" or do I have to do it myself?

Thanks
Parents
  • Note: This was originally posted on 30th August 2011 at http://forums.arm.com


    The --aapcs flag changes the procedure call standard (or sub-standard) being used.  In this case from the default "hard fp" linkage to "soft fp" linkage.  What this means is practise is how parameters and return values are passed.  With hard fp, float types (float and double) will be passed in VFP/NEON registers.  With softfp float types will be passed in general purpose registers.


    OK. Thanks.
    That is what I also understood.

    I tried to use hard fp for my application, but I got linking error which were more or less expected as the
    calling conventions do not match between my app's own object files and the C++ libraries. I was wondering if
    there are runtime C++ libraries available to use which were built using hard fp or if there is any kind of
    workaround for this situation(apart from me building my own versions of the runtime libs). As I understood from
    documentation and forum posts I read using softfp(float types arguments passed in GPRs) incurs a certain penalty in performance.
Reply
  • Note: This was originally posted on 30th August 2011 at http://forums.arm.com


    The --aapcs flag changes the procedure call standard (or sub-standard) being used.  In this case from the default "hard fp" linkage to "soft fp" linkage.  What this means is practise is how parameters and return values are passed.  With hard fp, float types (float and double) will be passed in VFP/NEON registers.  With softfp float types will be passed in general purpose registers.


    OK. Thanks.
    That is what I also understood.

    I tried to use hard fp for my application, but I got linking error which were more or less expected as the
    calling conventions do not match between my app's own object files and the C++ libraries. I was wondering if
    there are runtime C++ libraries available to use which were built using hard fp or if there is any kind of
    workaround for this situation(apart from me building my own versions of the runtime libs). As I understood from
    documentation and forum posts I read using softfp(float types arguments passed in GPRs) incurs a certain penalty in performance.
Children
No data