2010年11月30日 星期二

ARM VFP

ARM11MPCore/ARMv6/VFPv2
-mfloat-abi=softfp -mfpu=vfp

With buildroot-2010.05 config, there are some confussion regarding softfp. In toolchain/gcc/Makefile.in, parameter is defined by BR2_SOFT_FLOAT and BR2_SOFT_FLOAT_FP. But BR2_SOFT_FLOAT_FP is not found in .config/Config.in, while there is another BR2_VFP_FLOAT, which "depends on !BR2_SOFT_FLOAT"....

BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=softfp --with-fpu=vfp"
Note that it is not "--with-float-abi=softfp"

BR2_TARGET_OPTIMIZATION="-O3 -pipe -mfloat-abi=softfp -mfpu=vfp"
1. check libm
2. check default setting (w/o giving -mfloat-abi and -mfpu)


ArmHardFloatPort
http://wiki.debian.org/ArmHardFloatPort
ArmHardFloatPort/VfpComparison
http://wiki.debian.org/ArmHardFloatPort/VfpComparison

3.17.2 ARM Options
http://gcc.gnu.org/onlinedocs/gcc-4.4.5/gcc/ARM-Options.html
-mfloat-abi=name
Specifies which floating-point ABI to use. Permissible values are: `soft', `softfp' and `hard'.

Specifying `soft' causes GCC to generate output containing library calls for floating-point operations. `softfp' allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. `hard' allows generation of floating-point instructions and uses FPU-specific calling conventions.

Using -mfloat-abi=hard with VFP coprocessors is not supported. Use -mfloat-abi=softfp with the appropriate -mfpu option to allow the compiler to generate code that makes use of the hardware floating-point capabilities for these CPUs.

The default depends on the specific target configuration. Note that the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.

(.......................)

-mfpu=name
-mfpe=number
-mfp=number
This specifies what floating point hardware (or hardware emulation) is available on the target. Permissible names are: `fpa', `fpe2', `fpe3', `maverick', `vfp', `vfpv3', `vfpv3-d16' and `neon'. -mfp and -mfpe are synonyms for -mfpu=`fpe'number, for compatibility with older versions of GCC.

If -msoft-float is specified this specifies the format of floating point values.



如何確認 uclibc 是有 VFP 最佳化的?
http://blog.richliu.com/2010/09/01/985/
arm-linux-gcc -mfloat-abi=soft -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o | less
__eabi_dmul

arm-linux-gcc -mfloat-abi=softfp -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o | less
fmuld (I see vmul.f64)


Vector Floating-Point (VFP)
http://scottshulinux.blogspot.com/2010/09/vector-floating-point-vfp.html


ARM VFP的一点体会
http://linux.chinaunix.net/bbs/viewthread.php?tid=1125926

VFP11 ™ VectorFloating-point Coprocessor Technical Reference Manual for ARM1136JF-S processorr1p5
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/index.html

Documentation / arm / VFP / release-notes.txt
http://www.mjmwired.net/kernel/Documentation/arm/VFP/release-notes.txt

SoftFloat
http://www.jhauser.us/arithmetic/SoftFloat.html

TestFloat
http://www.jhauser.us/arithmetic/TestFloat.html

ARM11 VFP
http://blog.richliu.com/2010/03/22/890/


Floating point on ARM machines and Octave errors
http://people.bath.ac.uk/enpsgp/floating_point.html

paranoia
http://www.netlib.org/paranoia/

沒有留言: