|
亚瑟王 发表于 2013-7-17 15:12 
没有这么复杂,直接arm-linux-gcc编译的。
请参看
Neon and VFP both support floating point, which should I use?
The VFPv3 is fully compliant with IEEE 754
Neon is not fully compliant with IEEE 754, so it is mainly targeted for multimedia applications
Here is an example of showing how Neon pipelining will outperform VFP:
Taking the same C function from earlier, but using floating point types instead:
void NeonTest(float * __restrict a, float * __restrict b, float * __restrict z)
{
int i;
for(i=0;i<200;i++) {
z = a * b;
}
}
Compile the above code using CodeSourcery: GCC: (CodeSourcery Sourcery G++ Lite 2007q3-51) 4.2.1
Compile the above function for both Neon and VFP and compare results:
arm-none-linux-gnueabi-gcc -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp
arm-none-linux-gnueabi-gcc -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -ftree-vectorize -mfloat-abi=softfp
Running on OMAP3EVM under Linux with a Cortex-A8 clock speed of 600MHz
VFP/NEON Time to execute this function 500,000 times
VFP 7.36 seconds
Neon 0.94 seconds
3358中的浮点协处理器NEON的使用需要在编译的时候设置编译选项,否则不能启动浮点协处理器的功能,详情请参看网址
http://processors.wiki.ti.com/index.php/Cortex-A8 |
|