How to convert double value to integer value in MIPS? -
if have in mips : li.d $f0,4.5
my question : how convert double value integer value in mips... how can cast value in register $f0 4 ???
here's sequence works. can use $f0
instead of $f2
if want:
.text .globl main main: li.d $f0,4.5 cvt.w.d $f2,$f0 # f2 have 4 # print integer mfc1 $a0,$f2 li $v0,1 syscall # exit program li $v0,10 syscall
Comments
Post a Comment