harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r511551 - in /harmony/enhanced/drlvm/trunk/vm: interpreter/src/ port/src/encoder/ia32_em64t/ port/src/lil/em64t/pim/ vmcore/src/util/em64t/base/
Date Sun, 25 Feb 2007 17:02:43 GMT
Author: gshimansky
Date: Sun Feb 25 09:02:43 2007
New Revision: 511551

URL: http://svn.apache.org/viewvc?view=rev&rev=511551
Log:
Applied HARMONY-3237 [drlvm][winx64][build] Fixed warnings in interpreter.
Applied HARMONY-3198 [drlvm] several uncertain changes need careful review

Tests passed on Ubuntu6 x86, Gentoo x86, Windows XP x86, SuSE9 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?view=diff&rev=511551&r1=511550&r2=511551
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Sun Feb 25 09:02:43 2007
@@ -2169,7 +2169,8 @@
 
 static inline void
 Opcode_JSR(StackFrame& frame) {
-    uint32 retAddr = frame.ip + 3 - (uint8*)frame.method->get_byte_code_addr();
+    uint32 retAddr = (uint32)(frame.ip + 3 -
+        (uint8*)frame.method->get_byte_code_addr());
     frame.stack.push();
     frame.stack.pick().u = retAddr;
     frame.stack.ref() = FLAG_RET_ADDR;
@@ -2179,7 +2180,8 @@
 
 static inline void
 Opcode_JSR_W(StackFrame& frame) {
-    uint32 retAddr = frame.ip + 5 - (uint8*)frame.method->get_byte_code_addr();
+    uint32 retAddr = (uint32)(frame.ip + 5 -
+        (uint8*)frame.method->get_byte_code_addr());
     frame.stack.push();
     frame.stack.pick().u = retAddr;
     frame.stack.ref() = FLAG_RET_ADDR;
@@ -2321,7 +2323,7 @@
             << m->get_name()->bytes
             << m->get_descriptor()->bytes << endl);
 
-    uint32 ip = frame.ip - (uint8*)m->get_byte_code_addr();
+    uint32 ip = (uint32)(frame.ip - (uint8*)m->get_byte_code_addr());
     DEBUG_BYTECODE("ip = " << dec << (int)ip << endl);
 
     // When VM is in shutdown stage we need to execute final block to
@@ -2418,7 +2420,7 @@
         Class *c = m->get_class();
         int line = -2;
         if ( !m->is_native() ) {
-            int ip = (uint8*)frame.ip - (uint8*)m->get_byte_code_addr();
+            int ip = (int)((uint8*)frame.ip - (uint8*)m->get_byte_code_addr());
             line = m->get_line_number((uint16)ip);
         }
 #ifdef INTERPRETER_DEEP_DEBUG

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h?view=diff&rev=511551&r1=511550&r2=511551
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h Sun Feb 25 09:02:43
2007
@@ -288,11 +288,8 @@
     R_Opnd(Reg_No r): RM_Opnd(Reg), _reg_no(r) {}
     Reg_No  reg_no() const { return _reg_no; }
 
-// TODO: couldn't compile with "private:" under windows/em64t
-#if !defined(_EM64T_) || !defined(_WIN64)
 private:
     // disallow copying
-#endif
     R_Opnd(const R_Opnd &): RM_Opnd(Reg) { assert(false); }
 };
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp?view=diff&rev=511551&r1=511550&r2=511551
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp Sun
Feb 25 09:02:43 2007
@@ -803,7 +803,8 @@
         assert(src->kind == LLK_Gr || src->kind == LLK_GStk);
 
         const Tmp_GR_Opnd tmp_reg(context, ic);
-        const R_Opnd & dest_reg = (dest->kind == LLK_Gr ? get_r_opnd(dest) : tmp_reg);
+        const R_Opnd & dest_reg =
+            (dest->kind == LLK_Gr ? get_r_opnd(dest) : (const R_Opnd &)tmp_reg);
 
         switch (o) {
         case LO_Neg:

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp?view=diff&rev=511551&r1=511550&r2=511551
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp Sun Feb 25 09:02:43
2007
@@ -237,12 +237,7 @@
                 size_64);
         }
 #else //!PLATFORM_POSIX
-        
-// TODO: couldn't compile under windows/em64t with the line below
-#if !defined(_EM64T_) || !defined(_WIN64)
-    buf = prefix(buf, fs_prefix);
-#endif
-    
+    buf = prefix(buf, prefix_fs);
     buf = mov(buf, *reg,  M_Opnd(0x14), size_64);
 #endif //!PLATFORM_POSIX
     return buf;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp?view=diff&rev=511551&r1=511550&r2=511551
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp Sun Feb 25
09:02:43 2007
@@ -290,16 +290,15 @@
 
 
 /*    BEGIN SUPPORT FOR STUB OVERRIDE CODE SEQUENCES    */
-
-#if defined(_EM64T_) && defined(_WIN64)
-// TODO: couldn't compile "as is" under windows/em64t 
+// FIXME: as we now do not have native overrides on em64t
+// we declare this array as having 1 element to make it compilable
+// by Microsoft Visual C++ compilers and have 1 subtracted from
+// sizeof_stub_override_entries to keep it of zero length.
+// Once we have some NSO implemented on em64t that -1 should be removed.
 static Stub_Override_Entry _stub_override_entries_base[1];
-#else
-static Stub_Override_Entry _stub_override_entries_base[] = {};
-#endif
 
 Stub_Override_Entry * stub_override_entries = &(_stub_override_entries_base[0]);
 
-int sizeof_stub_override_entries = sizeof(_stub_override_entries_base) / sizeof(_stub_override_entries_base[0]);
+int sizeof_stub_override_entries = sizeof(_stub_override_entries_base) / sizeof(_stub_override_entries_base[0])
- 1; // <<< Remove -1 if NSO implemented;
 
 /*    END SUPPORT FOR STUB OVERRIDE CODE SEQUENCES    */



Mime
View raw message