You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2007/04/03 13:45:06 UTC
svn commit: r525141 - in
/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32:
Ia32Constraint.cpp Ia32InstCodeSelector.cpp
Author: varlax
Date: Tue Apr 3 04:45:04 2007
New Revision: 525141
URL: http://svn.apache.org/viewvc?view=rev&rev=525141
Log:
Applied HARMONY-3470 [drlvm][jit][opt] avoid 64-bit to 32-bit value conversion though stack when storing compressed reference
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Constraint.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Constraint.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Constraint.cpp?view=diff&rev=525141&r1=525140&r2=525141
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Constraint.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Constraint.cpp Tue Apr 3 04:45:04 2007
@@ -114,13 +114,20 @@
uint32 newKind=kind, newMask=0;
uint32 newRegKind=newKind & OpndKind_Reg;
- if (newRegKind == OpndKind_GPReg || ( (newRegKind & OpndKind_GPReg) && sz <= OpndSize_16) ){
+ OpndSize maxSubregisterSize =
+#ifdef _EM64T_
+ OpndSize_32;
+#else
+ OpndSize_16;
+#endif
+
+ if (newRegKind == OpndKind_GPReg || ( (newRegKind & OpndKind_GPReg) && sz <= maxSubregisterSize) ){
#ifndef _EM64T_
if (sz==OpndSize_8 && (s==OpndSize_16 || s==OpndSize_32))
newMask=((mask>>4)|mask)&0xf;
else if (sz==OpndSize_16)
newMask=mask;
-#else
+#else // all registers on EM64T have respective subregisters
newMask=mask;
#endif
}else if (newRegKind==OpndKind_FPReg || newRegKind==OpndKind_XMMReg){
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=525141&r1=525140&r2=525141
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp Tue Apr 3 04:45:04 2007
@@ -1978,9 +1978,11 @@
Opnd* dst = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
copyOpnd(dst, src);
} else if(memType > Type::Float) {
- src = simpleOp_I8(Mnemonic_SUB, src->getType(), src, irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
+ Opnd * heap_base = irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
+ Opnd * compressed_src = irManager.newOpnd(typeManager.compressType(src->getType()));
Opnd * opnd = irManager.newMemOpndAutoKind(typeManager.compressType(src->getType()), addr);
- appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, opnd, src));
+ appendInsts(irManager.newInstEx(Mnemonic_SUB, 1, compressed_src, src, heap_base));
+ appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, opnd, compressed_src));
} else {
Opnd * dst = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
copyOpnd(dst, src);