Integrated: 8316181: Move the fast locking implementation out of the .ad files

Stefan Karlsson stefank at openjdk.org
Thu Sep 14 11:52:58 UTC 2023


On Wed, 13 Sep 2023 11:31:30 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> Some platforms put the fast locking implementation in the `C2_MacroAssembler` class, while others have it in the .ad files. I'd like to propose that we unify this a bit and move the code out of the .ad files.
> 
> The benefit is consistency between the platforms but also that it is easier to work with the C++ code when it is in plain C++ files and not in the .ad files.
> 
> The implementation is a pure copy of the code except that the section:
> 
>     C2_MacroAssembler _masm(&cbuf);
>     Register oop = as_Register($object$$reg);
>     Register box = as_Register($box$$reg);
>     Register disp_hdr = as_Register($tmp$$reg);
>     Register tmp = as_Register($tmp2$$reg);
> 
> 
> has been replaced with:
> 
>   Register oop = objectReg;
>   Register box = boxReg;
>   Register disp_hdr = tmpReg;
>   Register tmp = tmp2Reg;
> 
> 
> and the references to `__ ` have been removed.
> 
> This change affects AArch64 and RISC-V
> 
> Tested with tier1-3 on AArch64
> 
> This PR depends on #15709

This pull request has now been integrated.

Changeset: b48dbf6b
Author:    Stefan Karlsson <stefank at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/b48dbf6bfa652ef031c35f0a85a409142563aa72
Stats:     848 lines in 6 files changed: 431 ins; 413 del; 4 mod

8316181: Move the fast locking implementation out of the .ad files

Reviewed-by: thartmann, rkennke, fyang

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

PR: https://git.openjdk.org/jdk/pull/15712


More information about the hotspot-compiler-dev mailing list