harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r595311 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet: cg.cpp cg_fld_arr.cpp
Date Thu, 15 Nov 2007 14:24:08 GMT
Author: mfursov
Date: Thu Nov 15 06:24:08 2007
New Revision: 595311

URL: http://svn.apache.org/viewvc?rev=595311&view=rev
Log:
Fix for HARMONY-5050 [drlvm][jit][jet] uncompressed mode enabling in Jitrino.JET

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp?rev=595311&r1=595310&r2=595311&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp Thu Nov 15 06:24:08 2007
@@ -222,12 +222,11 @@
             alu(alu_cmp, opnd, gr_null);
         }
         else {
-            assert(sizeof(void*)==4);
             assert(NULL_REF == 0);
             if (opnd.is_reg()) {
                 alu(alu_test, opnd, opnd);
-            }
-            else {
+            } else {
+                // There is no imm64 for cmp. But it is not a problem as we compare with
zero.
                 alu(alu_cmp, opnd, Opnd((int)(int_ptr)NULL_REF));
             }
         }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp?rev=595311&r1=595310&r2=595311&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp Thu Nov 15 06:24:08 2007
@@ -263,13 +263,6 @@
 
 void CodeGen::do_field_op(const FieldOpInfo& fieldOp)
 {
-    // Presumption: we dont have compressed refs on IA32 and all other 
-    // (64bits) platforms have compressed refs. 
-    // is_ia32() check added below so on IA32 it becomes 'false' during the 
-    // compilation, without access to g_refs_squeeze in runtime.
-    assert(is_ia32() || g_refs_squeeze);
-
-
     jtype jt = to_jtype(class_get_cp_field_type(fieldOp.enclClass, fieldOp.cpIndex));
     
     const char* fieldDescName = const_pool_get_field_descriptor(fieldOp.enclClass, fieldOp.cpIndex);
@@ -301,8 +294,8 @@
             // pop out ref
             vpop();
         }
-        if (!is_ia32() && g_refs_squeeze && (jt == jobj || fieldIsMagic))
{
-            if (fieldIsMagic) {
+        if ( jt == jobj || fieldIsMagic ) {
+            if (fieldIsMagic || !g_refs_squeeze) {
                 AR gr_ref = valloc(jobj);
                 rlock(gr_ref);
                 Opnd obj(jobj, gr_ref);
@@ -310,6 +303,7 @@
                 runlock(gr_ref);
                 vpush(obj);
             } else {
+                assert(!is_ia32());
                 AR gr_base = valloc(jobj);
                 rlock(gr_base);
                 AR gr_ref = valloc(jobj);
@@ -372,13 +366,14 @@
                           where.index(), where.scale());
         mov(where32, Opnd(ref));
     }
-    else if (!is_ia32() && g_refs_squeeze && (jt == jobj || fieldIsMagic))
{
+    else if ( jt == jobj || fieldIsMagic ) {
         // have the reference on a register
         Val& s0 = vstack(0, true);
         rlock(s0);
-        if (fieldIsMagic) {
+        if (fieldIsMagic || !g_refs_squeeze) {
             mov(where, s0.as_opnd());
         } else {
+            assert(!is_ia32());
             // compress the reference
             AR tmp = valloc(jobj);
             void * inv_base = (void*)-(int_ptr)OBJ_BASE;



Mime
View raw message