RFR: 8319799: Recursive lightweight locking: x86 implementation [v12]

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Jan 25 13:40:37 UTC 2024


On Thu, 25 Jan 2024 11:21:47 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> I'll fix that. Went down a rabbit hole trying to figure out adlc and register allocation. I do not know why they specify `rbx` for `box`. Is it because they want to use `USE_KILL` or are they using `USE_KILL` because they specify `rbx` for `box`. It feels like this specification could be improved. The only requirement is that one tmp register is `rax`.  But I will leave that to another RFE.
>
>> I'll fix that. Went down a rabbit hole trying to figure out adlc and register allocation. I do not know why they specify `rbx` for `box`. Is it because they want to use `USE_KILL` or are they using `USE_KILL` because they specify `rbx` for `box`. It feels like this specification could be improved. The only requirement is that one tmp register is `rax`. But I will leave that to another RFE.
> 
> I don't know this, either. This might well be historical. I seem to remember that a much earlier version of that code shared code with interpreter version and used fixed registers there, but I am not sure. If it's not needed for the new code then don't do it. I don't think it has anything to do with USE_KILL, though. USE_KILL only means that it's using the input value of the register *and* overwrites (kills) it.

Well if I remember correctly from my experiments with this `USE_KILL` requires a bound register. Will get a compilation error with the change `rbx_RegP` -> `rRegP`, saying something like `only bound registers can be killed`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16607#discussion_r1466392214


More information about the hotspot-dev mailing list