harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r588504 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32: Ia32InstCodeSelector.cpp Ia32InstCodeSelector.h
Date Fri, 26 Oct 2007 04:05:51 GMT
Author: varlax
Date: Thu Oct 25 21:05:51 2007
New Revision: 588504

URL: http://svn.apache.org/viewvc?rev=588504&view=rev
Log:
Fixed HARMONY-4991[drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

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

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?rev=588504&r1=588503&r2=588504&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
Thu Oct 25 21:05:51 2007
@@ -244,9 +244,9 @@
 
 //_______________________________________________________________________________________________________________
 //    Copy any kind of the operand
-void InstCodeSelector::copyOpnd(Opnd *dst, Opnd *src) 
+void InstCodeSelector::copyOpnd(Opnd *dst, Opnd *src, bool doZeroExtension) 
 { 
-    convert(src, dst->getType(), dst);
+    convert(src, dst->getType(), dst, doZeroExtension);
 }
 
 
@@ -1895,29 +1895,25 @@
                                                 Opnd * baseTau,
                                                 Opnd * offsetTau) 
 {
-#ifndef _EM64T_
-    Opnd * opnd = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
-    Opnd * dst = irManager.newOpnd(dstType);
-    copyOpnd(dst, opnd);
-    return dst;
-#else
+#ifdef _EM64T_
     if(memType > Type::Float && memType!=Type::UnmanagedPtr) {
         Opnd * opnd = irManager.newMemOpndAutoKind(typeManager.getInt32Type(), addr);
-        Opnd * tmp =  irManager.newOpnd(typeManager.getInt32Type());
         Opnd * dst = irManager.newOpnd(typeManager.getInt64Type());
-        appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, dst, irManager.newImmOpnd(typeManager.getInt64Type(),0)));
-        appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, tmp, opnd));
-        copyOpnd(dst, tmp);
+        // loading compressed 32-bit managed address, ensure zero-extention
+        copyOpnd(dst, opnd, true);
+        // uncompress
         Type* unmanagedPtrType = typeManager.getUnmanagedPtrType(typeManager.getInt8Type());
         dst = simpleOp_I8(Mnemonic_ADD, dstType, dst, irManager.newImmOpnd(unmanagedPtrType,
(POINTER_SIZE_INT)VMInterface::getHeapBase()));
         return dst;
-    } else {
+    } 
+    else 
+#endif
+    {
         Opnd * opnd = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
         Opnd * dst = irManager.newOpnd(dstType);
         copyOpnd(dst, opnd);
         return dst;
     }
-#endif
 }
 
 //_______________________________________________________________________________________________________________

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h?rev=588504&r1=588503&r2=588504&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h
Thu Oct 25 21:05:51 2007
@@ -321,7 +321,7 @@
     
     bool    isIntegerType(Type * type)
     { return type->isInteger()||type->isBoolean()||type->isChar(); }
-    void    copyOpnd(Opnd *dst, Opnd *src);
+    void    copyOpnd(Opnd *dst, Opnd *src, bool doZeroExtension=false);
     void    copyOpndTrivialOrTruncatingConversion(Opnd *dst, Opnd *src);
 
     Opnd * convert(CG_OpndHandle * oph, Type * dstType, Opnd * dstOpnd=NULL, bool isZeroExtend=false);



Mime
View raw message