RFR: 8353686: Optimize Math.cbrt for x86 64 bit platforms [v4]

Mohamed Issa duke at openjdk.org
Thu May 29 18:56:12 UTC 2025


On Thu, 29 May 2025 09:01:05 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> Mohamed Issa has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Remove comment mentioning invalid exception when NaN input is provided
>>  - Use rcx as base and r8 as index for address calculations in certain cbrt stub generator instructions
>>  - Remove unnecessary unpckhpd and unpcklpd definitions in macro-assembler header file
>>  - Remove unnecessary movapd definitions in macro-assembler header file
>
> src/hotspot/cpu/x86/stubGenerator_x86_64_cbrt.cpp line 49:
> 
>> 47: /******************************************************************************/
>> 48: 
>> 49: ATTRIBUTE_ALIGNED(4) static const juint _SIG_MASK[] =
> 
> ATTRIBUTE_ALIGNED expands to alignas, I suggest using that directly instead

The ATTRIBUTE_ALIGNED micro is used in other stub generator files. Should all of those be changed to alignas as well?

Is the suggestion to change just for code readability?

> src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp line 503:
> 
>> 501: 
>> 502:   return entry_point;
>> 503: }
> 
> Is the newline removal intentional?

It wasn't intentional. Thanks for spotting that. I added it back.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24470#discussion_r2114557661
PR Review Comment: https://git.openjdk.org/jdk/pull/24470#discussion_r2114553562


More information about the graal-dev mailing list