comparison src/cpu/x86/vm/c1_Runtime1_x86.cpp @ 1942:00bc9eaf0e24

Support for -XX:+UseFastLocking flag. Fixed monitor enter XIR template for correct debug info at the runtime call.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Wed, 29 Dec 2010 20:06:41 +0100
parents 2d26b0046e0d
children 06f017f7daa7
comparison
equal deleted inserted replaced
1941:79d04223b8a5 1942:00bc9eaf0e24
2008 Register obj = j_rarg0; 2008 Register obj = j_rarg0;
2009 Register lock = j_rarg1; 2009 Register lock = j_rarg1;
2010 2010
2011 Register scratch1 = rax; 2011 Register scratch1 = rax;
2012 Register scratch2 = rbx; 2012 Register scratch2 = rbx;
2013 assert_different_registers(obj, lock, scratch1, scratch2);
2013 2014
2014 // copied from LIR_Assembler::emit_lock 2015 // copied from LIR_Assembler::emit_lock
2015 if (UseFastLocking) { 2016 if (UseFastLocking) {
2016 assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header"); 2017 assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
2017 __ lock_object(scratch1, obj, lock, scratch2, slow_case); 2018 __ lock_object(scratch1, obj, lock, scratch2, slow_case);
2041 2042
2042 // needed in rax later on... 2043 // needed in rax later on...
2043 Register lock2 = rax; 2044 Register lock2 = rax;
2044 __ mov(lock2, lock); 2045 __ mov(lock2, lock);
2045 Register scratch1 = rbx; 2046 Register scratch1 = rbx;
2047 assert_different_registers(obj, lock, scratch1, lock2);
2046 2048
2047 // copied from LIR_Assembler::emit_lock 2049 // copied from LIR_Assembler::emit_lock
2048 if (UseFastLocking) { 2050 if (UseFastLocking) {
2049 assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header"); 2051 assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
2050 __ unlock_object(scratch1, obj, lock2, slow_case); 2052 __ unlock_object(scratch1, obj, lock2, slow_case);