src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
Print this page
rev 10271 : 8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
Summary: adds c1 & c2 x86 intrinsics for j.l.Runtime.onSpinWait() that utilize the PAUSE instruction
Reviewed-by: iveresov, kvn, vlivanov
Contributed-by: Ivan Krylov <ivan@azul.com>, Yuri Gaevsky <ygaevsky@azul.com>
*** 3884,3893 ****
--- 3884,3897 ----
void LIR_Assembler::membar_storeload() {
__ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
}
+ void LIR_Assembler::on_spin_wait() {
+ __ pause ();
+ }
+
void LIR_Assembler::get_thread(LIR_Opr result_reg) {
assert(result_reg->is_register(), "check");
#ifdef _LP64
// __ get_thread(result_reg->as_register_lo());
__ mov(result_reg->as_register(), r15_thread);