< prev index next >

src/hotspot/cpu/x86/interp_masm_x86.cpp

Print this page
@@ -1186,15 +1186,15 @@
      }
  
      if (LockingMode == LM_LIGHTWEIGHT) {
  #ifdef _LP64
        const Register thread = r15_thread;
+       lightweight_lock(lock_reg, obj_reg, swap_reg, thread, tmp_reg, slow_case);
  #else
-       const Register thread = lock_reg;
-       get_thread(thread);
+       // Lacking registers and thread on x86_32. Always take slow path.
+       jmp(slow_case);
  #endif
-       lightweight_lock(obj_reg, swap_reg, thread, tmp_reg, slow_case);
      } else if (LockingMode == LM_LEGACY) {
        // Load immediate 1 into swap_reg %rax
        movl(swap_reg, 1);
  
        // Load (object->mark() | 1) into swap_reg %rax

@@ -1252,19 +1252,13 @@
      jmp(done);
  
      bind(slow_case);
  
      // Call the runtime routine for slow case
-     if (LockingMode == LM_LIGHTWEIGHT) {
-       call_VM(noreg,
-               CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter_obj),
-               obj_reg);
-     } else {
-       call_VM(noreg,
-               CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
-               lock_reg);
-     }
+     call_VM(noreg,
+             CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
+             lock_reg);
      bind(done);
    }
  }
  
  
< prev index next >