Subject: Re: lib/26900: pthread should save/restore %fs resgister on i386
To: None <port-i386@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-i386
Date: 09/28/2004 15:25:28
On Tue, Sep 28, 2004 at 12:03:10 +0200, Martin Husemann wrote:
> On Tue, Sep 28, 2004 at 07:00:59PM +0900, TAMURA Kent wrote:
> > IMO, the issue seems not significant if no other applications
> > use %fs register.
>
> What does the ABI say about %fs?
%cs, %ds, %es, %ss
The segment registers are initialized so that the user process can
address the code, data, and stack segments using a 32-bit virtual
address. A program that alters their values does not conform to
the ABI and has undefined behavior.
It doesn't mention %fs and %gs, I'd assume they are to be treated no
differently from %ds and %es.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen