On Sat, Jun 23, 2012 at 12:00 AM, Roland McGrath <mcgra...@google.com> wrote: > Here is an alternative patch that just changes the configure test > controlling %; so it will elide the ; only for an assembler that > also accepts 'rep bsf', 'rep bsr', and 'rep ret', and just uses > %; for these cases too. You'll need to have built binutils from its trunk > within the last five minutes or so to have an assembler that passes the > test now.
We found another one ... "rep nop" that implements "pause". It looks that this is really the last rep prefixed insn. With existing binutils, the use of ";" was mostly cosmetic, assembler checked that rep was indeed followed by a string instruction. Other than that, older binutils didn't care about the placement of ";". > gcc/ > 2012-06-22 Roland McGrath <mcgra...@google.com> > > * configure.ac (HAVE_AS_IX86_REP_LOCK_PREFIX): Also require that the > assembler accept 'rep bsf ...', 'rep bsr ...', and 'rep ret'. > * configure: Regenerated. > * config/i386/i386.md (simple_return_internal_long): Use %; > (ctz<mode>2): Likewise. Based on the observation above, the patch is OK for mainline, but please also handle "rep nop" case. Thanks, Uros.