lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> Check -fno-crossjumping in the GCC manual. But I think there are
>> quite a few rants from Anton Ertl about how every new GCC release
>> messed up the code of his carefully crafted interpreters ...
>
> I guess Anton is right. -fno-crossjumping did not help. Everything
> in the tail code is kept separated for each case, except for the
> final "jmp *%eax" (this is the same result as with -O0). The sequence
>
>         ...
>         movl    %edi, %eax
>         andl    $63, %eax
>         movl    disptab.6158(,%eax,4), %eax
>         jmp     .L462
>
> is repeated 40 times in the code, but all end in the same L462, that do
> the final jump:
>
> .L462:
>         jmp     *%eax
>
> (This is gcc version 4.4.3.)

If this is a real performance killer, it may be worth posting on the gcc
mailing list, or even filing a gcc bug.  They may know ways to avoid the
problem, or good ideas about mechanisms to do so in the future.

-Miles

-- 
Freebooter, n. A conqueror in a small way of business, whose annexations lack
of the sanctifying merit of magnitude.