This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: e500 port: getcontext / setcontext / swapcontext
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, libc-ports at sourceware dot org, "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- Date: Wed, 18 Sep 2013 13:29:14 -0500
- Subject: Re: e500 port: getcontext / setcontext / swapcontext
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1309181728150 dot 1868 at digraph dot polyomino dot org dot uk>
- Reply-to: munroesj at us dot ibm dot com
On Wed, 2013-09-18 at 17:29 +0000, Joseph S. Myers 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.
>
Joseph I must really question the wisdom of merging the e500 into the
same source with the "classical" PPC32 code.
The unified GPR/FPR set of the e500 impacts the ABI in many different
ways from the classic PPC32 soft-float or hard-float that I fear this
will be a constant source of misunderstanding and error in the future.
I am much more comfortable keeping the e500 specific codes in different
source files and different parts of the tree.