【发布时间】:2015-06-12 17:55:12
【问题描述】:
我正在尝试将双精度浮点数舍入到 MIPS 中最接近的 int。
这是我的代码。
li $v0, 7
syscall
round.w.d $f2, $f0
输入 10.5 后,四舍五入为 10.500000000000018。这个 round.w.d 函数应该将 f0 寄存器四舍五入到最接近的 32 位 int (.word),然后将结果存储在 f2 中。我究竟做错了什么?我找不到任何表明程序不正确的信息。 提前感谢您的帮助。
【问题讨论】:
标签: assembly mips mars-simulator