Reply: RFR: 8331558: AArch64: optimize integer remainder [v2]
Jin Guojie
jinguojie.jgj at alibaba-inc.com
Tue May 7 03:13:42 UTC 2024
Hi Nevill,
I submitted a patch which is related to Arm64 MSUB instrunction.
Eric found that in the two lines of code you submitted in 2015, an extra nop is executed for CPUs with a53mac features.
My patch just keeps these two lines of code unchanged.
Could you provide some background explanation for what's the specials on a53mac?
Jin Guojie (Alibaba Group, hotspot developer)
On 2024/5/6 Jin Guojie wrote:
> On Mon, 6 May 2024 09:30:45 GMT, Eric Liu <eliu at openjdk.org> wrote:
>>> Jin Guojie has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>>>
>>> - Merge branch 'openjdk:master' into dev
>>> - Update vm_version_aarch64.hpp
>>> - 8331558: AArch64: optimize integer remainder
>>>
>>> On some Arm processors, a separate multiply/subtract is actually faster than the combined instruction.
>>> - 8331556: AArch64: CPU_Model support for Neoverse N1/N2/V1/V2
>>>
>>> Add full platform coverage for Neoverse variants in vm_version.?pp
>>
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 447:
>>
>>> 445: inline void msub(Register Rd, Register Rn, Register Rm, Register Ra) {
>>> 446: if (VM_Version::supports_a53mac() && Ra != zr)
>>> 447: nop();
>>
>> It was in JDK-8079203 [1] for the first time. May I ask what's the specials on a53mac?
>>
>> [1] https://github.com/openjdk/jdk/commit/a65f9f95894e22ce2fd160024ce46f6aaa6c8bd3
> This code entered the JDK in 2015. Frankly, I have no idea why an extra nop is needed on CPUs with the a53mac feature.
> Perhaps the author of patch a65f9f9589, enevill at openjdk.org, could explain?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19093#discussion_r1590798890
More information about the hotspot-dev
mailing list