This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH]: x86 gas: allow 'rep' prefix on 'bsf' and 'bsr' instructions
- From: Roland McGrath <mcgrathr at google dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 21 Jun 2012 15:08:15 -0700
- Subject: Re: [PATCH]: x86 gas: allow 'rep' prefix on 'bsf' and 'bsr' instructions
- References: <firstname.lastname@example.org> <CAMe9rOrZ0rJs13QBAgY+Tx4T=kN+1twUpC7y62MwyPJ47m=8nA@mail.gmail.com>
On Thu, Jun 21, 2012 at 2:48 PM, H.J. Lu <email@example.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.