This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S390: Remove not needed stack frame in syscall function.


On 10/22/19 1:44 PM, Florian Weimer wrote:
* 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


Committed.
Thanks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]