This is the mail archive of the
mailing list for the GCC project.
Re: PA-RISC: Reserving a "thread context" register.
- From: Thierry Moreau <Thierry dot Moreau at Connotech dot com>
- To: matt at 3am-software dot com, gcc at gcc dot gnu dot org
- Date: Sun, 05 Oct 2003 13:22:26 -0400
- Subject: Re: PA-RISC: Reserving a "thread context" register.
Matt Thomas <matt at 3am-software dot com> wrote:
> As NetBSD is finishing off work on a toolchain for hppa platform
> using the Linux ELF PA-RISC support as a base, someone suggested
> that it might be worth reserving a register for a thread context.
> If we did so, what would be the best register to use? Is there a
> better method to do what we want?
I implemented a dedicated register for thread context and trhead local
data as well, for the PowerPC architecture using the EABI specification
(linker sections .sdata2 and .sbss2), both in the ABCD Proto-Kernel(TM)
(soon to be released) with GCC cross-tools and its ancestor using
I don't know if there is a better method than a dedicated register, and
investigation of the newlib version 10.x source code (looking for
library function reentrancy sloutions) didn't convince me to use any
In implementation with the GNU GCC, I had to patch the compiler (which
applied the -G parameter inconditionnally to variables declared with the
__attribute__((section (".sdata2"))), seemingly with good reasons if
optimization alone is driving the small data section usage). In any
event, I much appreciate the free software compiler that allows me to
have fine control of such implementation details.
So, overall, using a dedicated register for thread context and trhead
local data worked well in these two embedded kernel implementations.
- Thierry Moreau
CONNOTECH Experts-conseils inc.
9130 Place de Montgolfier