harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r513688 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32: Ia32IRManager.cpp Ia32InstCodeSelector.cpp
Date Fri, 02 Mar 2007 10:13:10 GMT
Author: varlax
Date: Fri Mar  2 02:13:09 2007
New Revision: 513688

URL: http://svn.apache.org/viewvc?view=rev&rev=513688
Log:
Applied HARMONY-3279 [drlvm][jit] Adding Address.fromLong vmmagic support to Jitrino.OPT
Tested on SLES10ia32, SLES9@x64

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp?view=diff&rev=513688&r1=513687&r2=513688
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Fri Mar
 2 02:13:09 2007
@@ -420,7 +420,7 @@
     inst->kind = Inst::Kind_I8PseudoInst;
     uint32 i=0;
     Opnd ** opnds = inst->getOpnds();
-    assert(opnd0->getType()->isInteger());
+    assert(opnd0->getType()->isInteger() ||opnd0->getType()->isPtr());
     if (opnd0!=NULL){       opnds[i] = opnd0; i++;
     if (opnd1!=NULL){       opnds[i] = opnd1; i++;
     if (opnd2!=NULL){       opnds[i] = opnd2; i++;
@@ -1340,6 +1340,10 @@
         case Type::Char:
             size = OpndSize_16;
             break;
+#ifndef _EM64T_
+        case Type::IntPtr:   
+        case Type::UIntPtr:   
+#endif
         case Type::Int32:   
         case Type::UInt32:
             size = OpndSize_32;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp?view=diff&rev=513688&r1=513687&r2=513688
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
Fri Mar  2 02:13:09 2007
@@ -268,7 +268,7 @@
 Opnd * InstCodeSelector::convertIntToInt(Opnd * srcOpnd, Type * dstType, Opnd * dstOpnd)
 {
     Type * srcType=srcOpnd->getType();
-    assert(isIntegerType(srcType) && isIntegerType(dstType));
+    assert(isIntegerType(srcType) && (isIntegerType(dstType) || dstType->isPtr()));
 
     OpndSize srcSize=irManager.getTypeSize(srcType);
     OpndSize dstSize=irManager.getTypeSize(dstType);
@@ -377,8 +377,10 @@
         dstOpnd = irManager.newOpnd(dstType);
     }
 
-    if (srcType->isObject() || srcType->isInteger()) {
+    if (srcType->isObject()) {
         appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, dstOpnd, srcOpnd));
+    } else if (srcType->isInteger()) {
+        convertIntToInt(srcOpnd, dstType, dstOpnd);
     } else {
         assert(0);
     }



Mime
View raw message