Truncate single-precision to word : Converts the single-precision float in $f1 to a 32-bit integer by rounding toward zero (drops the fractional part), and stores the result in $f0. Equivalent to C-style (int) cast.
trunc.w.s
Operands
$freg, $fregVariants
- Truncate single-precision to word : Converts the single-precision float in $f1 to a 32-bit integer by rounding toward zero (drops the fractional part), and stores the result in $f0. Equivalent to C-style (int) cast. trunc.w.s $f0,$f1
.data
a: .float -1.5
.text
# Apply trunc.w.s to an initialized value; inspect $f0: raw bits 0xFFFFFFFF.
l.s $f1, a
trunc.w.s $f0, $f1