public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: PA-RISC: Reserving a "thread context" register.
@ 2003-10-05 17:10 Thierry Moreau
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Moreau @ 2003-10-05 17:10 UTC (permalink / raw)
  To: matt, gcc

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
proprietary compilers.

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
other scheme.

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.

Sincerely,

--

- Thierry Moreau

CONNOTECH Experts-conseils inc.
9130 Place de Montgolfier
Montreal, Qc
H2M 2A1

Tel.: (514)385-5691
Fax:  (514)385-5900

e-mail: thierry.moreau@connotech.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PA-RISC: Reserving a "thread context" register.
@ 2003-10-06 20:48 John David Anglin
  0 siblings, 0 replies; 3+ messages in thread
From: John David Anglin @ 2003-10-06 20:48 UTC (permalink / raw)
  To: gcc

> If we did so, what would be the best register to use?

CR27 is the register that hppa64-hpux uses.  It is planned to
use the same register on hppa-linux.  There have been some
discussions on the TLS implementation for hppa-linux but we
haven't come to any final conclusions yet.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* PA-RISC: Reserving a "thread context" register.
@ 2003-10-04  4:54 Matt Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Thomas @ 2003-10-04  4:54 UTC (permalink / raw)
  To: gcc

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?

-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-06 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-05 17:10 PA-RISC: Reserving a "thread context" register Thierry Moreau
  -- strict thread matches above, loose matches on Subject: below --
2003-10-06 20:48 John David Anglin
2003-10-04  4:54 Matt Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).