免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8233 | 回复: 3
打印 上一主题 下一主题

GCC ARM的-mfloat-abi选项 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-01 22:03 |只看该作者 |倒序浏览
GCC的ARM编译选项-mfloat-abi=name,其中soft和softfp有什么区别?

下面是GCC ARM的解释,我的理解是:

hard表示编译成浮点运算指令,一般是CPU内带有支持浮点运算的FPU

soft表示软件实现浮点运算,一般是在glibc里有软件的方法实现浮点运算(以前好像有种FPE的方法,在内核里面实现浮点运算,因为性能低下,现在很少使用)

softfp按照他的翻译是,虽然生成了浮点指定,但是仍然使用软浮点运算的调用规则? 什么意思。。

-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.

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.

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
2 [报告]
发表于 2010-07-02 15:32 |只看该作者
> FPU-specific calling conventions

不熟悉arm,但看起来arm的FPU有特定的调用约定。

论坛徽章:
0
3 [报告]
发表于 2010-07-07 07:35 |只看该作者
GCC的ARM编译选项-mfloat-abi=name,其中哪有soft和softfp

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
4 [报告]
发表于 2010-07-07 17:27 |只看该作者
> Permissible values are: `soft', `softfp' and `hard'.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP