RFR: 8292628: x86: Improve handling of constants in trigonometric stubs [v2]
Aleksey Shipilev
shade at openjdk.org
Fri Aug 19 12:41:34 UTC 2022
On Thu, 18 Aug 2022 21:07:43 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Improve how constants are handled in trigonometric stubs on x86.
>> In particular, extract shared constants into a separate file and
>> encapsulate them in MacroAssembler.
>>
>> Also, some minor cleanups included.
>>
>> Testing:
>> - [x] hs-tier1 - hs-tier4
>> - [x] x86_32 build
>
> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>
> StubRoutines cleanup
Looks okay with some nits.
src/hotspot/cpu/x86/macroAssembler_x86_constants.cpp line 251:
> 249:
> 250: ATTRIBUTE_ALIGNED(16) juint _PI4X3[] = {
> 251: 0x54443000UL, 0xbfe921fbUL, 0x3b39a000UL, 0x3d373dcbUL, 0xe0e68948UL, 0xba845c06UL
While at it, maybe we should stick to one style for these tables. The large table above has five columns, so maybe wrap this and following table like that too?
src/hotspot/cpu/x86/macroAssembler_x86_exp.cpp line 206:
> 204: movdqu(xmm6, ExternalAddress(SHIFTER)); // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
> 205: movdqu(xmm2, ExternalAddress(16 + cv)); // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
> 206: movdqu(xmm3, ExternalAddress(32 + cv)); // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
If you are flipping `+` operands near the changes, maybe flip these too?
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9923
More information about the hotspot-dev
mailing list