954,198 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

MIPS - convert integer to floating point??

does anyone know how to convert an integer (3) to floating point single (3.0) ?

it tried this but got an error bc of the $t3
cvt.w.s $f4, $f4, $t3

i have a value stored in $t3 register and need to move it from there to a fp register like $f6. whqat can i do?

ajrabbit
Newbie Poster
2 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

try this

float to int
=======
cvt.w.s $f4, $f4
mfc1 $t0,$f4


int to float
=======
mtc1 $t0, $f0
cvt.s.w $f0, $f0


kaliko

does anyone know how to convert an integer (3) to floating point single (3.0) ?

it tried this but got an error bc of the $t3 cvt.w.s $f4, $f4, $t3

i have a value stored in $t3 register and need to move it from there to a fp register like $f6. whqat can i do?

kaliko
Newbie Poster
1 post since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You