Hello Timon,
On 02/14/2013 10:52 AM, Timon ter Braak wrote:
I am attempting to support the Go language on the TI C6X. Therefore,
support is required for user context control.
I implemented those (see patch below), and it works for small test
programs. However, that does not mean that it is entirely correct.
I have some points that are not entirely clear to me:
* the registers (A0-A15,B0-B16) are saved and restored. I probably could
leave out some of them?
* mcontext_t specifies a 'PC' register, but its offset is too large to
use it conveniently, so it is saved elsewhere (in ucontext_regspace). Is
that a problem?
* register B16 seems to hold the program counter, but that is fairly
undocumented.
* C6000 EABI specifies 10 registers to hold function arguments, but
Linux assumes (and exposes) only 6 of them. The implementation below
also only uses 6 registers for this. Am I getting into trouble when
makecontext targets a function with more than 6 arguments?
* I use the callee-preserved register A14 to hold the pointer to the
next context (uc_link). Any issues here?
Until I run into trouble, I use this implementation myself, but I hope
it might end up being supported by uClibc.c
From an integration perspective, you might want to rebase this patch on
top of the uClibc master, and more specifically commit
a8dc90eaaa5e6474beac828558d969b1aafee4af.
--
Florian
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc