是的,这是可能的,但你必须把它放在浮点寄存器 $f0 ... $f31 中:
li $t0 , 59 // values assignment to temporary registers
li $t1 , 3
mtc1 $t0,$f0 //move from int register to float-point register
cvt.s.w $f0,$f0 //Convert int values to float-point values
mtc1 $t1,$f1
cvt.s.w $f1,$f1 //Convert int values to float-point values
li $t2 , 1
li $t3 , 1
mtc1 $t2, $f2
cvt.s.w $f2,$f2
mtc1 $t3, $f3
cvt.s.w $f3,$f3
li $t6 , 1
mtc1 $t6, $f6
cvt.s.w $f6,$f6
//Start of the while loop
li $t5, 0
mtc1 $t5, $f5
cvt.s.w $f5,$f5
while : c.gt.s $f1, $f5
bc1f endwhile
//checks the intital condition and if it's false jump to endwhile
div.s $f4,$f2,$f0 // $f4 = $f2/$f0
mult.s $f3, $f3 ,$f4 // $f3 = $f3 * $f4
sub.s $f0, $f0, $f6
sub.s $f1, $f1, $f6
b while //jump to label while
endwhile: // your code
如果您有任何问题,也许您可以查看这个网页,认为这是一个很好的参考: http: //logos.cs.uic.edu/366/notes/mips%20quick%20tutorial.htm
http://www.cim。 mcgill.ca/~langer/273/12-coprocessors.pdf