< prev index next >

src/cpu/ppc/vm/templateTable_ppc_64.cpp

Print this page
rev 13142 : 8181809: PPC64: Leverage mtfprd/mffprd on POWER8
Reviewed-by: mdoerr, simonis
Contributed-by: Matthew Brandyberry <mbrandy@linux.vnet.ibm.com>

@@ -1470,17 +1470,17 @@
       break;
 
     case Bytecodes::_i2d:
       __ extsw(R17_tos, R17_tos);
     case Bytecodes::_l2d:
-      __ push_l_pop_d();
+      __ move_l_to_d();
       __ fcfid(F15_ftos, F15_ftos);
       break;
 
     case Bytecodes::_i2f:
       __ extsw(R17_tos, R17_tos);
-      __ push_l_pop_d();
+      __ move_l_to_d();
       if (VM_Version::has_fcfids()) { // fcfids is >= Power7 only
         // Comment: alternatively, load with sign extend could be done by lfiwax.
         __ fcfids(F15_ftos, F15_ftos);
       } else {
         __ fcfid(F15_ftos, F15_ftos);

@@ -1488,11 +1488,11 @@
       }
       break;
 
     case Bytecodes::_l2f:
       if (VM_Version::has_fcfids()) { // fcfids is >= Power7 only
-        __ push_l_pop_d();
+        __ move_l_to_d();
         __ fcfids(F15_ftos, F15_ftos);
       } else {
         // Avoid rounding problem when result should be 0x3f800001: need fixup code before fcfid+frsp.
         __ mr(R3_ARG1, R17_tos);
         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::l2f));

@@ -1512,20 +1512,20 @@
     case Bytecodes::_f2i:
       __ fcmpu(CCR0, F15_ftos, F15_ftos);
       __ li(R17_tos, 0); // 0 in case of NAN
       __ bso(CCR0, done);
       __ fctiwz(F15_ftos, F15_ftos);
-      __ push_d_pop_l();
+      __ move_d_to_l();
       break;
 
     case Bytecodes::_d2l:
     case Bytecodes::_f2l:
       __ fcmpu(CCR0, F15_ftos, F15_ftos);
       __ li(R17_tos, 0); // 0 in case of NAN
       __ bso(CCR0, done);
       __ fctidz(F15_ftos, F15_ftos);
-      __ push_d_pop_l();
+      __ move_d_to_l();
       break;
 
     default: ShouldNotReachHere();
   }
   __ bind(done);
< prev index next >