Re: ltr() from locore.h seems a bit wierd with gcc

From: John Meacham <john_at_nospam.org>
Date: Sun Apr 23 2000 - 09:58:25 PDT

shouldnt it be ltr %%ax? the task register is loaded with a pointer into the GDT
which containes a special entry for the current task state segment... gdt
entries are indexed by 16 bit values not 32... at least that is what i use in my
code.. (not VSTa) which seems to compile fine under newest egcs(gcc). this has
always been one of my pet peeves with documentation for intel CPUs, it never
really says how to get tasking mode set up... they describe in detail how to
switch between tasks and what a task state segment should contain but not how
one should use ltr and stick in these things initially, it took a bit of
experementation for me until i figured out the right way to do it.. ah well..
(this was before i had all sorts of linux and VSTa and whatnot code to look
at..)
        John

On Sun, Apr 23, 2000 at 05:51:27PM +0800, Dines, Eric wrote:
> "ltr %%eax\n\t"
> I had a look at the assembly code when compiled -S, and it has
>
> ltr %eax
> jmp 1f
> error message says "unknown i386 operands"
>
> Any suggestions anyone?

-- 
--------------------------------------------------------------
John Meacham   http://synergy.foo.net/~john/   john_at_foo.net
California Institute of Technology, Student.
--------------------------------------------------------------
Received on Sun Apr 23 16:58:28 2000

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:56 PDT