unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] S390: Remove not needed stack frame in syscall function.
Date: Tue, 22 Oct 2019 13:44:41 +0200	[thread overview]
Message-ID: <87blu9knrq.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <0ca333b6-3faf-df73-bb24-d03aa155dfb9@linux.ibm.com> (Stefan Liebler's message of "Tue, 22 Oct 2019 13:37:50 +0200")

* 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


  reply	other threads:[~2019-10-22 11:44 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 [this message]
2019-10-23 12:53       ` Stefan Liebler

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=87blu9knrq.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=stli@linux.ibm.com \
    /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).