< prev index next >

src/hotspot/cpu/ppc/ppc.ad

Print this page
*** 12134,13 ***
  %}
  
  // inlined locking and unlocking
  
  instruct cmpFastLock(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2) %{
    match(Set crx (FastLock oop box));
    effect(TEMP tmp1, TEMP tmp2);
-   predicate(!Compile::current()->use_rtm());
  
    format %{ "FASTLOCK  $oop, $box, $tmp1, $tmp2" %}
    ins_encode %{
      __ compiler_fast_lock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
                                   $tmp1$$Register, $tmp2$$Register, /*tmp3*/ R0);
--- 12134,13 ---
  %}
  
  // inlined locking and unlocking
  
  instruct cmpFastLock(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2) %{
+   predicate(LockingMode != LM_LIGHTWEIGHT);
    match(Set crx (FastLock oop box));
    effect(TEMP tmp1, TEMP tmp2);
  
    format %{ "FASTLOCK  $oop, $box, $tmp1, $tmp2" %}
    ins_encode %{
      __ compiler_fast_lock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
                                   $tmp1$$Register, $tmp2$$Register, /*tmp3*/ R0);

*** 12149,57 ***
      // _complete_monitor_locking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
  %}
  
- // Separate version for TM. Use bound register for box to enable USE_KILL.
- instruct cmpFastLock_tm(flagsReg crx, iRegPdst oop, rarg2RegP box, iRegPdst tmp1, iRegPdst tmp2, iRegPdst tmp3) %{
-   match(Set crx (FastLock oop box));
-   effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, USE_KILL box);
-   predicate(Compile::current()->use_rtm());
- 
-   format %{ "FASTLOCK  $oop, $box, $tmp1, $tmp2, $tmp3 (TM)" %}
-   ins_encode %{
-     __ compiler_fast_lock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
-                                  $tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
-                                  _rtm_counters, _stack_rtm_counters,
-                                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
-                                  /*RTM*/ true, ra_->C->profile_rtm());
-     // If locking was successful, crx should indicate 'EQ'.
-     // The compiler generates a branch to the runtime call to
-     // _complete_monitor_locking_Java for the case where crx is 'NE'.
-   %}
-   ins_pipe(pipe_class_compare);
- %}
- 
  instruct cmpFastUnlock(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2, iRegPdst tmp3) %{
    match(Set crx (FastUnlock oop box));
    effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
-   predicate(!Compile::current()->use_rtm());
  
    format %{ "FASTUNLOCK  $oop, $box, $tmp1, $tmp2" %}
    ins_encode %{
      __ compiler_fast_unlock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
!                                    $tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
-                                    false);
      // If unlocking was successful, crx should indicate 'EQ'.
      // The compiler generates a branch to the runtime call to
      // _complete_monitor_unlocking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
  %}
  
! instruct cmpFastUnlock_tm(flagsReg crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2, iRegPdst tmp3) %{
    match(Set crx (FastUnlock oop box));
    effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
-   predicate(Compile::current()->use_rtm());
  
!   format %{ "FASTUNLOCK  $oop, $box, $tmp1, $tmp2 (TM)" %}
    ins_encode %{
!     __ compiler_fast_unlock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
!                                    $tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
-                                    /*RTM*/ true);
      // If unlocking was successful, crx should indicate 'EQ'.
      // The compiler generates a branch to the runtime call to
      // _complete_monitor_unlocking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
--- 12149,51 ---
      // _complete_monitor_locking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
  %}
  
  instruct cmpFastUnlock(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2, iRegPdst tmp3) %{
+   predicate(LockingMode != LM_LIGHTWEIGHT);
    match(Set crx (FastUnlock oop box));
    effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
  
    format %{ "FASTUNLOCK  $oop, $box, $tmp1, $tmp2" %}
    ins_encode %{
      __ compiler_fast_unlock_object($crx$$CondRegister, $oop$$Register, $box$$Register,
!                                    $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
      // If unlocking was successful, crx should indicate 'EQ'.
      // The compiler generates a branch to the runtime call to
      // _complete_monitor_unlocking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
  %}
  
! instruct cmpFastLockLightweight(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2) %{
+   predicate(LockingMode == LM_LIGHTWEIGHT);
+   match(Set crx (FastLock oop box));
+   effect(TEMP tmp1, TEMP tmp2);
+ 
+   format %{ "FASTLOCK  $oop, $box, $tmp1, $tmp2" %}
+   ins_encode %{
+     __ fast_lock_lightweight($crx$$CondRegister, $oop$$Register, $box$$Register,
+                              $tmp1$$Register, $tmp2$$Register, /*tmp3*/ R0);
+     // If locking was successful, crx should indicate 'EQ'.
+     // The compiler generates a branch to the runtime call to
+     // _complete_monitor_locking_Java for the case where crx is 'NE'.
+   %}
+   ins_pipe(pipe_class_compare);
+ %}
+ 
+ instruct cmpFastUnlockLightweight(flagsRegCR0 crx, iRegPdst oop, iRegPdst box, iRegPdst tmp1, iRegPdst tmp2, iRegPdst tmp3) %{
+   predicate(LockingMode == LM_LIGHTWEIGHT);
    match(Set crx (FastUnlock oop box));
    effect(TEMP tmp1, TEMP tmp2, TEMP tmp3);
  
!   format %{ "FASTUNLOCK  $oop, $box, $tmp1, $tmp2" %}
    ins_encode %{
!     __ fast_unlock_lightweight($crx$$CondRegister, $oop$$Register, $box$$Register,
!                                $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
      // If unlocking was successful, crx should indicate 'EQ'.
      // The compiler generates a branch to the runtime call to
      // _complete_monitor_unlocking_Java for the case where crx is 'NE'.
    %}
    ins_pipe(pipe_class_compare);
< prev index next >