[PATCH] x86: Apply standalone prefixes to the following instruction

Jan Beulich JBeulich@suse.com
Mon Jul 22 07:54:00 GMT 2019


On 19.07.2019 19:37,  H.J. Lu  wrote:
> Gas tried to favor "REP INSN" over "REP; INSN":
> 
> https://sourceware.org/ml/binutils/2012-06/msg00180.html
> https://sourceware.org/ml/binutils/2012-06/msg00193.html
> 
> We can add RepPrefixOk if needed.

And this is the whole point: The form without line separator
should be accepted for templates with RepPrefixOk only. The
one with line separator should (by default) not complain.
I don't mind you adding an option to this effect, but it
ought to be off by default.

As to BSF/BSR having RepPrefixOk - this is exactly what I've
been mentioning before: Recognizing the desire to have it
can't possibly happen early enough. At the point the assembler
supports such insns with the extra attribute, it'll quite
obviously also accept the real mnemonics (TZCNT/LZCNT in this
case). WBNOINVD is a pretty good recent example, as mentioned
before (and I think I did point out that in Xen we already use
"rep; wbinvd" to generate that insn).

IMO BSF/BSR should never have had the attribute added to them.

Jan


More information about the Binutils mailing list