cvt.s.w
Convert integer word to single-precision
Treats the 32-bit integer stored in the second register as a signed integer and converts it to a single-precision float stored in the first.
Used in
- Floating point and Coprocessor 1MIPS assembly
Forms
cvt.s.w ,
Operands
$f0- Any floating-point register,
$f0to$f31. $f1- A floating-point register. It may be the same register as
$f0.
.text
# Convert integer 7 to single precision. Inspect $f0: raw bits 0x40E00000 (7.0).
li $t0, 7
mtc1 $t0, $f2
cvt.s.w $f0, $f2