x86 operand size overriding prefixes vs suffixes vs ambiguity warnings

Jan Beulich jbeulich@suse.com
Mon Jun 8 12:28:44 GMT 2020


H.J.,

the documentation of gas isn't really helpful in regards to what
to expect when using explicit prefixes. For example I consider

	rex64 movl %eax, %eax
	data16 movl %eax, %eax

sufficiently bogus that I would see at least a warning warranted.
Otoh Andrew validly points out that for e.g. lret the possible

	rex64 lret
	data16 lret

are sufficiently meaningful to perhaps even suppress the
ambiguity warning the suffix-less lret-s currently cause in
64-bit mode. The question really is whether we could settle on
an abstract model from which the behavior becomes predictable
for a programmer. Of course a fundamental requirement I would
have to any such model is that it be consistent for all current
and future insns and that it preferably have as little quirks or
special cases as possible.

If you (or anyone else on the list) have any thoughts or
opinions here, I'd appreciate if you could share them.

Thanks, Jan


More information about the Binutils mailing list