开发者

Difference in benchmark with different ARM cross compilers using hardware FP and soft VFP

开发者 https://www.devze.com 2023-04-11 05:32 出处:网络
I am currently using Open virtual platform that simulates an ARM processor and I\'m doing some benc开发者_如何学Chmarks on a simple task started by FreeRTOS with different cross compilers.

I am currently using Open virtual platform that simulates an ARM processor and I'm doing some benc开发者_如何学Chmarks on a simple task started by FreeRTOS with different cross compilers.

So I encountered something strange, when I use GCC toolchain, I have to use the flag -mhard-float when compiling the software because gcc's library is compiled using hardware FP. On my benchmark I get 10 million instructions.

However, when I switched to Codesourcerys ARM eabi toolchain, I have to use the flag -mfloat-abi=soft to compile the software because its library is not compiled with hard floats. On this benchmark I get 30 million instructions, THREE times as slow.

The software is very simple and does not test any floats, it just start a freeRTOS task and goes through a loop printing out numbers from 0 to 10000. Simple addition of integers.

Can anyone explain the difference in hard floats and soft floats and why the benchmarks differs so much between the compilers?

Best regards Mr Gigu

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号