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 15:44:21 UTC 2024


On Thu, 4 Jan 2024 14:20:39 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
>
> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adjusted according to review

Thanks for the review, Andrew.

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

PR Comment: https://git.openjdk.org/jdk/pull/17266#issuecomment-1877311832


More information about the hotspot-compiler-dev mailing list