RFR: 8325467: Support methods with many arguments in C2 [v24]

Emanuel Peter epeter at openjdk.org
Tue Sep 9 08:38:32 UTC 2025


On Mon, 8 Sep 2025 16:20:20 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> Yes, the subtraction is consistent, because if the register mask is offset, we can no longer use the OptoReg to directly index the mask. Small simplified example: register mask with 5 bits, offset by 10. First bit (index 0) represents OptoReg 10, second bit (index 1) represents OptoReg 11, etc. If we call `Member(15)`, we need to subtract the offset so we look at the correct index in the register mask (index 5).
>
> Ah, I think I now better understand your question. `rm_up` is a low-level method for internal use in `regmask.hpp` and `regmask.cpp` only (perhaps I should prepend it with an underscore?). It basically makes it so that we can regard the backing storage (`_RM_UP` and `_RM_UP_EXT`) as one contiguous array. `Member` is exposed externally and so needs the offset logic.

Makes sense. Maybe we can make that a bit more clear in the renaming.
Maybe we can make a clear distinction between the two mappings somehow?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2332518245


More information about the hotspot-compiler-dev mailing list