From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: joel@OARcorp.com (Joel Sherrill) Cc: erik.ivanenko@utoronto.ca, gas2@cygnus.com Subject: Re: i386 - GAS problem (fwd) Date: Fri, 20 Mar 1998 15:02:00 -0000 Message-id: References: X-SW-Source: 1998/msg00064.html > Date: Fri, 20 Mar 1998 15:38:16 -0500 > From: "erik.ivanenko" > To: Joel Sherrill > 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.