RFR: JDK-8331859 : [PPC64] Remove support for Power7 and older [v10]
Martin Doerr
mdoerr at openjdk.org
Thu May 15 13:27:21 UTC 2025
On Thu, 15 May 2025 07:56:00 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> JBS Issue: [JDK-8331859](https://bugs.openjdk.org/browse/JDK-8331859)
>> Linux PPC64le requires Power8 since the beginning.
>> AIX requires Power8 with the new OpenXL based build ([JDK-8307520](https://bugs.openjdk.org/browse/JDK-8307520)). The old build has been removed in JDK 23 ([JDK-8327701](https://bugs.openjdk.org/browse/JDK-8327701)).
>> Linux PPC64 Big Endian is no longer officially supported (only kept alive for development, debugging and testing purposes).
>>
>> The following checks for old processors are no longer needed:
>> 8: VM_Version::has_lqarx()
>> 7: VM_Version::has_popcntw()
>> 6: VM_Version::has_cmpb()
>> 5: VM_Version::has_popcntb()
>> These ones and some more checks for old instructions are no longer needed. All code which is no longer reachable when removing them should also get removed.
>> Checks like "PowerArchitecturePPC64 >= 8" (or older) can be removed.
>>
>> Atomic::PlatformCmpxchg<1>::operator() can be simplified by using sub-word instructions (lharx, lbarx).
>>
>> Temp registers can be removed from cmpxchgb and cmpxchgh.
>>
>> Build flags "-mcpu=powerpc64 -mtune=power5" for Big Endian linux should get replaced by "-mcpu=power8 -mtune=power8" as already used for linux PPC64le.
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>
> adapt vsx
Very nice! Thanks! I only have some small requests remaining. We should also run tests on Power8 and with -XX:-SuperwordUseVSX.
src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp line 736:
> 734: case vmIntrinsics::_dsqrt:
> 735: case vmIntrinsics::_dsqrt_strict:
> 736: /* run interpreted */
These 2 cases should be removed. They are already handled above, now.
src/hotspot/cpu/ppc/matcher_ppc.hpp line 161:
> 159:
> 160: // true means we have fast l2f conversion
> 161: static bool convL2FSupported(void) {
Please make it `static constexpr` like on the other platforms.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 68:
> 66: FLAG_SET_ERGO(PowerArchitecturePPC64, 9);
> 67: } else {
> 68: FLAG_SET_ERGO(PowerArchitecturePPC64, 0);
I think we should set it to 8, here.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 76:
> 74: case 10: if (!VM_Version::has_brw() ) break;
> 75: case 9: if (!VM_Version::has_darn() ) break;
> 76: case 0: PowerArchitecturePPC64_ok = true; break;
And replace 0 by 8. 0 is no longer supported.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 115:
> 113: }
> 114: if (FLAG_IS_DEFAULT(UseVectorByteReverseInstructionsPPC64)) {
> 115: FLAG_SET_ERGO(UseVectorByteReverseInstructionsPPC64, true);
I think this part should be reverted. It is still possible to switch off SuperwordUseVSX.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 253:
> 251: }
> 252:
> 253:
Please remove the extra newline.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 274:
> 272:
> 273: if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
> 274: FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
I think UseSHA256Intrinsics should only get enabled if UseSHA is enabled.
src/hotspot/cpu/ppc/vm_version_ppc.cpp line 278:
> 276:
> 277: if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
> 278: FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
Same here.
src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp line 257:
> 255: " lbarx %[old_value], 0, %[dest] \n"
> 256: /* extract byte and compare */
> 257: " cmpw %[compare_value], %[old_value] \n"
Please increase indentation before \n.
src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp line 266:
> 264: /* out */
> 265: : [old_value] "=&r" (old_value),
> 266: [loaded_value] "=&r" (loaded_value),
Indentation.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20262#pullrequestreview-2843573563
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091099298
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091107496
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091140960
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091144394
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091149721
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091152394
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091156968
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091158142
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091164357
PR Review Comment: https://git.openjdk.org/jdk/pull/20262#discussion_r2091165323
More information about the hotspot-dev
mailing list