RFR: 8370579: PPC: fix inswri immediate argument order

Martin Doerr mdoerr at openjdk.org
Mon Oct 27 14:12:38 UTC 2025


On Fri, 24 Oct 2025 15:19:06 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

> This cleanup PR swaps and renames the immediate arguments of the two `insrwi` instruction macros in `ppc.ad` such that they correspond to the order and names in the manual. This involved swapping the arguments in all six usages. I hope this saves the next person trying to reason about this some confused hours.
> 
> Testing:
>  - [x] Github Actions
>  - [x] Running some relevant tests (`compiler/c2/TestCharShortByteSwap.java`, `jdk/java/lang/Short/ByteSwap.java`, `jdk/java/lang/Integer/BitTwiddle.java`, `compiler/codegen/Test6431242.java`) in qemu

Looks good and tier1 has passed. Thanks for cleaning this up! The old code was really hard to read. Maybe @MBaesken can provide a 2nd review.

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

Marked as reviewed by mdoerr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27978#pullrequestreview-3383718812


More information about the hotspot-compiler-dev mailing list