Ast*_*lus 1 floating-point assembly mips cpu-registers
我在两个 $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
Run Code Online (Sandbox Code Playgroud)
但这给出了非常意外的结果,即 -2.231744757682269E231
任何帮助将不胜感激。
| 归档时间: |
|
| 查看次数: |
1756 次 |
| 最近记录: |