RFR: 8308143: [ppc] remove constant and add wrap-up for successor [v2]

Martin Doerr mdoerr at openjdk.org
Tue May 16 09:38:47 UTC 2023


On Tue, 16 May 2023 04:55:44 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> This is cosmetic change, which adds simple range check logic and changes -1 to NOREG_ENCODING. I liked the changes for s390x so aligning PPC with the same.
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix incorrect brackets

The PPC64 implementation follows the other platforms in this regard. Please keep it in sync with them. If you want to improve it, please change it for all platforms, not only PPC64.

src/hotspot/cpu/ppc/register_ppc.hpp line 99:

> 97:   constexpr int encoding() const { assert(is_valid(), "invalid register"); return _encoding; }
> 98:   inline VMReg as_VMReg() const;
> 99:   Register successor() const { return Register((encoding() + 1) & (number_of_registers - 1)); }

I don't think we need this. Only s390 has it, but I don't know the purpose of it. I don't think R0 should be the successor of R31.

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

PR Review: https://git.openjdk.org/jdk/pull/13997#pullrequestreview-1428155442
PR Review Comment: https://git.openjdk.org/jdk/pull/13997#discussion_r1194892396


More information about the hotspot-compiler-dev mailing list