< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page

13763 // inlined locking and unlocking
13764 
13765 instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2, eRegP thread) %{
13766   predicate(Compile::current()->use_rtm());
13767   match(Set cr (FastLock object box));
13768   effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box, TEMP thread);
13769   ins_cost(300);
13770   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
13771   ins_encode %{
13772     __ get_thread($thread$$Register);
13773     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13774                  $scr$$Register, $cx1$$Register, $cx2$$Register, $thread$$Register,
13775                  _rtm_counters, _stack_rtm_counters,
13776                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
13777                  true, ra_->C->profile_rtm());
13778   %}
13779   ins_pipe(pipe_slow);
13780 %}
13781 
13782 instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr, eRegP thread) %{
13783   predicate(!Compile::current()->use_rtm());
13784   match(Set cr (FastLock object box));
13785   effect(TEMP tmp, TEMP scr, USE_KILL box, TEMP thread);
13786   ins_cost(300);
13787   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
13788   ins_encode %{
13789     __ get_thread($thread$$Register);
13790     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13791                  $scr$$Register, noreg, noreg, $thread$$Register, nullptr, nullptr, nullptr, false, false);
13792   %}
13793   ins_pipe(pipe_slow);
13794 %}
13795 
13796 instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{

13797   match(Set cr (FastUnlock object box));
13798   effect(TEMP tmp, USE_KILL box);
13799   ins_cost(300);
13800   format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
13801   ins_encode %{
13802     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
13803   %}
13804   ins_pipe(pipe_slow);
13805 %}
13806 


























13807 instruct mask_all_evexL_LT32(kReg dst, eRegL src) %{
13808   predicate(Matcher::vector_length(n) <= 32);
13809   match(Set dst (MaskAll src));
13810   format %{ "mask_all_evexL_LE32 $dst, $src \t" %}
13811   ins_encode %{
13812     int mask_len = Matcher::vector_length(this);
13813     __ vector_maskall_operation($dst$$KRegister, $src$$Register, mask_len);
13814   %}
13815   ins_pipe( pipe_slow );
13816 %}
13817 
13818 instruct mask_all_evexL_GT32(kReg dst, eRegL src, kReg ktmp) %{
13819   predicate(Matcher::vector_length(n) > 32);
13820   match(Set dst (MaskAll src));
13821   effect(TEMP ktmp);
13822   format %{ "mask_all_evexL_GT32 $dst, $src \t! using $ktmp as TEMP " %}
13823   ins_encode %{
13824     int mask_len = Matcher::vector_length(this);
13825     __ vector_maskall_operation32($dst$$KRegister, $src$$Register, $ktmp$$KRegister, mask_len);
13826   %}

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