This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: Glitches in gas/objdump handling of i386 STR, SLDT, SMSW instructions


On Mon, 12 Nov 2001, Alan Modra wrote:

> > The current Intel ia32 manual shows str and sldt are different. Don't
> > ask me why :-). sldt takes 16bit/32bit reg/mem.
> 
> Heh.  Don't trust Intel manuals.

 The instructions are actually defined to always execute with a 16-bit
target operand.  This is enforced for memory writes, but for register
writes the 16 MSBs are defined as "reserved", i.e. specific to an
implementation (e.g. for all systems I've been able to check, smswl stores
all 32 bits of the cr0 register).

 In any case it should be permitted for a programmer to ask for any
semantics he wants to use as the data size prefix is legal for these
instructions. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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