[PATCH]: x86 gas: allow 'rep' prefix on 'bsf' and 'bsr' instructions
Roland McGrath
mcgrathr@google.com
Thu Jun 21 22:08:00 GMT 2012
On Thu, Jun 21, 2012 at 2:48 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> I thought the gcc patch was reverted since the assumption was wrong.
No, it's still there. What you may be thinking of is that it was
originally doing "rep; bsf" for all situations other than -mbmi or -Os.
The next day it was changed so it uses "rep; bsf" only for -mtune=generic,
after Jakub pointed out that "rep; bsf" was never desireable for some
particular tuning for a chip known not to support tzcnt. I haven't seen
anybody refute the claim that tzcnt is "usually faster than bsf", though
that claim was only made in passing on gcc-patches (by Uros, I think) and
I haven't seen any references to substantiate it.
If you can make the case that it's never disadvantageous to use bsf on a
machine that also supports tzcnt, and thus have this GCC change removed,
then I'll be happy to drop the assembler change.
Thanks,
Roland
More information about the Binutils
mailing list