< prev index next >

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

Print this page

        

@@ -33,10 +33,11 @@
 #include "logging/log.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/markOop.hpp"
 #include "oops/method.hpp"
 #include "oops/methodData.hpp"
+#include "oops/valueKlass.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/frame.inline.hpp"

@@ -654,10 +655,11 @@
 
   // remove activation
   // get sender esp
   ldr(esp,
       Address(rfp, frame::interpreter_frame_sender_sp_offset * wordSize));
+
   if (StackReservedPages > 0) {
     // testing if reserved zone needs to be re-enabled
     Label no_reserved_zone_enabling;
 
     ldr(rscratch1, Address(rthread, JavaThread::reserved_stack_activation_offset()));

@@ -670,10 +672,11 @@
                    InterpreterRuntime::throw_delayed_StackOverflowError));
     should_not_reach_here();
 
     bind(no_reserved_zone_enabling);
   }
+
   // remove frame anchor
   leave();
   // If we're returning to interpreted code we will shortly be
   // adjusting SP to allow some space for ESP.  If we're returning to
   // compiled code the saved sender SP was saved in sender_sp, so this

@@ -723,10 +726,15 @@
     orr(swap_reg, rscratch1, 1);
 
     // Save (object->mark() | 1) into BasicLock's displaced header
     str(swap_reg, Address(lock_reg, mark_offset));
 
+    if (EnableValhalla && !UseBiasedLocking) { 
+      // For slow path is_always_locked, using biased, which is never natural for !UseBiasLocking
+      andr(swap_reg, swap_reg, ~markOopDesc::biased_lock_bit_in_place);
+    }
+
     assert(lock_offset == 0,
            "displached header must be first word in BasicObjectLock");
 
     Label fail;
     if (PrintBiasedLockingStatistics) {
< prev index next >