This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: x86 gas: allow 'rep' prefix on 'bsf' and 'bsr' instructions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]