--- a/src/hotspot/cpu/aarch64/aarch64.ad Fri Aug 30 01:21:14 2019 -0400
+++ b/src/hotspot/cpu/aarch64/aarch64.ad Fri Aug 30 09:06:46 2019 +0200
@@ -3547,7 +3547,7 @@
// markWord of object (disp_hdr) with the stack pointer.
__ mov(rscratch1, sp);
__ sub(disp_hdr, disp_hdr, rscratch1);
- __ mov(tmp, (address) (~(os::vm_page_size()-1) | (uintptr_t)markWord::lock_mask_in_place));
+ __ mov(tmp, (address) (~(os::vm_page_size()-1) | markWord::lock_mask_in_place));
// If condition is true we are cont and hence we can store 0 as the
// displaced header in the box, which indicates that it is a recursive lock.
__ ands(tmp/*==0?*/, disp_hdr, tmp); // Sets flags for result
@@ -3616,7 +3616,8 @@
// Handle existing monitor.
__ bind(object_has_monitor);
- __ add(tmp, tmp, -markWord::monitor_value); // 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()));
__ eor(rscratch1, rscratch1, rthread); // Will be 0 if we are the owner.