< prev index next >

src/hotspot/cpu/x86/x86_64.ad

Print this page

12378                  _rtm_counters, _stack_rtm_counters,
12379                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
12380                  true, ra_->C->profile_rtm());
12381   %}
12382   ins_pipe(pipe_slow);
12383 %}
12384 
12385 instruct cmpFastLock(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI tmp, rRegP scr) %{
12386   predicate(LockingMode != LM_LIGHTWEIGHT && !Compile::current()->use_rtm());
12387   match(Set cr (FastLock object box));
12388   effect(TEMP tmp, TEMP scr, USE_KILL box);
12389   ins_cost(300);
12390   format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %}
12391   ins_encode %{
12392     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
12393                  $scr$$Register, noreg, noreg, r15_thread, nullptr, nullptr, nullptr, false, false);
12394   %}
12395   ins_pipe(pipe_slow);
12396 %}
12397 
12398 instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp) %{
12399   predicate(LockingMode != LM_LIGHTWEIGHT);
12400   match(Set cr (FastUnlock object box));
12401   effect(TEMP tmp, USE_KILL box);
12402   ins_cost(300);
12403   format %{ "fastunlock $object,$box\t! kills $box,$tmp" %}
12404   ins_encode %{
12405     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
12406   %}
12407   ins_pipe(pipe_slow);
12408 %}
12409 
12410 instruct cmpFastLockLightweight(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI rax_reg, rRegP tmp) %{
12411   predicate(LockingMode == LM_LIGHTWEIGHT);
12412   match(Set cr (FastLock object box));
12413   effect(TEMP rax_reg, TEMP tmp, USE_KILL box);
12414   ins_cost(300);
12415   format %{ "fastlock $object,$box\t! kills $box,$rax_reg,$tmp" %}
12416   ins_encode %{
12417     __ fast_lock_lightweight($object$$Register, $box$$Register, $rax_reg$$Register, $tmp$$Register, r15_thread);
12418   %}
12419   ins_pipe(pipe_slow);
12420 %}
12421 
12422 instruct cmpFastUnlockLightweight(rFlagsReg cr, rRegP object, rax_RegP rax_reg, rRegP tmp) %{
12423   predicate(LockingMode == LM_LIGHTWEIGHT);
12424   match(Set cr (FastUnlock object rax_reg));
12425   effect(TEMP tmp, USE_KILL rax_reg);
12426   ins_cost(300);
12427   format %{ "fastunlock $object,$rax_reg\t! kills $rax_reg,$tmp" %}
12428   ins_encode %{
12429     __ fast_unlock_lightweight($object$$Register, $rax_reg$$Register, $tmp$$Register, r15_thread);
12430   %}
12431   ins_pipe(pipe_slow);
12432 %}
12433 
12434 
12435 // ============================================================================
12436 // Safepoint Instructions
12437 instruct safePoint_poll_tls(rFlagsReg cr, rRegP poll)
12438 %{
12439   match(SafePoint poll);
12440   effect(KILL cr, USE poll);
12441 
12442   format %{ "testl   rax, [$poll]\t"
12443             "# Safepoint: poll for GC" %}
12444   ins_cost(125);
12445   size(4); /* setting an explicit size will cause debug builds to assert if size is incorrect */
12446   ins_encode %{
12447     __ relocate(relocInfo::poll_type);
12448     address pre_pc = __ pc();
12449     __ testl(rax, Address($poll$$Register, 0));

12378                  _rtm_counters, _stack_rtm_counters,
12379                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
12380                  true, ra_->C->profile_rtm());
12381   %}
12382   ins_pipe(pipe_slow);
12383 %}
12384 
12385 instruct cmpFastLock(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI tmp, rRegP scr) %{
12386   predicate(LockingMode != LM_LIGHTWEIGHT && !Compile::current()->use_rtm());
12387   match(Set cr (FastLock object box));
12388   effect(TEMP tmp, TEMP scr, USE_KILL box);
12389   ins_cost(300);
12390   format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %}
12391   ins_encode %{
12392     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
12393                  $scr$$Register, noreg, noreg, r15_thread, nullptr, nullptr, nullptr, false, false);
12394   %}
12395   ins_pipe(pipe_slow);
12396 %}
12397 
12398 instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp, rRegP scr) %{
12399   predicate(LockingMode != LM_LIGHTWEIGHT);
12400   match(Set cr (FastUnlock object box));
12401   effect(TEMP tmp, TEMP scr, USE_KILL box);
12402   ins_cost(300);
12403   format %{ "fastunlock $object,$box\t! kills $box,$tmp" %}
12404   ins_encode %{
12405     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, $scr$$Register, ra_->C->use_rtm());
12406   %}
12407   ins_pipe(pipe_slow);
12408 %}
12409 
12410 instruct cmpFastLockLightweight(rFlagsReg cr, rRegP object, rbx_RegP box, rax_RegI rax_reg, rRegP tmp) %{
12411   predicate(LockingMode == LM_LIGHTWEIGHT);
12412   match(Set cr (FastLock object box));
12413   effect(TEMP rax_reg, TEMP tmp, USE_KILL box);
12414   ins_cost(300);
12415   format %{ "fastlock $object,$box\t! kills $box,$rax_reg,$tmp" %}
12416   ins_encode %{
12417     __ fast_lock_lightweight($object$$Register, $box$$Register, $rax_reg$$Register, $tmp$$Register, r15_thread);
12418   %}
12419   ins_pipe(pipe_slow);
12420 %}
12421 
12422 instruct cmpFastUnlockLightweight(rFlagsReg cr, rRegP object, rax_RegP rax_reg, rRegP tmp, rRegP scr) %{
12423   predicate(LockingMode == LM_LIGHTWEIGHT);
12424   match(Set cr (FastUnlock object rax_reg));
12425   effect(TEMP tmp, TEMP scr, USE_KILL rax_reg);
12426   ins_cost(300);
12427   format %{ "fastunlock $object,$rax_reg\t! kills $rax_reg,$tmp" %}
12428   ins_encode %{
12429     __ fast_unlock_lightweight($object$$Register, $rax_reg$$Register, $tmp$$Register, $scr$$Register, r15_thread);
12430   %}
12431   ins_pipe(pipe_slow);
12432 %}
12433 
12434 
12435 // ============================================================================
12436 // Safepoint Instructions
12437 instruct safePoint_poll_tls(rFlagsReg cr, rRegP poll)
12438 %{
12439   match(SafePoint poll);
12440   effect(KILL cr, USE poll);
12441 
12442   format %{ "testl   rax, [$poll]\t"
12443             "# Safepoint: poll for GC" %}
12444   ins_cost(125);
12445   size(4); /* setting an explicit size will cause debug builds to assert if size is incorrect */
12446   ins_encode %{
12447     __ relocate(relocInfo::poll_type);
12448     address pre_pc = __ pc();
12449     __ testl(rax, Address($poll$$Register, 0));
< prev index next >