943,946 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 11674
  • Assembly RSS
Mar 8th, 2007
0

MIPS - convert integer to floating point??

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ajrabbit is offline Offline
2 posts
since Mar 2007
Apr 9th, 2007
0

Re: MIPS - convert integer to floating point??

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


Click to Expand / Collapse  Quote originally posted by ajrabbit ...
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kaliko is offline Offline
1 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: design of a pipelined processor using the MIPS64 instruction set.
Next Thread in Assembly Forum Timeline: exe compress





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC