【发布时间】:2015-03-27 14:17:44
【问题描述】:
我已经在两个 $t 寄存器中加载了一个浮点双精度数,现在我想将它除以 (-4)(不使用 fp 指令)并将其存储回 $f 寄存器。
mfc1 $t0, $f0 #$f0 = 0x00000000
mfc1 $t1, $f1 #$f1 = 0x40240000
div $t1, $t1, -4
mfhi $t0 #move the remainder to $t0
mflo $t1 #move the quotient to $t1
mtc1 $t0, $f0
mtc1 $t1, $f1
# store the $f0 result in memory
# print X/(-4)
mov.d $f12, $f0
li $v0, 3
syscall
但这会产生非常意外的结果,即 -2.231744757682269E231
我们将不胜感激。
【问题讨论】:
标签: assembly floating-point mips cpu-registers