RFR: 8287396 LIR_Opr::vreg_number() and data() can return negative number

Vladimir Kozlov kvn at openjdk.java.net
Fri May 27 15:46:32 UTC 2022


On Fri, 27 May 2022 03:23:47 GMT, Dean Long <dlong at openjdk.org> wrote:

> This PR does two things:
> - reverts the incorrect change to non_data_bits that included pointer_bits
> - treats the data() as an unsigned int to prevent a high bit being treated as a negative number

Christian said in #2543:
"There is also a second issue that LIR_OprDesc::vreg_max is too big. It is only used in this bailout code. OprBits::vreg_max is defined over OprBits::data_bits which uses OprBits::non_data_bits. But OprBits::non_data_bits does not consider OprBits::pointer_bits which results in a too large value for LIR_OprDesc::vreg_max and the assertion is hit because we don't bail out, yet. This needs to be fixed as well."

So yes, fix vreg_max.

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

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


More information about the hotspot-compiler-dev mailing list