This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i386 - GAS problem (fwd)


> Date: Fri, 20 Mar 1998 15:38:16 -0500
> From: "erik.ivanenko" <erik.ivanenko@utoronto.ca>
> To: Joel Sherrill <joel@OARcorp.com>
> Subject: Re: i386 - GAS  problem
> 
> Joel Sherrill wrote:
> 
> > Could you put together a small compilable file with this in it?  binutils
> > 2.9 is getting closer and we don't want problems like this in there.
> 
> The following file shows that the ds register is ignored by the lidt and
> lgdt instructions.This is also a problem with the GAS I have ( shipped with
> gcc-2.7.2.1 , Linux Universe version ).
> I suspect this has been there for a while. 
> 
>  .section .text
>  .code16
>    movw $0x1000, %ax
>  movw    %ax, %ds
> 
>  lidt    %ds:0x1000
>  lidt    0x1000
> 
>  lgdt    %ds:0x1000
>  lgdt    0x1000
> 
>  .code32
> 
>  lidt    %ds:0x1000
>  lidt    0x1000
> 
>  lgdt    %ds:0x1000
>  lgdt    0x1000
> 

They look ok to me. Please tell me if you run into any real problems
with your programs.

Correct me if I am wrong. I believe %ds is the default segment
register for lidt/lgdt. gas just optimizes it out.


H.J.