Skip to content

Commit

Permalink
8277411: C2 fast_unlock intrinsic on AArch64 has unnecessary ownershi…
Browse files Browse the repository at this point in the history
…p check

Reviewed-by: ngasson, neliasso
  • Loading branch information
fisk committed Nov 26, 2021
1 parent ce0234b commit 3d810ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -4007,19 +4007,15 @@ encode %{
__ bind(object_has_monitor);
STATIC_ASSERT(markWord::monitor_value <= INT_MAX);
__ add(tmp, tmp, -(int)markWord::monitor_value); // monitor
__ ldr(rscratch1, Address(tmp, ObjectMonitor::owner_offset_in_bytes()));
__ ldr(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset_in_bytes()));

Label notRecursive;
__ cmp(rscratch1, rthread);
__ br(Assembler::NE, cont);

__ cbz(disp_hdr, notRecursive);

// Recursive lock
__ sub(disp_hdr, disp_hdr, 1u);
__ str(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset_in_bytes()));
// flag == EQ was set in the ownership check above
__ cmp(disp_hdr, disp_hdr); // Sets flags for result
__ b(cont);

__ bind(notRecursive);
Expand Down

1 comment on commit 3d810ad

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.