* Stefan Liebler:
The syscall itself just clobbers the return value in r2. But for its
parameters we have to clobber r6 and r7.
According to the ABI, r0-r5 and r14 are volatile.
We need r1 for the syscall number for "svc 0", r2-r7 as parameters for
svc and r14 is the return-address.
Thus we could use r0 for saving/restoring r6.
For r7 we have the option to either use the register save area on the
stack-frame prepared by the caller or one of the volatile fprs. But
the instructions for transferring gpr <-> fpr are not available with
all architecture level sets. Thus we would need something like #ifdef
/ #else to provide alternative implementations.
Therefore I think just storing/restoring both registers at once with
one stmg/lmg instruction is okay.
I see. I didn't know the ABI details.
Thanks,
Florian