< prev index next >

src/cpu/aarch64/vm/aarch64.ad

Print this page
rev 10278 : 8150394: aarch64: add support for 8.1 LSE CAS instructions
Reviewed-by: duke
Contributed-by: ananth.jasty@caviumnetworks.com, edward.nevill@gmail.com

*** 4677,4687 **** // Initialize the box. (Must happen before we update the object mark!) __ str(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes())); // Compare object markOop with mark and if equal exchange scratch1 // with object markOop. ! { Label retry_load; __ bind(retry_load); __ ldaxr(tmp, oop); __ cmp(tmp, disp_hdr); __ br(Assembler::NE, cas_failed); --- 4677,4692 ---- // Initialize the box. (Must happen before we update the object mark!) __ str(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes())); // Compare object markOop with mark and if equal exchange scratch1 // with object markOop. ! if (UseLSE) { ! __ mov(tmp, disp_hdr); ! __ casal(disp_hdr, box, oop); ! __ cmp(tmp, disp_hdr); ! __ br(Assembler::EQ, cont); ! } else { Label retry_load; __ bind(retry_load); __ ldaxr(tmp, oop); __ cmp(tmp, disp_hdr); __ br(Assembler::NE, cas_failed);
*** 4727,4737 **** // // Try to CAS m->owner from NULL to current thread. __ add(tmp, disp_hdr, (ObjectMonitor::owner_offset_in_bytes()-markOopDesc::monitor_value)); __ mov(disp_hdr, zr); ! { Label retry_load, fail; __ bind(retry_load); __ ldaxr(rscratch1, tmp); __ cmp(disp_hdr, rscratch1); __ br(Assembler::NE, fail); --- 4732,4746 ---- // // Try to CAS m->owner from NULL to current thread. __ add(tmp, disp_hdr, (ObjectMonitor::owner_offset_in_bytes()-markOopDesc::monitor_value)); __ mov(disp_hdr, zr); ! if (UseLSE) { ! __ mov(rscratch1, disp_hdr); ! __ casal(disp_hdr, rthread, tmp); ! __ cmp(rscratch1, disp_hdr); ! } else { Label retry_load, fail; __ bind(retry_load); __ ldaxr(rscratch1, tmp); __ cmp(disp_hdr, rscratch1); __ br(Assembler::NE, fail);
*** 4816,4826 **** // Check if it is still a light weight lock, this is is true if we // see the stack address of the basicLock in the markOop of the // object. ! { Label retry_load; __ bind(retry_load); __ ldxr(tmp, oop); __ cmp(box, tmp); __ br(Assembler::NE, cas_failed); --- 4825,4839 ---- // Check if it is still a light weight lock, this is is true if we // see the stack address of the basicLock in the markOop of the // object. ! if (UseLSE) { ! __ mov(tmp, box); ! __ casl(box, disp_hdr, oop); ! __ cmp(tmp, box); ! } else { Label retry_load; __ bind(retry_load); __ ldxr(tmp, oop); __ cmp(box, tmp); __ br(Assembler::NE, cas_failed);
< prev index next >