RFR: 8319690: [AArch64] C2 compilation hits offset_ok_for_immed: assert "c2 compiler bug" [v3]

Andrew Haley aph at openjdk.org
Wed Jun 5 13:41:03 UTC 2024


On Wed, 5 Jun 2024 08:37:34 GMT, Fei Gao <fgao at openjdk.org> wrote:

> > > But `1030` can't be encoded as `base` + `offset` mode
> > 
> > 
> > Why not?
> 
> See https://developer.arm.com/documentation/ddi0602/2023-09/Base-Instructions/LDR--immediate---Load-Register--immediate--?lang=en. For `long` type, signed immediate byte offset should be in range `-256` to `255` and positive immediate byte offset: a multiple of `8` in the range `0` to `32760`.

Oh, I see. I really don't think that matters. Current AArch64 processors often add an extra cycle anyway for offsetted addresses, so all we'd add is a slight code size expansion for misaligned loads.

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

PR Comment: https://git.openjdk.org/jdk/pull/16991#issuecomment-2149970058


More information about the hotspot-compiler-dev mailing list