harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r526728 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Date Mon, 09 Apr 2007 12:26:36 GMT
Author: varlax
Date: Mon Apr  9 05:26:36 2007
New Revision: 526728

URL: http://svn.apache.org/viewvc?view=rev&rev=526728
Log:
Applied HARMONY-3571 [drlvm][em64t] Jitrino.OPT emits incorrect code for instanceof bytecode

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp?view=diff&rev=526728&r1=526727&r2=526728
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Mon Apr  9 05:26:36 2007
@@ -2225,8 +2225,8 @@
 
         newFallthroughBlock();
 
-        Opnd * zero = irBuilder.genLdConstant((int32)0);
-        irBuilder.genBranch(Type::IntPtr,Cmp_EQ,ObjIsNullLabel,zero,src);        
+        Opnd * nullObj = irBuilder.genLdNull();
+        irBuilder.genBranch(Type::IntPtr, Cmp_EQ, ObjIsNullLabel, nullObj, src);        
 
         // src is not null here
         newFallthroughBlock();
@@ -2239,6 +2239,7 @@
         // src is null, instanceOf returns 0
         irBuilder.genLabel(ObjIsNullLabel);
         cfgBuilder.genBlockAfterCurrent(ObjIsNullLabel);
+        Opnd * zero = irBuilder.genLdConstant((int32)0);
         irBuilder.genStVar(resVar, zero);
         irBuilder.genJump(Exit);
 



Mime
View raw message