ARM中的浮点运算

General

嵌入式系统中三种可能的浮点数处理方式(转载自StackOverflow)

1. Use float instructions if your CPU has a FPU. (fast) 直接使用浮点指令,前提是CPU有一个浮点运算单元。速度最快。
2. Have your compiler translate floating point arithmetic to integer arithmetic. (slow) 编译器把浮点数转换成整数。速度次快。
3. Use float instructions and a CPU with no FPU. Your CPU will generate a exception (Reserved Instruction, Unimplemented Instruction or similar), and if your OS kernel includes a floating point emulator it will emulate those instructions (slowest). 使用浮点指令,CPU没有FPU,此时CPU会产生一个异常(保留指令,未实现的指令等),若操作系统内核包含一个浮点模拟算法,它会在异常处理里面模拟浮点运算。速度最慢。

ARM

ARM Floating Point architecture (VFP) provides hardware support for floating point operations in half-, single- and double-precision floating point arithmetic. It is fully IEEE 754 compliant with full software library support.

The floating point capabilities of the A

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值