public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Ryan S. Arnold" <ryan.arnold@gmail.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: libc-alpha <libc-alpha@sourceware.org>,
	libc-ports <libc-ports@sourceware.org>
Subject: Re: e500 port: getcontext / setcontext / swapcontext
Date: Thu, 19 Sep 2013 15:52:00 -0000	[thread overview]
Message-ID: <CAAKybw-FZCaHtSr086ES0oujFiZOgafcgoOO96yqsp66261diw@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1309181728150.1868@digraph.polyomino.org.uk>

On Wed, Sep 18, 2013 at 12:29 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch adds e500 support to powerpc getcontext / setcontext /
> swapcontext.  Like setjmp/longjmp, it's compile-time conditional
> rather than using HWCAPs.  Unlike setjmp/longjmp, this is following an
> external ABI: the context layout used by the Linux kernel.  Nothing is
> done about the ACC register; as it's call-clobbered and not used for
> argument passing, only the signal context case needs to handle it and
> that does it via a syscall.  (But as is generally usual for context
> code in glibc, this code doesn't otherwise try to limit GPR saving /
> restoring to avoid call-clobbered registers for which it isn't
> actually needed.)
>
> To avoid duplication of the code sequences between getcontext /
> setcontext and swapcontext, they are put in assembler macros defined
> in a single place, and those macros are then used as needed under the
> __CONTEXT_ENABLE_E500 conditional.
>
> Tested with a build for e500.
>
> 2013-09-18  Joseph Myers  <joseph@codesourcery.com>
>
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
>         (__CONTEXT_FUNC_NAME) [__CONTEXT_ENABLE_E500]: Use
>         getcontext_e500.
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
>         (__CONTEXT_FUNC_NAME) [__CONTEXT_ENABLE_E500]: Use
>         setcontext_e500.
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
>         (__CONTEXT_FUNC_NAME) [__CONTEXT_ENABLE_E500]: Use getcontext_e500
>         and setcontext_e500.
>
> ports/ChangeLog.powerpc:
> 2013-09-18  Joseph Myers  <joseph@codesourcery.com>
>
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h:
>         New file.
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S:
>         Include <context-e500.h>.
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S:
>         Likewise.
>         * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S:
>         Likewise.

Structurally I'm fine with this patch.  It's as non-invasive as can be expected.

Ryan

  parent reply	other threads:[~2013-09-19 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 17:29 Joseph S. Myers
2013-09-18 18:25 ` Steven Munroe
2013-09-18 19:33   ` Joseph S. Myers
2013-09-19 15:52 ` Ryan S. Arnold [this message]
2013-09-26 15:39   ` Joseph S. Myers

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

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

  git send-email \
    --in-reply-to=CAAKybw-FZCaHtSr086ES0oujFiZOgafcgoOO96yqsp66261diw@mail.gmail.com \
    --to=ryan.arnold@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@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).