harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r548715 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
Date Tue, 19 Jun 2007 13:06:57 GMT
Author: mfursov
Date: Tue Jun 19 06:06:55 2007
New Revision: 548715

URL: http://svn.apache.org/viewvc?view=rev&rev=548715
Log:
Fix for regression introduced by H2092 commit.


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

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?view=diff&rev=548715&r1=548714&r2=548715
==============================================================================
--- 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 Tue Jun 19 06:06:55 2007
@@ -362,6 +362,13 @@
                     // read the field
                     cmpxchg8b(true, gr4);
                     vpush2(eax, edx);
+                    
+                    //TODO: do not mark registers as global, restore old value here!
+                    if (is_callee_save(gr0)) m_global_rusage.set(ar_idx(gr0));
+                    if (is_callee_save(gr1)) m_global_rusage.set(ar_idx(gr1));
+                    if (is_callee_save(gr2)) m_global_rusage.set(ar_idx(gr2));
+                    if (is_callee_save(gr3)) m_global_rusage.set(ar_idx(gr3));
+                    if (is_callee_save(gr4)) m_global_rusage.set(ar_idx(gr4));
                 } else {
                     Opnd where_hi(jt, where.base(), where.disp()+4, 
                                       where.index(), where.scale());
@@ -418,7 +425,6 @@
            ((!fieldOp.fld) || field_is_volatile(fieldOp.fld))) {
             Val& val = vstack(0);
             Val& val_hi = vstack(1);
-
             // prepare address
             freeReg(gr4); // ESI
             lea(gr4,where);
@@ -440,6 +446,14 @@
             cmpxchg8b(true, gr4);
             unsigned br_off = br(nz, 0, 0);
             patch(br_off, ip(_loop));
+
+            //TODO: do not mark registers as global, restore old value here!
+            if (is_callee_save(gr0)) m_global_rusage.set(ar_idx(gr0));
+            if (is_callee_save(gr1)) m_global_rusage.set(ar_idx(gr1));
+            if (is_callee_save(gr2)) m_global_rusage.set(ar_idx(gr2));
+            if (is_callee_save(gr3)) m_global_rusage.set(ar_idx(gr3));
+            if (is_callee_save(gr4)) m_global_rusage.set(ar_idx(gr4));
+
         } else {
             Val& val = vstack(0, vis_mem(0));
             do_mov(where, val, fieldIsMagic);



Mime
View raw message