This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/2] x86/Intel: make sure MOVSD/CMPSD have their Size32 honored
On 07.11.2019 22:52, H.J. Lu wrote:
> Another problem is Intel syntax sets instruction suffix from operand size:
An unrelated one, but yes.
> [hjl@gnu-cfl-1 gas]$ cat 2.s
> .intel_syntax noprefix
> call WORD PTR [rax]
> [hjl@gnu-cfl-1 gas]$ as -mintel64 -o 2.o 2.s
> 2.s: Assembler messages:
> 2.s:2: Error: invalid instruction suffix for `call'
> [hjl@gnu-cfl-1 gas]$
>
> It is operand size mismatch, not invalid instruction suffix. In case
> of CMPSD and
> and MOVSD,the 'l' suffix is invalid, not DWORD on memory operand. But suffix
> check treats them the same. This makes Intel syntax more complicated. Should
> Intel syntax disallow suffix in mnemonic? It will make Intel syntax
> closer to SDM.
There are some suffixes that need honoring. The original authors
of the code apparently decided that it's better to accept some
stray/bogus suffixes than to further complicate the code. I guess
once we have the No_*Suf attributes put straight (as mentioned by
Michael the other day, matching plans I've been having), then we
could see about further cleaning up Intel syntax behavior here.
Jan