It can be even a little more complicated than you expected. The GCC settings page does not explain fpu versions, however the ARM Guide is for their compiler . You should also notice that Linux does not provide complete information about fpu functions , just talking about vfp
, vfpv3
, vfpv3d16
, or vfpv4
.
Back to your question, you should choose the most common factor among them, compile your code and compare the results. On the other hand, if cpu has vfpv4 and the other has vfpv3, which in your opinion is better?
If your question is as simple as choosing between neon
, vfp
or vfpv3
. Select neon
(source) .
-mfpu=neon selects VFPv3 with NEON coprocessor extensions.
In the gcc manual,
If the selected floating point hardware includes the NEON extension (for example, -mfpu=neon
), note that floating point operations cannot be used with GCC auto-integration if `-funsafe-math-optimizations' is also specified. This is because NEON Hardware does not fully implement the IEEE 754 standard for floating point arithmetic (in particular, denormal values ββare treated as zero), so using NEON instructions can lead to loss of precision.
See, for example, Subset IEEE-754 floating point numbers on ios ... for more information on this topic.
source share