10524 // This name is KNOWN by the ADLC and cannot be changed.
10525 // The ADLC forces a 'TypeRawPtr::BOTTOM' output type
10526 // for this guy.
10527 instruct tlsLoadP(javaThread_RegP dst)
10528 %{
10529 match(Set dst (ThreadLocal));
10530
10531 ins_cost(0);
10532
10533 format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10534
10535 size(0);
10536
10537 ins_encode( /*empty*/ );
10538
10539 ins_pipe(pipe_class_empty);
10540 %}
10541
10542 // inlined locking and unlocking
10543 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10544 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10545 %{
10546 predicate(LockingMode != LM_LIGHTWEIGHT);
10547 match(Set cr (FastLock object box));
10548 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10549
10550 ins_cost(10 * DEFAULT_COST);
10551 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3, #@cmpFastLock" %}
10552
10553 ins_encode %{
10554 __ fast_lock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10555 %}
10556
10557 ins_pipe(pipe_serial);
10558 %}
10559
10560 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10561 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10562 %{
10563 predicate(LockingMode != LM_LIGHTWEIGHT);
10564 match(Set cr (FastUnlock object box));
10565 effect(TEMP tmp1, TEMP tmp2);
10566
10567 ins_cost(10 * DEFAULT_COST);
10568 format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10569
10570 ins_encode %{
10571 __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10572 %}
10573
10574 ins_pipe(pipe_serial);
10575 %}
10576
10577 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10578 %{
10579 predicate(LockingMode == LM_LIGHTWEIGHT);
10580 match(Set cr (FastLock object box));
10581 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10582
10583 ins_cost(10 * DEFAULT_COST);
10584 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3 #@cmpFastLockLightweight" %}
10585
10586 ins_encode %{
10587 __ fast_lock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10588 %}
10589
10590 ins_pipe(pipe_serial);
10591 %}
10592
10593 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10594 %{
10595 predicate(LockingMode == LM_LIGHTWEIGHT);
10596 match(Set cr (FastUnlock object box));
10597 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10598
10599 ins_cost(10 * DEFAULT_COST);
10600 format %{ "fastunlock $object,$box\t! kills $tmp1,$tmp2,$tmp3 #@cmpFastUnlockLightweight" %}
10601
10602 ins_encode %{
10603 __ fast_unlock_lightweight($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10604 %}
10605
10606 ins_pipe(pipe_serial);
10607 %}
10608
10609 // Tail Call; Jump from runtime stub to Java code.
10610 // Also known as an 'interprocedural jump'.
10611 // Target of jump will eventually return to caller.
10612 // TailJump below removes the return address.
10613 // Don't use fp for 'jump_target' because a MachEpilogNode has already been
10614 // emitted just above the TailCall which has reset fp to the caller state.
10615 instruct TailCalljmpInd(iRegPNoSpNoFp jump_target, inline_cache_RegP method_oop)
10616 %{
10617 match(TailCall jump_target method_oop);
10618
10619 ins_cost(BRANCH_COST);
10620
10621 format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10622
10623 ins_encode(riscv_enc_tail_call(jump_target));
|
10524 // This name is KNOWN by the ADLC and cannot be changed.
10525 // The ADLC forces a 'TypeRawPtr::BOTTOM' output type
10526 // for this guy.
10527 instruct tlsLoadP(javaThread_RegP dst)
10528 %{
10529 match(Set dst (ThreadLocal));
10530
10531 ins_cost(0);
10532
10533 format %{ " -- \t// $dst=Thread::current(), empty, #@tlsLoadP" %}
10534
10535 size(0);
10536
10537 ins_encode( /*empty*/ );
10538
10539 ins_pipe(pipe_class_empty);
10540 %}
10541
10542 // inlined locking and unlocking
10543 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10544 instruct cmpFastLock(rFlagsReg cr, iRegP object, iRegP box,
10545 iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3, iRegPNoSp tmp4)
10546 %{
10547 predicate(LockingMode != LM_LIGHTWEIGHT);
10548 match(Set cr (FastLock object box));
10549 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4);
10550
10551 ins_cost(10 * DEFAULT_COST);
10552 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3,$tmp4 #@cmpFastLock" %}
10553
10554 ins_encode %{
10555 __ fast_lock($object$$Register, $box$$Register,
10556 $tmp1$$Register, $tmp2$$Register, $tmp3$$Register, $tmp4$$Register);
10557 %}
10558
10559 ins_pipe(pipe_serial);
10560 %}
10561
10562 // using t1 as the 'flag' register to bridge the BoolNode producers and consumers
10563 instruct cmpFastUnlock(rFlagsReg cr, iRegP object, iRegP box, iRegPNoSp tmp1, iRegPNoSp tmp2)
10564 %{
10565 predicate(LockingMode != LM_LIGHTWEIGHT);
10566 match(Set cr (FastUnlock object box));
10567 effect(TEMP tmp1, TEMP tmp2);
10568
10569 ins_cost(10 * DEFAULT_COST);
10570 format %{ "fastunlock $object,$box\t! kills $tmp1, $tmp2, #@cmpFastUnlock" %}
10571
10572 ins_encode %{
10573 __ fast_unlock($object$$Register, $box$$Register, $tmp1$$Register, $tmp2$$Register);
10574 %}
10575
10576 ins_pipe(pipe_serial);
10577 %}
10578
10579 instruct cmpFastLockLightweight(rFlagsReg cr, iRegP object, iRegP box,
10580 iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3, iRegPNoSp tmp4)
10581 %{
10582 predicate(LockingMode == LM_LIGHTWEIGHT);
10583 match(Set cr (FastLock object box));
10584 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4);
10585
10586 ins_cost(10 * DEFAULT_COST);
10587 format %{ "fastlock $object,$box\t! kills $tmp1,$tmp2,$tmp3,$tmp4 #@cmpFastLockLightweight" %}
10588
10589 ins_encode %{
10590 __ fast_lock_lightweight($object$$Register, $box$$Register,
10591 $tmp1$$Register, $tmp2$$Register, $tmp3$$Register, $tmp4$$Register);
10592 %}
10593
10594 ins_pipe(pipe_serial);
10595 %}
10596
10597 instruct cmpFastUnlockLightweight(rFlagsReg cr, iRegP object, iRegP box,
10598 iRegPNoSp tmp1, iRegPNoSp tmp2, iRegPNoSp tmp3)
10599 %{
10600 predicate(LockingMode == LM_LIGHTWEIGHT);
10601 match(Set cr (FastUnlock object box));
10602 effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
10603
10604 ins_cost(10 * DEFAULT_COST);
10605 format %{ "fastunlock $object,$box\t! kills $tmp1,$tmp2,$tmp3 #@cmpFastUnlockLightweight" %}
10606
10607 ins_encode %{
10608 __ fast_unlock_lightweight($object$$Register, $box$$Register,
10609 $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
10610 %}
10611
10612 ins_pipe(pipe_serial);
10613 %}
10614
10615 // Tail Call; Jump from runtime stub to Java code.
10616 // Also known as an 'interprocedural jump'.
10617 // Target of jump will eventually return to caller.
10618 // TailJump below removes the return address.
10619 // Don't use fp for 'jump_target' because a MachEpilogNode has already been
10620 // emitted just above the TailCall which has reset fp to the caller state.
10621 instruct TailCalljmpInd(iRegPNoSpNoFp jump_target, inline_cache_RegP method_oop)
10622 %{
10623 match(TailCall jump_target method_oop);
10624
10625 ins_cost(BRANCH_COST);
10626
10627 format %{ "jalr $jump_target\t# $method_oop holds method oop, #@TailCalljmpInd." %}
10628
10629 ins_encode(riscv_enc_tail_call(jump_target));
|