[x264-devel] x86inc: activate REP_RET automatically

Loren Merritt lorenm at u.washington.edu
Sun Feb 24 11:15:28 CET 2013


On Wed, 20 Feb 2013, Zuxy Meng wrote:
> 2013/1/9 Loren Merritt <git at videolan.org>
>
>> x86inc: activate REP_RET automatically
>> Now RET checks whether it immediately follows a branch, so the programmer
>> dosen't have to keep track of that condition.
>> REP_RET is still needed manually when it's a branch target, but that's
>> much rarer.
>> The implementation involves lots of spurious labels, but that's ok because
>> we strip them.
>
> Do we still need this hack? Phenom prefers "ret $0" over "rep ret" and
> Bulldozer and all Intel CPUs seem to require neither.

I have no objection to changing it to "ret 0" if there is in fact a
difference, and not just a random change to the AMD manual. AMD's
description of when and why the problem occurs seems to imply that both
forms of long ret should work equally well.

--Loren Merritt


More information about the x264-devel mailing list