This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Glitches in gas/objdump handling of i386 STR, SLDT, SMSW instructions
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} },
{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },