sub.s
Floating-point subtract (single precision)
Subtracts the third register from the second using IEEE 754 single-precision (32-bit) arithmetic and stores the difference in the first.
Used in
- Floating point and Coprocessor 1MIPS assembly
Forms
sub.s , ,
Operands
$f0- Any floating-point register,
$f0to$f31. $f1- A floating-point register. It may be the same register as
$f0. $f3- A floating-point register. It may be the same register as
$f0.
.data
a: .float 1.5
b: .float 2.25
.text
# sub single values 1.5 and 2.25. Inspect $f0: -0.75 (raw bits 0xBF400000).
l.s $f2, a
l.s $f4, b
sub.s $f0, $f2, $f4