This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] x86: use 'rep bsf' syntax when assembler supports it
On Tue, Jul 3, 2012 at 12:48 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jul 3, 2012 at 12:37 PM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>
>>>>> Based on the observation above, the patch is OK for mainline, but
>>>>> please also handle "rep nop" case.
>>>>
>>>> Here's the new version of the patch that does that. Note that someone
>>>> needs to commit this for me, since I am not empowered to do it myself.
>>>>
>>>> gcc/
>>>> 2012-07-02 Roland McGrath <mcgrathr@google.com>
>>>>
>>>> * configure.ac (HAVE_AS_IX86_REP_LOCK_PREFIX): Also require that the
>>>> assembler accept 'rep bsf ...', 'rep bsr ...', 'rep ret', and 'rep nop'.
>>>> * configure: Regenerated.
>>>> * config/i386/i386.md (simple_return_internal_long): Use %;
>>>> (ctz<mode>2): Likewise.
>>>> (*pause): Likewise.
>>>
>>> The patch is OK.
>>>
>>> I have committed it to the mainline SVN.
>>
>> Given that the latest binutils release (2.22) does not support 'rep
>> ret', does that
>> not pessimize people with just "partial" 'rep *' support?
>
> No, gcc just emits "rep; ret". Using older binutils, this is just
> cosmetic change in the asm dumps. IIUC, Roland worries that *future*
> binutils could insert something after the "rep" in "rep;INSN" combo.
Ah, thanks for the clarification. I've run into this because if you just
re-build in an already configured tree the cache variable is used and
the test is not re-done and you get unsupported rep ret ...
Richard.
> Uros.