harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r562098 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H4595/ src/test/regression/H4595/Test.java src/test/regression/H4595/run.test.xml vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp vm/jitrino/src/jet/cg_regs.cpp
Date Thu, 02 Aug 2007 12:41:28 GMT
Author: mfursov
Date: Thu Aug  2 05:41:27 2007
New Revision: 562098

URL: http://svn.apache.org/viewvc?view=rev&rev=562098
Log:
Fix and regression test for HARMONY-4595
Fix for HARMONY-1874

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H4595/
    harmony/enhanced/drlvm/trunk/src/test/regression/H4595/Test.java
    harmony/enhanced/drlvm/trunk/src/test/regression/H4595/run.test.xml
Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H4595/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H4595/Test.java?view=auto&rev=562098
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H4595/Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H4595/Test.java Thu Aug  2 05:41:27 2007
@@ -0,0 +1,58 @@
+package org.apache.harmony.drlvm.tests.regression.h4595;
+
+import junit.framework.*;
+
+public class Test extends TestCase {
+
+
+/// test 1
+    class A {
+        void in(long l1, long l2, long l3){
+            assertEquals(10000002, l1);
+        }
+    }
+
+    XGraphics2D g2d = new XGraphics2D();
+    A a = new A();
+
+    public void test1() {
+        long l = get();
+        before(l);
+        a.in(g2d.display, g2d.drawable, g2d.imageGC);
+    }
+
+    long get(){return 4;}
+    void before(long l){ /*do nothing*/}
+
+
+
+
+/// test 2
+    public void test2() {
+        long[] x = new long[] { g2d.drawable};
+        //check that no exception is thrown
+    }
+
+/// test 3
+    
+    double d = 30d;
+    static Test t = new Test();
+    static long [] arr = new long [] {6, 25, 50};
+    
+    public void test3() {
+        double v = t3();
+        assertEquals(v, 5d);
+    }
+
+    double t3() {
+        double d1 = t.d / arr[0];
+        return d1;
+    }
+
+}
+
+class XGraphics2D {
+    long drawable = 10000001;
+    long display  = 10000002;
+    long imageGC  = 10000003;
+}

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H4595/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H4595/run.test.xml?view=auto&rev=562098
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H4595/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H4595/run.test.xml Thu Aug  2 05:41:27
2007
@@ -0,0 +1,9 @@
+<project name="RUN HARMONY-4514 Regression Test">
+    <target name="run-test">
+        <run-junit-test 
+            test="org.apache.harmony.drlvm.tests.regression.h4595.Test"
+            vmarg="-Xem:jet">
+        </run-junit-test>
+    </target>
+</project>
+

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=562098&r1=562097&r2=562098
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
Thu Aug  2 05:41:27 2007
@@ -1581,7 +1581,8 @@
     appendInsts(irManager.newRuntimeHelperCallInst(
                 CompilationInterface::Helper_IsValidElemType, lengthof(args), args, flag));
 
-    bzero(CompareZeroOp::Ref, flag);
+    // the helper returns boolean value
+    bzero(CompareZeroOp::I4, flag);
     codeSelector.genTrueEdge(currentBasicBlock, throwBasicBlock, 0);
 
     return getTauUnsafe();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp?view=diff&rev=562098&r1=562097&r2=562098
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp Thu Aug  2 05:41:27 2007
@@ -164,7 +164,10 @@
     for (unsigned i=0; is_gr(ar) && i<m_jframe->size(); i++) {
         Val& s = m_jframe->dip(i);
         if (!s.is_mem() || !s.uses(ar)) { continue; };
-        bool need_double_slot = is_ia32() && is_wide(s.jt());
+        
+        //WARN: both slots for i64 type have register assigned, but for dbl64 - only first
slot is marked..
+        bool need_double_slot = is_ia32() && s.jt()==dbl64; 
+        
         push(s.as_opnd(iplatf));
         if (need_double_slot) {
             Opnd hi_mem(iplatf, s.base(), s.disp() + STACK_SLOT_SIZE, s.index(), s.scale());
@@ -502,7 +505,7 @@
     assert(op_lo.jt() != jvoid && is_big(op_lo.jt()));
     assert(op_hi.jt() != jvoid && is_big(op_hi.jt()));
     assert(op_hi.jt() == op_lo.jt());
-    // not a big problem, just a self-check - this is expected usage sheme
+    // not a big problem, just a self-check - this is expected usage scheme
     //assert(op_hi.kind() == op_lo.kind());
     
     m_jframe->push(op_lo.jt());



Mime
View raw message