linux-mips
[Top] [All Lists]

Re: thread-ready ABIs

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: thread-ready ABIs
From: Ulrich Drepper <drepper@redhat.com>
Date: 18 Jan 2002 13:44:44 -0800
Cc: "H . J . Lu" <hjl@lucon.org>, linux-mips@oss.sgi.com
In-reply-to: <Pine.GSO.3.96.1020118220734.22923S-100000@delta.ds2.pg.gda.pl>
References: <Pine.GSO.3.96.1020118220734.22923S-100000@delta.ds2.pg.gda.pl>
Reply-to: drepper@redhat.com (Ulrich Drepper)
Sender: owner-linux-mips@oss.sgi.com
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (asparagus)
"Maciej W. Rozycki" <macro@ds2.pg.gda.pl> writes:

> Where did you get extraneous registers for the i386
> from (especially given the usual register shortage there)?

%gs

> Maybe we could use the same approach for MIPS.

I doubt it.

> Where to look for the code in glibc in a current snapshot?

%gs is used for a long time linuxthreads/sysdeps/386/useldt.h

>  One possible approach is to reserve GOT entries for thread registers. 
> While not as fast as CPU's registers, if frequently accessed they would
> stick in the cache.  Since the ABI mandates the code to keep a pointer to
> the GOT in the gp register, accesses to got entries need only a single
> instruction.  I haven't thought on it much -- someone might have a better
> idea. 

How would you have different values for different threads?  It would
mean having multiple GOTs which is a resource waste and a nightmare in
resource management.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

<Prev in Thread] Current Thread [Next in Thread>