A strange bit of code in MacroAssembler::multiply_128_x_128_loop
Andrew Haley
aph at redhat.com
Fri Apr 10 16:47:02 UTC 2015
On 04/10/2015 05:30 PM, Vladimir Kozlov wrote:
> It restores counter after:
>
> subl(idx, 2);
> jcc(Assembler::negative, L_check_1);
>
> The value could be 1,2,3 before this point (idx & 3 before).
> After 'sub 2': -1, 0, 1.
>
> So we have to restore to positive values before subtracting 1.
But after
> andl (idx, 0x1);
the only possible values are 0 and 1, and this is true regardless of the
'sub 2'.
>>> addl (idx, 0x2);
>>> andl (idx, 0x1);
>>> subl(idx, 1);
>>> jcc(Assembler::negative, L_post_third_loop_done);
Andrew.
More information about the hotspot-runtime-dev
mailing list