| | |
MIPS - problem with ceil.w.s instruction
![]() |
•
•
Join Date: Apr 2008
Posts: 1
Reputation:
Solved Threads: 0
I am having trouble using the ceiling instruction.
I am new to assembly and have never used the
ceiling instruction before.
My values before the instruction are
$f10 = 1.1000005
$f12 = 1.0000000
the instruction I use is
the value that ends up in $f12 is 2.80260e-045
which obviously returns 0.0000000 when I use
the li $v0, 2 syscall ..
what am I doing wrong?
I am new to assembly and have never used the
ceiling instruction before.
My values before the instruction are
$f10 = 1.1000005
$f12 = 1.0000000
the instruction I use is
Assembly Syntax (Toggle Plain Text)
ceil.w.s $f12,$f10
which obviously returns 0.0000000 when I use
the li $v0, 2 syscall ..
what am I doing wrong?
•
•
Join Date: Apr 2008
Posts: 1
Reputation:
Solved Threads: 0
ceil.w.s is ceiling and converting to a word fixed point number. You can use:
after the ceil to convert it back to a single.
The same will go with floor.w.s, etc.
/David
Assembly Syntax (Toggle Plain Text)
cvt.s.w, $f12, $f12
The same will go with floor.w.s, etc.
/David
Last edited by fierp; Apr 27th, 2008 at 6:30 pm.
![]() |
Other Threads in the Assembly Forum
- Previous Thread: Help Assembly matrix multiplication
- Next Thread: Tutorial on Assembly Language
| Thread Tools | Search this Thread |





