RFR: 8310844: [AArch64] C1 compilation fails because monitor offset in OSR buffer is too large for immediate [v2]

Tobias Hartmann thartmann at openjdk.org
Thu Jan 4 14:20:39 UTC 2024


> [JDK-8287349](https://bugs.openjdk.org/browse/JDK-8287349) changed the code in `LIR_Assembler::osr_entry()` to use a single `ldp` instruction instead of two `ldr` instructions to load the monitor lock and object from the OSR state. This is not correct because the `ldp` instruction only supports a [7-bit signed immediate value](https://developer.arm.com/documentation/den0024/a/The-A64-instruction-set/Memory-access-instructions/Accessing-multiple-memory-locations). If the offset is larger, for example due to a large number of locals as in `TestLargeMonitorOffset::test`, we hit the `Field too big for insn` guarantee.
> 
> I suggest to revert [JDK-8287349](https://bugs.openjdk.org/browse/JDK-8287349). 
> 
> I also found two unrelated bugs when working on the reproducer: [JDK-8322992](https://bugs.openjdk.org/browse/JDK-8322992) (javac) and [JDK-8322996](https://bugs.openjdk.org/browse/JDK-8322996) (C2).
> 
> Thanks,
> Tobias

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  Adjusted according to review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17266/files
  - new: https://git.openjdk.org/jdk/pull/17266/files/de6684fd..f888a56d

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

  Stats: 4 lines in 1 file changed: 1 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/17266.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17266/head:pull/17266

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


More information about the hotspot-compiler-dev mailing list