RFR: 8283626: AArch64: Set relocInfo::offset_unit to 4

Andrew Haley aph at openjdk.java.net
Mon Mar 28 13:19:47 UTC 2022


On Mon, 28 Mar 2022 12:26:17 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:

> AArch64 instructions size is 4 bytes. Two lowest bits of `relocInfo` offsets can be discarded.
> Tested with release and fastdebug builds:
> - `gtest`: Passed.
> - `tier1`...`tier4`: Passed

Looks good. I remember this being suggested a long time ago, but we were close to release and I was worried something might break unexpectedly.

src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp line 33:

> 31:   enum {
> 32:     // AArch64 instructions size is 4 bytes.
> 33:     // Two lowest offset bits can always be discarded.

Suggestion:

    // AArch64 instructions are always 4 bytes long and 4-aligned, so the
    // two lowest offset bits can always be discarded.

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

PR: https://git.openjdk.java.net/jdk/pull/7991


More information about the hotspot-compiler-dev mailing list