Reputation: 901
I have declared
.data
ZERO .float 0.0
Later in my code, I want to put the value of ZERO into $f4
What instruction do I use to do that?
Upvotes: 0
Views: 4715
Reputation: 1037
I'm new to MIPS, but this should work
lwc1 $f4, ZERO($0)
According to this sample :)
Or if you use pseudo-instructions (lecture that I found):
la $a0, ZERO #Load address
l.s $f5, 0($a0) #Load single from memory a0[0]
There's a special register ($zero), but I think it's only used for integer operations (I'm not sure)
Upvotes: 2