[Openmcl-devel] Solaris x86-64 and %gs

Chris Curtis enderx12 at mac.com
Mon Jan 7 13:14:11 PST 2008


On Jan 7, 2008, at 3:21 PM, Chris Curtis wrote:

> There is a way to allocate segment descriptors: sysi86(SI86DSCR, ...)
> but it's not very well documented and so I haven't yet been able to
> get it to do anything other than throw EINVAL. Thus, I've been unable
> to determine whether a properly-allocated segment descriptor can be
> stored into %gs -- mine still segfaults. As I mentioned, this is what
> SBCL does under the covers (SI86DSCR, not segfaults) but then puts it
> in the %fs register.

In case anyone was racing down this path, I can short-circuit it...  
SI86DSCR is hard-coded to throw EINVAL under LP64, presumably because  
it really *isn't* using the segment model. (If I compile with -m32, it  
works fine -- and setting %gs works -- but that sort of defeats the  
purpose of the exercise.)

--chris



More information about the Openmcl-devel mailing list