Hey people
How would I go about loading a value into a float point register so i can create a C2 code?
I have this:
stfs f0,512(r3)
I would like to load the value of 0 in to f0 and not use the value 512 places on from r3
ta
yeah sorry, i realise that
I want to change the value held in f0 to 0 before calling: stfs f0,512(r3)
Thanks
Since posting I just changed:
stfs f0,512(r3)
to
stfs f31,512(r3)
as f31 is unused and always 0 so bit of a cheat but works for time being
You can also load 0 into f0 by the following;
fsubs f0,f0,f0
When loading a value other than 0, a macro could be useful;
.macro lfsi freg,symbol
lis r12,\sumbol@h
ori r12,r12,\symbol@l
stw r12,-4(r1)
lfs \freg,-4(r1)
.endm
Excellent, thanks