There are no vectors there.
There are lots of single precision floats (lfs, stfs, fmuls), and
lots of results being rounded to single precision (frsp).
Several of the frsp instructions look pointless since you just loaded
the value as single precision.
You're right several are pointless, but at least the ones like this
may not be (although they seem so at first sight):
frsp f1,f2
stfs f2,20(r28)
The reason is that some PPC's have a bug, whereby they throw an
exception if you try to store an fpu value as a single without first
explicitly rounding it to a single. I have to admit I'm not sure
whether it can also pop up if the value in question has only been
"touched" by single precision fpu ops though.
I recall something like this from way back... The question was whether
'stfs' can obviate the need for 'frsp' entirely. The Programming
Environments Manual seems to indicate so, stating:
"The contents of register frS are converted to single-precision and
stored into the word in memory."
However, there's a gotcha, buried in the appendices:
"Notice that if the value to be stored by a single-precision store
floating-point instruction is larger in magnitude than [MAX_FLOAT],
the result stored in WORD is then a well-defined value, but is not
numerically equal to the value in the source register."
In other words, 'stfs' doesn't correctly handle values greater than
MAX_FLOAT, so the 'frsp' is required to ensure that 'stfs' will always
do the right thing. (Pity; I can't imagine it would have taken much
silicon to avoid this.) Maybe the gcc compiler has a flag to bypass the
'frsp' anyway? I never heard of the exception throwing bug, but
perhaps this is why CodeWarrior always generates a 'frsp' after 'fabs',
even when the input is single-precision. E.g.
static float foo(float x) { return __fabs(x); }
generates:
fabs fp1,fp1
frsp fp1,fp1
blr
Very silly. Would be nice if the newer processors can detect this
pattern and optimize the 'frsp' away. (Or is there a case I'm unaware
of where 'fabs' on a single-precision value can produce a
double-precision result?)