RFR: 8334706: [JVMCI] APX registers incorrectly exposed on AMD64 [v2]

Doug Simon dnsimon at openjdk.org
Fri Jun 21 12:30:25 UTC 2024


> This PR fixes a bug introduced by [JDK-8329032](https://bugs.openjdk.org/browse/JDK-8329032) which added the APX registers to `AMD64.java`.
> It broke [this invariant](https://github.com/openjdk/jdk/blob/d2bebffb1fd26fae4526afd33a818ee776b7102e/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/code/Architecture.java#L48-L52):
> 
>     /**
>      * List of all available registers on this architecture. The index of each register in this list
>      * is equal to its {@linkplain Register#number number}.
>      */
>     private final RegisterArray registers;
> 
> That invariant is relied upon by the Graal register allocator.
> This PR now tests the invariant and fixes the definitions in `AMD64.java` that were violating it.
> 
> This fix was developed by @tkrodriguez.

Doug Simon has updated the pull request incrementally with one additional commit since the last revision:

  added comment to AMD64.cpuRegisters

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19824/files
  - new: https://git.openjdk.org/jdk/pull/19824/files/f8028db1..b2851a82

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19824&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19824&range=00-01

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19824.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19824/head:pull/19824

PR: https://git.openjdk.org/jdk/pull/19824


More information about the hotspot-compiler-dev mailing list