< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page
*** 13798,42 ***
    ins_pipe( pipe_jmp );
  %}
  
  // inlined locking and unlocking
  
! instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2) %{
    predicate(Compile::current()->use_rtm());
!   match(Set cr (FastLock object box));
!   effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box);
    ins_cost(300);
    format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, $cx2$$Register,
                   _rtm_counters, _stack_rtm_counters,
                   ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
                   true, ra_->C->profile_rtm());
    %}
    ins_pipe(pipe_slow);
  %}
  
! instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr) %{
    predicate(!Compile::current()->use_rtm());
!   match(Set cr (FastLock object box));
!   effect(TEMP tmp, TEMP scr, USE_KILL box);
    ins_cost(300);
    format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, noreg, noreg, NULL, NULL, NULL, false, false);
    %}
    ins_pipe(pipe_slow);
  %}
  
  instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
!   match(Set cr (FastUnlock object box));
!   effect(TEMP tmp, USE_KILL box);
    ins_cost(300);
    format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
    ins_encode %{
      __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
    %}
--- 13798,44 ---
    ins_pipe( pipe_jmp );
  %}
  
  // inlined locking and unlocking
  
! instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2, eRegP thread) %{
    predicate(Compile::current()->use_rtm());
!   match(Set cr (FastLock object));
!   effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, TEMP box, TEMP thread);
    ins_cost(300);
    format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
    ins_encode %{
+     __ get_thread($thread$$Register);
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, $cx2$$Register, $thread$$Register,
                   _rtm_counters, _stack_rtm_counters,
                   ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
                   true, ra_->C->profile_rtm());
    %}
    ins_pipe(pipe_slow);
  %}
  
! instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr, rRegI cx1, eRegP thread) %{
    predicate(!Compile::current()->use_rtm());
!   match(Set cr (FastLock object));
!   effect(TEMP tmp, TEMP scr, TEMP box, TEMP cx1, TEMP thread);
    ins_cost(300);
    format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
    ins_encode %{
+     __ get_thread($thread$$Register);
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, noreg, $thread$$Register, NULL, NULL, NULL, false, false);
    %}
    ins_pipe(pipe_slow);
  %}
  
  instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
!   match(Set cr (FastUnlock object));
!   effect(TEMP tmp, TEMP box);
    ins_cost(300);
    format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
    ins_encode %{
      __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
    %}
< prev index next >