trunc.w.d

Truncate double-precision to word

Converts the double-precision value in $f2 to a 32-bit integer in $f1, rounding toward zero.

Forms

  • trunc.w.d ,

Operands

$f1
Any floating-point register, $f0 to $f31.
$f2
An even-numbered floating-point register, $f0 to $f30. A double-precision value uses this register and the next odd-numbered register.
.data
a: .double -1.5
.text
# Apply trunc.w.d to an initialized value; inspect $f8: raw bits 0xFFFFFFFF.
l.d $f2, a
trunc.w.d $f8, $f2