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

Tobias Hartmann thartmann at openjdk.org
Fri Jan 5 13:51:37 UTC 2024


On Thu, 4 Jan 2024 12:39:18 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> [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

This pull request has now been integrated.

Changeset: ade21a96
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ade21a965f8a5fc889cd48bba76fad507bdeddf5
Stats:     149 lines in 2 files changed: 147 ins; 0 del; 2 mod

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

Reviewed-by: aph, chagedorn

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

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


More information about the hotspot-compiler-dev mailing list