什么是软,硬浮点数之间的区别? [英] What's the difference between hard and soft floating point numbers?

查看:868
本文介绍了什么是软,硬浮点数之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译C code。与我的交叉工具链,警告说我的可执行文件使用的硬盘花车,但我的libc中使用软花车的链接打印页面。有什么区别?

When I compile C code with my cross toolchain, the linker prints pages of warnings saying that my executable uses hard floats but my libc uses soft floats. What's the difference?

推荐答案

硬彩车使用片上浮点单元。软花车效仿之一的软件。所不同的是速度。很奇怪地看到无论是在相同的目标架构使用,因为该芯片要么有一个FPU或没有。你能使用-msoft浮在GCC软浮点。您可能需要重新编译的libc,如果你用它来使用硬件浮点。

Hard floats use an on-chip floating point unit. Soft floats emulate one in software. The difference is speed. It's strange to see both used on the same target architecture, since the chip either has an FPU or doesn't. You can enable soft floating point in GCC with -msoft-float. You may want to recompile your libc to use hardware floating point if you use it.

这篇关于什么是软,硬浮点数之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆