RFR: 8297092: [macos_aarch64] Add support for SHA feature detection [v4]
Hao Sun
haosun at openjdk.org
Fri Jan 13 04:04:12 UTC 2023
On Thu, 12 Jan 2023 16:02:31 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Hao Sun has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Improve the comment
>>
>> 1) As suggested by aph, state the performance result of
>> UseSHA3Intrinsics on existing hardware with SHA3 feature.
>>
>> 2) As suggest by gerard-ziemski, use Apple developer document and XNU
>> kernel code base as the reference, and improve the ASIMD and LSE feature
>> detection (i.e. checking both two parameters of sysctlname function).
>>
>> Besides, we also add assertions for AES/PMULL/SHA1/SHA2 features.
>
> src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp line 72:
>
>> 70: // Register 0".
>> 71: assert(cpu_has("hw.optional.floatingpoint"), "should be");
>> 72: assert(cpu_has("hw.optional.AdvSIMD") ||
>
> According to https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics `These features are standard in Apple processors beginning with M1 and A7, and don’t need to be checked.`, so can turn these features ON for Mac always?
Agree. Changed as suggested. Note that comments are updated a bit. Thanks.
-------------
PR: https://git.openjdk.org/jdk/pull/11382
More information about the hotspot-runtime-dev
mailing list