13761 // inlined locking and unlocking
13762
13763 instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2, eRegP thread) %{
13764 predicate(Compile::current()->use_rtm());
13765 match(Set cr (FastLock object box));
13766 effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box, TEMP thread);
13767 ins_cost(300);
13768 format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
13769 ins_encode %{
13770 __ get_thread($thread$$Register);
13771 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13772 $scr$$Register, $cx1$$Register, $cx2$$Register, $thread$$Register,
13773 _rtm_counters, _stack_rtm_counters,
13774 ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
13775 true, ra_->C->profile_rtm());
13776 %}
13777 ins_pipe(pipe_slow);
13778 %}
13779
13780 instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr, eRegP thread) %{
13781 predicate(!Compile::current()->use_rtm());
13782 match(Set cr (FastLock object box));
13783 effect(TEMP tmp, TEMP scr, USE_KILL box, TEMP thread);
13784 ins_cost(300);
13785 format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
13786 ins_encode %{
13787 __ get_thread($thread$$Register);
13788 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13789 $scr$$Register, noreg, noreg, $thread$$Register, nullptr, nullptr, nullptr, false, false);
13790 %}
13791 ins_pipe(pipe_slow);
13792 %}
13793
13794 instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
13795 match(Set cr (FastUnlock object box));
13796 effect(TEMP tmp, USE_KILL box);
13797 ins_cost(300);
13798 format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
13799 ins_encode %{
13800 __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
13801 %}
13802 ins_pipe(pipe_slow);
13803 %}
13804
13805 instruct mask_all_evexL_LT32(kReg dst, eRegL src) %{
13806 predicate(Matcher::vector_length(n) <= 32);
13807 match(Set dst (MaskAll src));
13808 format %{ "mask_all_evexL_LE32 $dst, $src \t" %}
13809 ins_encode %{
13810 int mask_len = Matcher::vector_length(this);
13811 __ vector_maskall_operation($dst$$KRegister, $src$$Register, mask_len);
13812 %}
13813 ins_pipe( pipe_slow );
13814 %}
13815
13816 instruct mask_all_evexL_GT32(kReg dst, eRegL src, kReg ktmp) %{
13817 predicate(Matcher::vector_length(n) > 32);
13818 match(Set dst (MaskAll src));
13819 effect(TEMP ktmp);
13820 format %{ "mask_all_evexL_GT32 $dst, $src \t! using $ktmp as TEMP " %}
13821 ins_encode %{
13822 int mask_len = Matcher::vector_length(this);
13823 __ vector_maskall_operation32($dst$$KRegister, $src$$Register, $ktmp$$KRegister, mask_len);
13824 %}
|
13761 // inlined locking and unlocking
13762
13763 instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2, eRegP thread) %{
13764 predicate(Compile::current()->use_rtm());
13765 match(Set cr (FastLock object box));
13766 effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box, TEMP thread);
13767 ins_cost(300);
13768 format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
13769 ins_encode %{
13770 __ get_thread($thread$$Register);
13771 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13772 $scr$$Register, $cx1$$Register, $cx2$$Register, $thread$$Register,
13773 _rtm_counters, _stack_rtm_counters,
13774 ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
13775 true, ra_->C->profile_rtm());
13776 %}
13777 ins_pipe(pipe_slow);
13778 %}
13779
13780 instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr, eRegP thread) %{
13781 predicate(LockingMode != LM_LIGHTWEIGHT && !Compile::current()->use_rtm());
13782 match(Set cr (FastLock object box));
13783 effect(TEMP tmp, TEMP scr, USE_KILL box, TEMP thread);
13784 ins_cost(300);
13785 format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
13786 ins_encode %{
13787 __ get_thread($thread$$Register);
13788 __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13789 $scr$$Register, noreg, noreg, $thread$$Register, nullptr, nullptr, nullptr, false, false);
13790 %}
13791 ins_pipe(pipe_slow);
13792 %}
13793
13794 instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
13795 predicate(LockingMode != LM_LIGHTWEIGHT);
13796 match(Set cr (FastUnlock object box));
13797 effect(TEMP tmp, USE_KILL box);
13798 ins_cost(300);
13799 format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
13800 ins_encode %{
13801 __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
13802 %}
13803 ins_pipe(pipe_slow);
13804 %}
13805
13806 instruct cmpFastLockLightweight(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI eax_reg, eRegP tmp, eRegP thread) %{
13807 predicate(LockingMode == LM_LIGHTWEIGHT);
13808 match(Set cr (FastLock object box));
13809 effect(TEMP eax_reg, TEMP tmp, USE_KILL box, TEMP thread);
13810 ins_cost(300);
13811 format %{ "FASTLOCK $object,$box\t! kills $box,$eax_reg,$tmp" %}
13812 ins_encode %{
13813 __ get_thread($thread$$Register);
13814 __ fast_lock_lightweight($object$$Register, $box$$Register, $eax_reg$$Register, $tmp$$Register, $thread$$Register);
13815 %}
13816 ins_pipe(pipe_slow);
13817 %}
13818
13819 instruct cmpFastUnlockLightweight(eFlagsReg cr, eRegP object, eAXRegP eax_reg, eRegP tmp, eRegP thread) %{
13820 predicate(LockingMode == LM_LIGHTWEIGHT);
13821 match(Set cr (FastUnlock object eax_reg));
13822 effect(TEMP tmp, USE_KILL eax_reg, TEMP thread);
13823 ins_cost(300);
13824 format %{ "FASTUNLOCK $object,$eax_reg\t! kills $eax_reg,$tmp" %}
13825 ins_encode %{
13826 __ get_thread($thread$$Register);
13827 __ fast_unlock_lightweight($object$$Register, $eax_reg$$Register, $tmp$$Register, $thread$$Register);
13828 %}
13829 ins_pipe(pipe_slow);
13830 %}
13831
13832 instruct mask_all_evexL_LT32(kReg dst, eRegL src) %{
13833 predicate(Matcher::vector_length(n) <= 32);
13834 match(Set dst (MaskAll src));
13835 format %{ "mask_all_evexL_LE32 $dst, $src \t" %}
13836 ins_encode %{
13837 int mask_len = Matcher::vector_length(this);
13838 __ vector_maskall_operation($dst$$KRegister, $src$$Register, mask_len);
13839 %}
13840 ins_pipe( pipe_slow );
13841 %}
13842
13843 instruct mask_all_evexL_GT32(kReg dst, eRegL src, kReg ktmp) %{
13844 predicate(Matcher::vector_length(n) > 32);
13845 match(Set dst (MaskAll src));
13846 effect(TEMP ktmp);
13847 format %{ "mask_all_evexL_GT32 $dst, $src \t! using $ktmp as TEMP " %}
13848 ins_encode %{
13849 int mask_len = Matcher::vector_length(this);
13850 __ vector_maskall_operation32($dst$$KRegister, $src$$Register, $ktmp$$KRegister, mask_len);
13851 %}
|