< prev index next >

src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

Print this page
@@ -312,11 +312,11 @@
  
    // "lock" stores the address of the monitor stack slot, so this is not an oop
    LIR_Opr lock = new_register(T_INT);
    // Need a scratch register for biased locking on x86
    LIR_Opr scratch = LIR_OprFact::illegalOpr;
-   if (UseBiasedLocking) {
+   if (UseBiasedLocking || LockingMode == LM_LIGHTWEIGHT) {
      scratch = new_register(T_INT);
    }
  
    CodeEmitInfo* info_for_exception = NULL;
    if (x->needs_null_check()) {
< prev index next >