--- old/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp 2015-11-19 12:14:48.044904000 +0000 +++ new/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp 2015-11-19 12:14:47.824904000 +0000 @@ -225,6 +225,19 @@ __ restore_constant_pool_cache(); __ get_method(rmethod); +#if INCLUDE_JVMCI + // Check if we need to take lock at entry of synchronized method. + if (UseJVMCICompiler) { + Label L; + __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset())); + __ cbz(rscratch1, L); + // Clear flag. + __ strb(zr, Address(rthread, JavaThread::pending_monitorenter_offset())); + // Take lock. + lock_method(); + __ bind(L); + } +#endif // handle exceptions { Label L;