2590 cmp(temp_reg, markWord::biased_lock_pattern); 2591 brx(Assembler::equal, allow_delay_slot_filling, Assembler::pt, done); 2592 delayed(); 2593 if (!allow_delay_slot_filling) { 2594 nop(); 2595 } 2596 } 2597 2598 2599 // compiler_lock_object() and compiler_unlock_object() are direct transliterations 2600 // of i486.ad fast_lock() and fast_unlock(). See those methods for detailed comments. 2601 // The code could be tightened up considerably. 2602 // 2603 // box->dhw disposition - post-conditions at DONE_LABEL. 2604 // - Successful inflated lock: box->dhw != 0. 2605 // Any non-zero value suffices. 2606 // Consider G2_thread, rsp, boxReg, or markWord::unused_mark() 2607 // - Successful Stack-lock: box->dhw == mark. 2608 // box->dhw must contain the displaced mark word value 2609 // - Failure -- icc.ZFlag == 0 and box->dhw is undefined. 2610 // The slow-path fast_enter() and slow_enter() operators 2611 // are responsible for setting box->dhw = NonZero (typically markWord::unused_mark()). 2612 // - Biased: box->dhw is undefined 2613 // 2614 // SPARC refworkload performance - specifically jetstream and scimark - are 2615 // extremely sensitive to the size of the code emitted by compiler_lock_object 2616 // and compiler_unlock_object. Critically, the key factor is code size, not path 2617 // length. (Simply experiments to pad CLO with unexecuted NOPs demonstrte the 2618 // effect). 2619 2620 2621 void MacroAssembler::compiler_lock_object(Register Roop, Register Rmark, 2622 Register Rbox, Register Rscratch, 2623 BiasedLockingCounters* counters, 2624 bool try_bias) { 2625 Address mark_addr(Roop, oopDesc::mark_offset_in_bytes()); 2626 2627 verify_oop(Roop); 2628 Label done ; 2629 2630 if (counters != NULL) { 2631 inc_counter((address) counters->total_entry_count_addr(), Rmark, Rscratch); | 2590 cmp(temp_reg, markWord::biased_lock_pattern); 2591 brx(Assembler::equal, allow_delay_slot_filling, Assembler::pt, done); 2592 delayed(); 2593 if (!allow_delay_slot_filling) { 2594 nop(); 2595 } 2596 } 2597 2598 2599 // compiler_lock_object() and compiler_unlock_object() are direct transliterations 2600 // of i486.ad fast_lock() and fast_unlock(). See those methods for detailed comments. 2601 // The code could be tightened up considerably. 2602 // 2603 // box->dhw disposition - post-conditions at DONE_LABEL. 2604 // - Successful inflated lock: box->dhw != 0. 2605 // Any non-zero value suffices. 2606 // Consider G2_thread, rsp, boxReg, or markWord::unused_mark() 2607 // - Successful Stack-lock: box->dhw == mark. 2608 // box->dhw must contain the displaced mark word value 2609 // - Failure -- icc.ZFlag == 0 and box->dhw is undefined. 2610 // The slow-path enter() is responsible for setting 2611 // box->dhw = NonZero (typically markWord::unused_mark()). 2612 // - Biased: box->dhw is undefined 2613 // 2614 // SPARC refworkload performance - specifically jetstream and scimark - are 2615 // extremely sensitive to the size of the code emitted by compiler_lock_object 2616 // and compiler_unlock_object. Critically, the key factor is code size, not path 2617 // length. (Simply experiments to pad CLO with unexecuted NOPs demonstrte the 2618 // effect). 2619 2620 2621 void MacroAssembler::compiler_lock_object(Register Roop, Register Rmark, 2622 Register Rbox, Register Rscratch, 2623 BiasedLockingCounters* counters, 2624 bool try_bias) { 2625 Address mark_addr(Roop, oopDesc::mark_offset_in_bytes()); 2626 2627 verify_oop(Roop); 2628 Label done ; 2629 2630 if (counters != NULL) { 2631 inc_counter((address) counters->total_entry_count_addr(), Rmark, Rscratch); |