unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] S390: Remove not needed stack frame in syscall function.
Date: Wed, 23 Oct 2019 14:53:56 +0200	[thread overview]
Message-ID: <1b403d65-ecaf-6c55-3e3e-ee819ea143c2@linux.ibm.com> (raw)
In-Reply-To: <87blu9knrq.fsf@oldenburg2.str.redhat.com>

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


      reply	other threads:[~2019-10-23 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  8:00 [PATCH] S390: Remove not needed stack frame in syscall function Stefan Liebler
2019-10-22 10:25 ` Florian Weimer
2019-10-22 11:37   ` Stefan Liebler
2019-10-22 11:44     ` Florian Weimer
2019-10-23 12:53       ` Stefan Liebler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b403d65-ecaf-6c55-3e3e-ee819ea143c2@linux.ibm.com \
    --to=stli@linux.ibm.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).