e500 port: getcontext / setcontext / swapcontext
Steven Munroe
munroesj@linux.vnet.ibm.com
Wed Sep 18 18:25:00 GMT 2013
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.
More information about the Libc-alpha
mailing list