harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r549824 - in /harmony/enhanced/drlvm/trunk/vm: jitrino/src/optimizer/ jitrino/src/optimizer/abcd/ jitrino/src/shared/ jitrino/src/translator/java/ port/src/thread/win/ vmcore/src/class_support/ vmcore/src/thread/win/ vmcore/src/verifier/
Date Fri, 22 Jun 2007 14:13:33 GMT
Author: gshimansky
Date: Fri Jun 22 07:13:32 2007
New Revision: 549824

URL: http://svn.apache.org/viewvc?view=rev&rev=549824
Log:
Applied patch from HARMONY-4270
[drlvm] Fixes for compilation of drlvm by intel compiler on windows/ia32


Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/win/atomics.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Graph.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd.cpp Fri Jun 22
07:13:32 2007
@@ -120,7 +120,7 @@
     IOpnd(0, false /* is_phi */, true /* is_constant */),
     _opnd(NULL)
 {
-    setID(min_const_opnd + id);
+    setID((uint32)min_const_opnd + id);
     setConstant(c);
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp Fri Jun 22 07:13:32
2007
@@ -1418,7 +1418,7 @@
             Opnd* cpIdx = callInst->getSrc(1);
             return findOrInsertAlias(getUnresolvedObjectField(0, enclClass, cpIdx));
         }
-        break;
+        // break; unreachable because of the return above
     default:
         assert(0);
         break;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp Fri Jun 22 07:13:32 2007
@@ -1316,8 +1316,8 @@
 const char * Type::tag2str(Tag t) {
     checkArray();
 
-    assert( t >= 0 && t<NumTypeTags );
-    return t >= 0 && t<NumTypeTags ? type_tag_names[t].name : type_tag_names[NumTypeTags].name;
+    assert( t >= 0 && t < NumTypeTags );
+    return type_tag_names[t].name;
 }
 
 

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=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Fri Jun 22 07:13:32 2007
@@ -755,10 +755,10 @@
                     case Type::Boolean: constVal=irBuilder.genLdConstant(*(bool*)fieldAddr);break;
                     case Type::UnmanagedPtr:  assert(fieldIsMagic); 
 #ifdef _IA32_
-                            constVal=irBuilder.genLdConstant(*(int32*)fieldAddr);break;
+                            constVal=irBuilder.genLdConstant(*(int32*)fieldAddr);
 #else
                             assert(sizeof(void*)==8);
-                            constVal=irBuilder.genLdConstant(*(int64*)fieldAddr);break;
+                            constVal=irBuilder.genLdConstant(*(int64*)fieldAddr);
 #endif
                             break;
                     default: assert(0); //??

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c Fri Jun 22 07:13:32
2007
@@ -103,7 +103,13 @@
      */
     __asm {lock add [esp], 0 }
 #endif
+
+#ifdef __INTEL_COMPILER
+    __memory_barrier();
+#else
     _ReadWriteBarrier();
+#endif
+
 }
 
 APR_DECLARE(apr_status_t) apr_thread_times(apr_thread_t *thread, 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp Fri Jun
22 07:13:32 2007
@@ -597,12 +597,14 @@
 	    } else { //skip other symbols, they are not in exception list
                 assert(name[i] & 0x40);
                 if(name[i] & 0x20) {
-                    if(len - i - 3 < 0) //check array bound
+                    if(len < i + 3) { //check array bound
                         return false;
+                    }
                     i += 2;
-                    } else {
-                    if(len - i - 2 < 0)
+                } else {
+                    if(len < i + 2) {
                         return false;
+                    }
                     i++;
                 }    
             }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/win/atomics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/win/atomics.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/win/atomics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/win/atomics.cpp Fri Jun 22 07:13:32
2007
@@ -43,11 +43,19 @@
      */
     __asm {lock add [esp], 0 }
 #endif
+#ifdef __INTEL_COMPILER
+    __memory_barrier();
+#else
     _ReadWriteBarrier();
+#endif
 }
 
 void MemoryWriteBarrier() {
     _mm_sfence();
+#ifdef __INTEL_COMPILER
+    __memory_barrier();
+#else
     _WriteBarrier();
+#endif
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Graph.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Graph.cpp?view=diff&rev=549824&r1=549823&r2=549824
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Graph.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Graph.cpp Fri Jun 22 07:13:32 2007
@@ -556,7 +556,7 @@
         }
         stack_depth += instr->m_stack;
         depth += instr->m_stack;
-        assert(depth >= 0);
+        // assert(depth >= 0); always true since depth is unsigned
         if (depth > ctx->m_maxstack) {
             VF_REPORT(ctx, "Instruction stack overflow");
             return VF_ErrorStackOverflow;



Mime
View raw message