Glitches in gas/objdump handling of i386 STR, SLDT, SMSW instructions
H . J . Lu
hjl@lucon.org
Thu Nov 1 12:45:00 GMT 2001
On Mon, Nov 12, 2001 at 12:26:43PM +1030, Alan Modra wrote:
> On Sun, Nov 11, 2001 at 05:33:38PM -0800, Zack Weinberg wrote:
> >
> > For maximal correctness, I should make the str entry in opcode/i386.h
> > reject strl <memory>, and generate the same byte sequence for
> > str <mem> and strw <mem>. With the current iteration of my patch this
> >
> > str (%ebx)
> > strw (%ebx)
> > strl (%ebx)
> >
> > assembles to
> >
> > 0: 0f 00 0b strl (%ebx)
> > 3: 66 0f 00 0b strw (%ebx)
> > 7: 0f 00 0b strl (%ebx)
> >
> > which is not _wrong_, but the disassembly is misleading and strw is
> > longer than it needs to be.
> >
> > Is it possible to do that?
>
> This ought to work. Untested...
>
> {"str", 1, 0x0f00, 1, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
^^^^^^^
That means 64bit registers allowed. Shouldn't that be Reg16|Reg32?
> {"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
>
H.J.
More information about the Binutils
mailing list