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: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <munroesj at us dot ibm 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 19:32:57 +0000
- 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> <1379528954 dot 4899 dot 19 dot camel at spokane1 dot rchland dot ibm dot com>
On Wed, 18 Sep 2013, Steven Munroe wrote:
> 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.
The design is detailed at
<https://sourceware.org/ml/libc-alpha/2013-09/msg00485.html>. The
function-calling ABI is identical to soft-float (the only case in which
register high parts are used in argument passing / return is for
e500-specific vector types). With this port version, the other aspects of
the glibc ABI also match soft-float, so soft-float binaries can run with
glibc built for e500; this avoids an unnecessary proliferation of ABI
variants (requiring their own ABI test baselines etc.). The present
getcontext / setcontext / swapcontext patch follows the same approach as
the support in those functions for other optional features, with a macro
__CONTEXT_ENABLE_E500 conditioning the e500-specific code, and in fact the
substance of the e500 implementation is in a separate file context-e500.h
in this case because that was the natural way to avoid code duplication in
the swapcontext sources.
--
Joseph S. Myers
joseph@codesourcery.com