[Top] [All Lists]

Re: mips RDHWR instruction in glibc

Subject: Re: mips RDHWR instruction in glibc
From: Atsushi Nemoto <>
Date: Fri, 16 Jun 2006 00:28:37 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
On Wed, 14 Jun 2006 12:50:40 -0400, Daniel Jacobowitz <> wrote:
> > For example, in the code below, RDHWR is placed _before_ checking the
> > error.  I suppose these instructions were reordered by gcc's
> > optimization, but the optimization would have large negative effect in
> > this case.
> You'd have to figure out how to get GCC not to eagerly schedule the
> rdhwr.  This might be quite hard.  I don't know much about this part of
> the scheduler.

I really did not understand yet how errno is bound TLS.  I found some
"rdhwr" in glibc-ports source code (tls-macros.h, nptl/tls.h).  The
RDHWR instruction in the example code comes from one of them, no?

I also found a "rdhwr" in gcc's file ("tls_get_tp_<mode>").
Is this the origin?  MD is a very foreign language for me...

Atsushi Nemoto

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