harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r645888 - in /harmony/enhanced/drlvm/trunk/vm: jitrino/src/codegenerator/ia32/ jitrino/src/optimizer/ port/src/encoder/ia32_em64t/
Date Tue, 08 Apr 2008 12:55:34 GMT
Author: varlax
Date: Tue Apr  8 05:55:32 2008
New Revision: 645888

URL: http://svn.apache.org/viewvc?rev=645888&view=rev
Log:
Applied HARMONY-5480 [drlvm][jit] Some of java.lang.Math methods could be implemented by api_magics

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32APIMagics.cpp Tue Apr
 8 05:55:32 2008
@@ -63,6 +63,7 @@
 
     void   convertIntToInt(Opnd* dst, Opnd* src, Node* node);
     Opnd*  addElemIndexWithLEA(Opnd* array, Opnd* index, RegName dstRegName, Node* node);
+    Opnd*   getOpnd(Opnd* arg);
 
     IRManager* irm;
     CallInst* callInst;
@@ -80,10 +81,27 @@
     virtual void run();\
 };\
 
+enum Math_function {SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, LOG, LOG10, LOG1P, ABS, SQRT};\
+ 
+#define DECLARE_HELPER_INLINER_MATH(name)\
+class name : public APIMagicHandler {\
+public:\
+    enum Math_function func;\
+    Mnemonic mnemonic;\
+    name (IRManager* irm, CallInst* inst, MethodDesc* md, enum Math_function f, Mnemonic
mn = Mnemonic_NULL)\
+    : APIMagicHandler(irm, inst, md){name::func = f; name::mnemonic = mn;}\
+    \
+    virtual void run();\
+}\
+
+
 DECLARE_HELPER_INLINER(Integer_numberOfLeadingZeros_Handler_x_I_x_I);
 DECLARE_HELPER_INLINER(Integer_numberOfTrailingZeros_Handler_x_I_x_I);
 DECLARE_HELPER_INLINER(Long_numberOfLeadingZeros_Handler_x_J_x_I);
 DECLARE_HELPER_INLINER(Long_numberOfTrailingZeros_Handler_x_J_x_I);
+
+DECLARE_HELPER_INLINER_MATH(Math_Handler_x_D_x_D);
+
 DECLARE_HELPER_INLINER(System_arraycopyDirect_Handler);
 DECLARE_HELPER_INLINER(System_arraycopyReverse_Handler);
 DECLARE_HELPER_INLINER(String_compareTo_Handler_x_String_x_I);
@@ -93,6 +111,7 @@
 void APIMagicsHandlerSession::runImpl() {
     CompilationContext* cc = getCompilationContext();
     MemoryManager tmpMM("Inline API methods");
+    bool mathAsMagic = getBoolArg("magic_math", true);
     //finding all api magic calls
     IRManager* irm = cc->getLIRManager();
     ControlFlowGraph* fg = irm->getFlowGraph();
@@ -131,6 +150,50 @@
                             } else if (!strcmp(methodName, "numberOfTrailingZeros") &&
!strcmp(signature, "(J)I")) {
                                 handlers.push_back(new (tmpMM) Long_numberOfTrailingZeros_Handler_x_J_x_I(irm,
callInst, md));
                             }
+                        } else if (mathAsMagic && !strcmp(className, "java/lang/Math"))
{
+                            if (!strcmp(signature, "(D)D")) { 
+                                if (!strcmp(methodName, "sqrt")) {                      
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, SQRT, Mnemonic_FSQRT)); 
+                                } 
+                                if (!strcmp(methodName, "sin")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, SIN, Mnemonic_FSIN)); 
+                                }      
+                                if (!strcmp(methodName, "cos")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, COS, Mnemonic_FCOS)); 
+                                } 
+                                if (!strcmp(methodName, "abs")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ABS, Mnemonic_FABS)); 
+                                }
+                                if (!strcmp(methodName, "tan")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, TAN, Mnemonic_FPTAN)); 
+                                } 
+                                if (!strcmp(methodName, "log")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, LOG, Mnemonic_FLDLN2)); 
+                                }       
+                                if (!strcmp(methodName, "log10")) {                     
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, LOG10, Mnemonic_FLDLG2)); 
+                                }
+                                if (!strcmp(methodName, "log1p")) {                     
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, LOG1P, Mnemonic_FLDLN2)); 
+                                }       
+                                if (!strcmp(methodName, "atan")) {                      
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ATAN)); 
+                                }
+                                if (!strcmp(methodName, "atan2")) {                     
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ATAN2)); 
+                                }
+                                if (!strcmp(methodName, "asin")) {                      
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ASIN)); 
+                                }
+                                if (!strcmp(methodName, "acos")) {                      
             
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ACOS)); 
+                                }
+                            } else {
+                                if (!strcmp(methodName, "abs")) {                       
            
+                                       handlers.push_back(new (tmpMM) Math_Handler_x_D_x_D(irm,
callInst, md, ABS, Mnemonic_FABS)); 
+                                }
+                            }                                                           
                                                                                         
        
+                                
                         }
 #endif
                     } else if( ri->getKind() == Opnd::RuntimeInfo::Kind_InternalHelperAddress
) {
@@ -188,6 +251,72 @@
 
     callInst->unlink();
 }
+
+void Math_Handler_x_D_x_D::run() {
+     Opnd* arg = getCallSrc(callInst, 0);
+     Opnd* res = getCallDst(callInst);
+     
+     Opnd* fp0 = getOpnd(arg);        
+     Node* node = callInst->getNode();
+     switch (func) {
+         case SQRT: case SIN: case COS: case ABS: case TAN:  
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));              
 
+             node->appendInst(irm->newInst(mnemonic, fp0));             
+             if (func == TAN) {
+                 node->appendInst(irm->newInst(Mnemonic_FSTP, res, fp0));    
+             }                                                                        
+             break;
+         case LOG: case LOG10: case LOG1P:
+             node->appendInst(irm->newInst(mnemonic, fp0));
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));
+             if (func == LOG1P) {
+                 node->appendInst(irm->newInst(Mnemonic_FLD1, fp0));
+                 node->appendInst(irm->newInst(Mnemonic_FADDP, fp0));          
+             }                 
+             node->appendInst(irm->newInst(Mnemonic_FYL2X, fp0));        
+             break;
+         case ATAN: case ATAN2:
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));              
  
+             if (func == ATAN2) {
+                 node->appendInst(irm->newInst(Mnemonic_FLD, fp0, 
+                                               getCallSrc(callInst, 1))); 
+                 node->appendInst(irm->newInst(Mnemonic_FDIVP, fp0));         
+             } 
+             node->appendInst(irm->newInst(Mnemonic_FLD1, fp0));                 
+             node->appendInst(irm->newInst(Mnemonic_FPATAN, fp0));        
+             break;
+         case ASIN: case ACOS:
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));         
+             node->appendInst(irm->newInst(Mnemonic_FLD1, fp0));                 
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));
+             node->appendInst(irm->newInst(Mnemonic_FLD, fp0, arg));              
      
+             node->appendInst(irm->newInst(Mnemonic_FMULP, fp0));        
+             node->appendInst(irm->newInst(Mnemonic_FSUBP, fp0));         
+             node->appendInst(irm->newInst(Mnemonic_FSQRT, fp0)); 
+             if (func == ACOS) {
+                 node->appendInst(irm->newInst(Mnemonic_FXCH, fp0));     
+             }
+             node->appendInst(irm->newInst(Mnemonic_FPATAN, fp0));        
+             break;
+         default: assert(0);
+     } 
+     node->appendInst(irm->newInst(Mnemonic_FSTP, res, fp0));
+     callInst->unlink();
+}                                      
+
+
+Opnd* APIMagicHandler::getOpnd(Opnd* arg) {
+     if (arg->getSize() == OpndSize_64) {
+         Opnd * fp0Op64 = irm->newOpnd(irm->getTypeManager().getDoubleType(), RegName_FP0D);
       
+         fp0Op64->assignRegName(RegName_FP0D);
+         return fp0Op64;
+     } else {
+         Opnd * fp0Op32 = irm->newOpnd(irm->getTypeManager().getSingleType(), RegName_FP0S);
       
+         fp0Op32->assignRegName(RegName_FP0S);        
+         return fp0Op32;
+        
+     }
+}                                                                                       
                        
 
 void Integer_numberOfTrailingZeros_Handler_x_I_x_I::run() {
     //mov r2,32

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Inst.h Tue Apr  8 05:55:32
2008
@@ -756,7 +756,15 @@
            m==Mnemonic_POPFD  ||
            m==Mnemonic_PUSHFD ||
            m==Mnemonic_POP    ||
-           m==Mnemonic_PUSH   )
+           m==Mnemonic_PUSH   ||
+           m==Mnemonic_FSTP   ||
+           m==Mnemonic_FST    ||
+           m==Mnemonic_FIST   ||
+           m==Mnemonic_FLD    ||
+           m==Mnemonic_FILD   || 
+           m==Mnemonic_FLDLN2 ||
+           m==Mnemonic_FLDLG2 ||
+           m==Mnemonic_FLD1   )
         {
             return true;
         }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp Tue Apr  8 05:55:32
2008
@@ -134,6 +134,25 @@
             _inlineSkipMethodTable->add_method_record("java/lang/Integer", "numberOfTrailingZeros",
"(I)I", des, false);
             _inlineSkipMethodTable->add_method_record("java/lang/Long", "numberOfLeadingZeros",
"(J)I", des, false);
             _inlineSkipMethodTable->add_method_record("java/lang/Long", "numberOfTrailingZeros",
"(J)I", des, false);
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "sqrt", "(D)D",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "sin", "(D)D",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "cos", "(D)D",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "abs", "(J)J",
des, false);
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "abs", "(I)I",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "abs", "(J)J",
des, false);
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "abs", "(F)F",
des, false);            
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "abs", "(D)D",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "tan", "(D)D",
des, false);           
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "atan", "(D)D",
des, false);  
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "atan2", "(D)D",
des, false);  
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "asin", "(D)D",
des, false); 
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "acos", "(D)D",
des, false);                         
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "log", "(D)D",
des, false);           
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "log10", "(D)D",
des, false);           
+            _inlineSkipMethodTable->add_method_record("java/lang/Math", "log1p", "(D)D",
des, false);           
+
+
+            
 
 #endif
             if(argSource->getBoolArg("System_arraycopy_as_magic",true)) {

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h Tue Apr  8 05:55:32
2008
@@ -478,6 +478,7 @@
 Mnemonic_FADD,                        
 Mnemonic_FSUBP,                        
 Mnemonic_FSUB,                        
+Mnemonic_FISUB,
 Mnemonic_FMUL,                        
 Mnemonic_FMULP,                        
 Mnemonic_FDIVP,                        
@@ -490,6 +491,10 @@
 //Mnemonic_FDECSTP,                     // Decrement Stack-Top Pointer
 Mnemonic_FILD,                          // Load Integer
 Mnemonic_FLD,                           // Load Floating Point Value
+Mnemonic_FLDLG2,
+Mnemonic_FLDLN2,
+Mnemonic_FLD1,
+
 Mnemonic_FCLEX,                         // Clear Exceptions
 Mnemonic_FCHS,                          // Change sign of ST0
 Mnemonic_FNCLEX,                        // Clear Exceptions
@@ -502,6 +507,17 @@
 Mnemonic_FPREM1,                        // Partial Remainder
 Mnemonic_FST,                           // Store Floating Point Value
 Mnemonic_FSTP,                          // Store Floating Point Value and pop the FP stack
+Mnemonic_FSQRT,                         //Computes the square root of the source value in
the stack and pop the FP stack
+Mnemonic_FABS,                          //Computes the absolute value of the source value
in the stack and pop the FP stack
+Mnemonic_FSIN,                          //Computes the sine of the source value in the stack
and pop the FP stack
+Mnemonic_FCOS,                          //Computes the cosine of the source value in the
stack and pop the FP stack
+Mnemonic_FPTAN,                         //Computes the tangent of the source value in the
stack and pop the FP stack
+Mnemonic_FYL2X,
+Mnemonic_FYL2XP1,
+Mnemonic_F2XM1,
+Mnemonic_FPATAN,
+Mnemonic_FXCH,
+Mnemonic_FSCALE,
 
 Mnemonic_XCHG,
 Mnemonic_DIV,                           // Unsigned Divide

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp Tue Apr  8 05:55:32
2008
@@ -618,10 +618,10 @@
                  ***** FPU operations *****
 ****************************************************************************/
 
-BEGIN_MNEMONIC(FADDP, MF_NONE, U )
+BEGIN_MNEMONIC(FADDP, MF_NONE, DU )
 BEGIN_OPCODES()
-    {OpcodeInfo::all, {0xDE, 0xC1},       {FP0D, FP1D}, DU_U },
-    {OpcodeInfo::all, {0xDE, 0xC1},       {FP0S, FP1S}, DU_U },
+    {OpcodeInfo::all, {0xDE, 0xC1},       {FP0D}, DU },
+    {OpcodeInfo::all, {0xDE, 0xC1},       {FP0S}, DU },
 END_OPCODES()
 END_MNEMONIC()
     
@@ -639,10 +639,10 @@
 END_OPCODES()
 END_MNEMONIC()
     
-BEGIN_MNEMONIC(FSUBP, MF_NONE, U )                       
+BEGIN_MNEMONIC(FSUBP, MF_NONE, DU )                       
 BEGIN_OPCODES()
-    {OpcodeInfo::all, {0xDE, 0xE9},       {FP0D, FP1D}, DU_U },
-    {OpcodeInfo::all, {0xDE, 0xE9},       {FP0S, FP1S}, DU_U },
+    {OpcodeInfo::all, {0xDE, 0xE9},       {FP0D}, DU },
+    {OpcodeInfo::all, {0xDE, 0xE9},       {FP0S}, DU },
 END_OPCODES()
 END_MNEMONIC()
     
@@ -652,6 +652,15 @@
     {OpcodeInfo::all, {0xD8, _4},       {FP0S, m32}, DU_U },
 END_OPCODES()
 END_MNEMONIC()
+
+BEGIN_MNEMONIC(FISUB,   MF_NONE, U )                     
+BEGIN_OPCODES()
+    {OpcodeInfo::all, {0xDA, _4},       {FP0S, m32}, DU_U },
+//    {OpcodeInfo::all, {0xDE, _4},       {FP0S, m16}, DU_U },
+END_OPCODES()
+END_MNEMONIC()
+
+
     
 BEGIN_MNEMONIC(FMUL,   MF_NONE, DU_U )                     
 BEGIN_OPCODES()
@@ -660,17 +669,17 @@
 END_OPCODES()
 END_MNEMONIC()
     
-BEGIN_MNEMONIC(FMULP, MF_NONE, U )                       
+BEGIN_MNEMONIC(FMULP, MF_NONE, DU )                       
 BEGIN_OPCODES()
-    {OpcodeInfo::all, {0xDE, 0xC9},       {FP0D, FP1D}, DU_U },
-    {OpcodeInfo::all, {0xDE, 0xC9},       {FP0S, FP1S}, DU_U },
+    {OpcodeInfo::all, {0xDE, 0xC9},       {FP0D}, DU }, 
+    {OpcodeInfo::all, {0xDE, 0xC9},       {FP0S}, DU }, 
 END_OPCODES()
 END_MNEMONIC()
     
-BEGIN_MNEMONIC(FDIVP, MF_NONE, U )                       
+BEGIN_MNEMONIC(FDIVP, MF_NONE, DU )                       
 BEGIN_OPCODES()
-    {OpcodeInfo::all, {0xDE, 0xF9},       {FP0D, FP1D}, DU_U },
-    {OpcodeInfo::all, {0xDE, 0xF9},       {FP0S, FP1S}, DU_U },
+    {OpcodeInfo::all, {0xDE, 0xF9},       {FP0D}, DU },
+    {OpcodeInfo::all, {0xDE, 0xF9},       {FP0S}, DU },
 END_OPCODES()
 END_MNEMONIC()
     
@@ -785,6 +794,28 @@
 END_OPCODES()
 END_MNEMONIC()
 
+BEGIN_MNEMONIC(FLDLG2, MF_NONE, U )
+BEGIN_OPCODES()
+    {OpcodeInfo::all, {0xD9, 0xEC}, {FP0S},    D },
+    {OpcodeInfo::all, {0xD9, 0xEC}, {FP0D},    D },
+END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FLDLN2, MF_NONE, U )
+BEGIN_OPCODES()
+    {OpcodeInfo::all, {0xD9, 0xED}, {FP0S},    D },
+    {OpcodeInfo::all, {0xD9, 0xED}, {FP0D},    D }, 
+END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FLD1, MF_NONE, U )
+BEGIN_OPCODES()
+    {OpcodeInfo::all, {0xD9, 0xE8}, {FP0S},    D },
+    {OpcodeInfo::all, {0xD9, 0xE8}, {FP0D},    D }, 
+END_OPCODES()
+END_MNEMONIC()
+
+
 BEGIN_MNEMONIC(FPREM, MF_NONE, N)
   BEGIN_OPCODES()
           {OpcodeInfo::all, {0xD9, 0xF8},       {},     N },
@@ -820,6 +851,85 @@
     {OpcodeInfo::all,   {0xDD, 0xD8|_i},        {fp64},         D },
 END_OPCODES()
 END_MNEMONIC()
+
+BEGIN_MNEMONIC(FSQRT, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xFA},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xFA},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+
+BEGIN_MNEMONIC(FYL2X, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xF1},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xF1},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+
+BEGIN_MNEMONIC(FYL2XP1, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xF9},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xF9},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(F2XM1, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xF0},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xF0},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FPATAN, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xF3},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xF3},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FXCH, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xC9},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xC9},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FSCALE, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xFD},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xFD},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()    
+
+BEGIN_MNEMONIC(FABS, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xE1},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xE1},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FSIN, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xFE},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xFE},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FCOS, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xFF},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xFF},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()
+
+BEGIN_MNEMONIC(FPTAN, MF_NONE, DU)
+  BEGIN_OPCODES()
+          {OpcodeInfo::all, {0xD9, 0xF2},       {FP0S},     DU   },
+          {OpcodeInfo::all, {0xD9, 0xF2},       {FP0D},     DU   },
+  END_OPCODES()
+END_MNEMONIC()                    
 
 //
 // ~ FPU

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h?rev=645888&r1=645887&r2=645888&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h Tue Apr  8 05:55:32
2008
@@ -678,7 +678,6 @@
 ENCODER_DECLARE_EXPORT char * fprem(char * stream);
 ENCODER_DECLARE_EXPORT char * fprem1(char * stream);
 //!char *math_frndint(char * stream);
-//!char *math_fsqrt(char * stream);
 //!char *math_fptan(char * stream);
 
 //



Mime
View raw message