harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r510498 - in /harmony/enhanced/drlvm/trunk: build/ build/make/ build/make/components/extra/ build/make/components/vm/ build/make/targets/ vm/gc_cc/src/ vm/gc_gen/src/gen/ vm/interpreter/src/ vm/jitrino/src/codegenerator/ia32/ vm/jitrino/src...
Date Thu, 22 Feb 2007 13:21:57 GMT
Author: gshimansky
Date: Thu Feb 22 05:21:55 2007
New Revision: 510498

URL: http://svn.apache.org/viewvc?view=rev&rev=510498
Log:
Applied HARMONY-3196 [drlvm][winx64][build] enabling of drlvm build on windows/em64t

I've also implemented WriteBarrier in atomics.h and changed ReadWriteBarrier to use MSVC 2005 intrinsic.

Tests passed on Ubuntu6 x86, Windows 2003 server x86 and SuSE9 x86_64. On Windows x86_64 VM just compiles.


Modified:
    harmony/enhanced/drlvm/trunk/build/   (props changed)
    harmony/enhanced/drlvm/trunk/build/build.bat
    harmony/enhanced/drlvm/trunk/build/make/build.xml
    harmony/enhanced/drlvm/trunk/build/make/build_component.xsl
    harmony/enhanced/drlvm/trunk/build/make/components/extra/zlib.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
    harmony/enhanced/drlvm/trunk/build/make/setup.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
    harmony/enhanced/drlvm/trunk/build/make/win.properties
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp
    harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h
    harmony/enhanced/drlvm/trunk/vm/port/src/atomic/win/port_atomic.c
    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/port/src/thread/win/apr_thread_ext.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/atomics.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp

Propchange: harmony/enhanced/drlvm/trunk/build/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Feb 22 05:21:55 2007
@@ -1,6 +1,10 @@
 drlvm.properties
 win_ia32_msvc_*
 win_ia32_icl_*
+win_em64t_msvc_*
+win_em64t_icl_*
+win_ipf_msvc_*
+win_ipf_icl_*
 lnx_ia32_gcc_*
 lnx_ia32_icc_*
 lnx_em64t_gcc_*

Modified: harmony/enhanced/drlvm/trunk/build/build.bat
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/build.bat?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/build.bat (original)
+++ harmony/enhanced/drlvm/trunk/build/build.bat Thu Feb 22 05:21:55 2007
@@ -79,10 +79,17 @@
 )
 
 :CONFIG
+IF "%COMPILER_CFG_SCRIPT%" == "EM64T" (
+    ECHO ON
+    CALL "c:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" amd64 %COMPILER_CFG_ARG%
+    @ECHO OFF
+    GOTO WO_CONFIG	
+)
 ECHO ON
 CALL "%COMPILER_CFG_SCRIPT%" %COMPILER_CFG_ARG%
 @ECHO OFF
 
+:WO_CONFIG
 IF NOT %ERRORLEVEL% == 0 (
     ECHO *
     ECHO * Failed to call C compiler configuration script:
@@ -90,7 +97,6 @@
     ECHO *
     GOTO ERROR
  )
-
 REM ================================================
 REM Check JAVA_HOME & ANT_HOME
 REM ================================================
@@ -142,3 +148,4 @@
 EXIT /B 1
 
 :THEEND
+

Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Thu Feb 22 05:21:55 2007
@@ -110,9 +110,14 @@
         </condition>
 
         <condition property="build.arch" value="em64t">
-            <equals arg1="${machine.arch}" arg2="x86_64" />
+            <or>
+                <equals arg1="${os.arch}" arg2="x86_64" />
+                <equals arg1="${os.arch}" arg2="amd64" />
+                <equals arg1="${machine.arch}" arg2="x86_64" />
+                <equals arg1="${machine.arch}" arg2="amd64" />
+            </or>
         </condition>
-
+        
         <condition property="properties.file" value="${env.properties.file}">
             <isset property="env.properties.file"/>
         </condition>

Modified: harmony/enhanced/drlvm/trunk/build/make/build_component.xsl
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build_component.xsl?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build_component.xsl (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build_component.xsl Thu Feb 22 05:21:55 2007
@@ -30,32 +30,62 @@
 
     <xsl:template match="property[@name='libname']">
         <xsl:copy-of select="." />
-        <property name="{$component}.libname" value="{concat('${','libname}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">libname</xsl:with-param>
+        </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="property[@name='includes']">
         <xsl:copy-of select="." />
-        <property name="{$component}.includes" value="{concat('${','includes}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">includes</xsl:with-param>
+        </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="property[@name='src']">
         <xsl:copy-of select="." />
-        <property name="{$component}.src" value="{concat('${','src}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">src</xsl:with-param>
+        </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="property[@name='libdir']">
         <xsl:copy-of select="." />
-        <property name="{$component}.libdir" value="{concat('${','libdir}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">libdir</xsl:with-param>
+        </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="property[@name='jardir']">
         <xsl:copy-of select="." />
-        <property name="{$component}.jardir" value="{concat('${','jardir}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">jardir</xsl:with-param>
+        </xsl:call-template>
     </xsl:template>
 
     <xsl:template match="property[@name='jarname']">
         <xsl:copy-of select="." />
-        <property name="{$component}.jarname" value="{concat('${','jarname}')}" />
+        <xsl:call-template name="insert-property">
+            <xsl:with-param name="suffix">jarname</xsl:with-param>
+        </xsl:call-template>
+    </xsl:template>
+
+    <xsl:template name="insert-property">
+        <xsl:param name="suffix"/>
+        <xsl:element name="property">
+            <xsl:attribute name="name">
+                <xsl:value-of select="$component"/>
+                <xsl:text>.</xsl:text>
+                <xsl:value-of select="$suffix"/>
+            </xsl:attribute>
+            <xsl:attribute name="value">
+                <xsl:text>${</xsl:text>
+                <xsl:value-of select="$suffix"/>
+                <xsl:text>}</xsl:text>
+            </xsl:attribute>
+        </xsl:element>
     </xsl:template>
+    
 
+    
 </xsl:stylesheet>

Modified: harmony/enhanced/drlvm/trunk/build/make/components/extra/zlib.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/extra/zlib.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/extra/zlib.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/extra/zlib.xml Thu Feb 22 05:21:55 2007
@@ -35,14 +35,19 @@
             <property name="libdir" value="${build.dir}/_bin"/>
             <mkdir dir="${libdir}" />
 
-            <copy file="${build.ZLIB.home}/zlib1.dll"
+            <select arch="em64t">
+                <property name="select.ZLIB.home" value="${build.ZLIB-x86_64.home}"/>
+            </select>
+            <property name="select.ZLIB.home" value="${build.ZLIB.home}"/>
+            
+            <copy file="${select.ZLIB.home}/zlib1.dll"
                   todir="${libdir}"/>
 
-            <copy file="${build.ZLIB.home}/lib/zdll.lib"
+            <copy file="${select.ZLIB.home}/lib/zdll.lib"
                   todir="${libdir}"/>
 
             <copy todir="${includes}">
-                <fileset dir="${build.ZLIB.home}/include">
+                <fileset dir="${select.ZLIB.home}/include">
                     <include name="*.h" />
                 </fileset>
             </copy>

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml Thu Feb 22 05:21:55 2007
@@ -71,6 +71,12 @@
        </compiler>
 
         <linker id="linker" extends="common.linker">
+            <fileset dir="${build.semi.dir}/vm/vmcore/_bin" 
+			    includes="harmonyvm.lib"/>
+
+            <fileset dir="${build.semi.dir}/vm/encoder/_bin" 
+			    includes="encoder.lib"/>
+
             <libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
             <libset libs="${extra.apr.lib}" dir="${extra.apr.libdir}" />
             <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml Thu Feb 22 05:21:55 2007
@@ -63,6 +63,9 @@
                 <defineset define="LINUX64" />
                 <defineset define="LINUXPPC64" />
             </select>
+            <select os="win" arch="em64t">
+                <defineset define="_EM64T_" />
+            </select>
             <!--
             <select os="lnx">
                 <compilerarg value="-Wno-deprecated" />

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml Thu Feb 22 05:21:55 2007
@@ -135,7 +135,8 @@
             <select os="win">
                 <compilerarg value="/Fo${build.semi.dir}/vm/jitrino/_obj/" />
 
-                <defineset define="PLATFORM_NT,_WINDLL,_MBCS,_REENTRANT,__SMP__,WIN32,_WIN32" />
+                <!-- _CRT_SECURE_NO_DEPRECATE added to suppress a huge amount of complaints from msvc em64t compiler -->
+                <defineset define="PLATFORM_NT,_WINDLL,_MBCS,_REENTRANT,__SMP__,WIN32,_WIN32,_CRT_SECURE_NO_DEPRECATE" />
 
                 <compilerarg value="/nologo" />
                 <compilerarg value="/EHsc" />
@@ -308,6 +309,13 @@
 
                 <select arch="em64t">
                     <linkerarg value="/MACHINE:AMD64" />
+                    <linkerarg value="/NODEFAULTLIB:libcmt.lib" /> 
+                    <linkerarg value="/NODEFAULTLIB:libcmtd.lib" /> 
+                    <linkerarg value="/NODEFAULTLIB:libcpmt.lib" />
+                </select>
+
+                <select arch="em64t">
+                    <syslibset type="static" libs="msvcrtd,msvcmrtd,msvcrt,msvcurtd,libcpmtd,mscoree" />
                 </select>
 
                 <select arch="ia32">

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml Thu Feb 22 05:21:55 2007
@@ -323,6 +323,7 @@
 
             <select os="win" cfg="debug">
                 <linkerarg value="/NODEFAULTLIB:libcmt.lib" />
+                <linkerarg value="/NODEFAULTLIB:msvcrt.lib" />
             </select>
 
             <select os="lnx">

Modified: harmony/enhanced/drlvm/trunk/build/make/setup.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/setup.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/setup.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/setup.xml Thu Feb 22 05:21:55 2007
@@ -102,6 +102,7 @@
         <property name="APRICONV.check.file" value="lib/api_version.c" />
         <property name="LOG4CXX.check.file" value="configure.in" />
         <property name="ZLIB.check.file" value="zlib1.dll" />
+        <property name="ZLIB-x86_64.check.file" value="zlib1.dll" />
         <property name="CLASSLIB.check.file" value="native-src/README.txt" />
         <property name="XALAN.check.file" value="xalan.jar" />
         <property name="VM.check.file" value="vmcore/src/init/vm_init.cpp" />
@@ -191,7 +192,15 @@
             </then>
             <else>
                 <property name="build.os.short" value="win" />
-                <property name="os.resources" value="APR,APRUTIL,APRICONV,ZLIB" />
+                <if>
+                    <equals arg1="${build.arch}" arg2="em64t" />
+                    <then>
+                        <property name="os.resources" value="APR,APRUTIL,APRICONV,ZLIB-x86_64" />
+                    </then>
+                    <else>
+                        <property name="os.resources" value="APR,APRUTIL,APRICONV,ZLIB" />
+                    </else>
+                </if>
             </else>
         </if>
     </target>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml Thu Feb 22 05:21:55 2007
@@ -78,7 +78,13 @@
                 <compilerarg value="/nologo" />
                 <compilerarg value="/W3" />
 
-                <compilerarg value="/WX" />
+                <select arch="em64t">
+                    <compilerarg value="/W0" />
+                </select>
+                <select arch="ia32,ipf">
+                    <compilerarg value="/WX" />
+                </select>
+
                 <compilerarg value="/Zi" />
             </select>
 
@@ -203,11 +209,13 @@
                 <linkerarg value="/MDd" />
                 <linkerarg value="/Zi" />
                 <linkerarg value="/Od" />
+                <linkerarg value="/NODEFAULTLIB"/>
             </select>
 
             <select os="win">
                 <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock" />
             </select>
+
             <select os="lnx" arch="ia32">
                 <syslibset type="static" libs="z,pthread,xml2" />
                 <syslibset type="shared" libs="m,dl,stdc++,rt" />

Modified: harmony/enhanced/drlvm/trunk/build/make/win.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/win.properties?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/win.properties (original)
+++ harmony/enhanced/drlvm/trunk/build/make/win.properties Thu Feb 22 05:21:55 2007
@@ -47,6 +47,7 @@
 # ZLIB, version 1.2.1 or above
 # http://www.zlib.net/
 remote.ZLIB.archive=http://www.zlib.net/zlib123-dll.zip
+remote.ZLIB-x86_64.archive=http://issues.apache.org/jira/secure/attachment/12351498/zlib-x86_64-dll.zip
 
 CLASSLIB_HOME=../../../classlib/trunk/
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp Thu Feb 22 05:21:55 2007
@@ -467,6 +467,7 @@
 Managed_Object_Handle gc_get_next_live_object(void *iterator) {
     TRACE2("gc.iter", "gc_get_next_live_object - NOT IMPLEMENTED");
     abort();
+    return 0;
 }
 
 unsigned int gc_time_since_last_gc() {

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp Thu Feb 22 05:21:55 2007
@@ -318,6 +318,12 @@
   return TRUE;;
 }
 
+// this function is added to disambiguate on windows/em64t calls to asm() below 
+POINTER_SIZE_SINT abs(POINTER_SIZE_SINT x) 
+{
+    return x<0?-x:x;    
+}
+    
 #ifndef STATIC_NOS_MAPPING
 
 void gc_gen_adapt(GC_Gen* gc, int64 pause_time)

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp Thu Feb 22 05:21:55 2007
@@ -56,9 +56,9 @@
 EXPORT void JIT_get_root_set_for_thread_dump(JIT_Handle, Method_Handle, GC_Enumeration_Handle, JitFrameContext *) {return;}
 EXPORT Boolean JIT_can_enumerate(JIT_Handle, Method_Handle, NativeCodePtr) { abort(); return true; }
 EXPORT void JIT_fix_handler_context(JIT_Handle, Method_Handle, JitFrameContext *) { abort(); }
-EXPORT void * JIT_get_address_of_this(JIT_Handle, Method_Handle, const JitFrameContext *) { abort(); }
+EXPORT void * JIT_get_address_of_this(JIT_Handle, Method_Handle, const JitFrameContext *) { abort(); return (void *)JIT_FAILURE;}
 EXPORT Boolean JIT_call_returns_a_reference(JIT_Handle, Method_Handle, const JitFrameContext *) { abort(); return true; }
-EXPORT JIT_Result JIT_gen_method_info(JIT_Handle,Compile_Handle, Method_Handle, JIT_Flags) { abort(); }
+EXPORT JIT_Result JIT_gen_method_info(JIT_Handle,Compile_Handle, Method_Handle, JIT_Flags) { abort(); return JIT_FAILURE;}
 EXPORT void JIT_init_with_data(JIT_Handle, void *) { abort(); }
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp Thu Feb 22 05:21:55 2007
@@ -281,7 +281,8 @@
          bbpFlagAddrBlock->appendInst(irManager.newCallInst(target, &CallingConvention_STDCALL, 0, NULL, tlsBase));
 #else // PLATFORM_POSIX
 #ifdef _EM64T_
-#error "BBP not implemented on windows/em64t"
+	// TODO: #error "BBP not implemented on windows/em64t"
+	assert(0);
 #endif
         // TLS base can be obtained from [fs:0x14]
         Opnd* tlsBase = irManager.newMemOpnd(tlsBaseType, MemOpndKind_Any, NULL, 0x14, RegName_FS);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp Thu Feb 22 05:21:55 2007
@@ -510,6 +510,7 @@
                     int64 offset=targetCodeStartAddr-instCodeEndAddr;
 
 #ifdef _EM64T_
+#ifndef WIN32
                     if (llabs(offset) > 0xFFFFFFFF) {
                         const RegName TMP_BASE = RegName_R14;
                         EncoderBase::Operands args;
@@ -521,6 +522,10 @@
                         args.add(TMP_BASE);
                         EncoderBase::encode(ip, Mnemonic_CALL, args);
                     } else {
+#else
+                    // TODO: 
+                    assert(0);
+#endif
 #endif
                     inst->getOpnd(targetOpndIndex)->assignImmValue((int64)offset);
                     // re-emit the instruction: 
@@ -530,7 +535,9 @@
                         registerDirectCall(inst);
                     }
 #ifdef _EM64T_
+#ifndef WIN32
                     }
+#endif
 #endif
                 }   
             // todo64

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp Thu Feb 22 05:21:55 2007
@@ -312,12 +312,16 @@
 #ifdef GCMAP_TRACK_IDS
     assert(cond);
 #else
-#ifdef WIN32
+#if defined(WIN32) && !defined(_EM64T_)
     if (!cond) {
         __asm {
             int 3;
         }
     }
+#endif
+#if defined (_EM64T_) && defined(_WIN64)
+    // TODO: add proper code
+    assert(0);
 #endif
 #endif    
 }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp Thu Feb 22 05:21:55 2007
@@ -287,12 +287,12 @@
                         config->counters[num].name =    line.substr(pos1+1, pos2-pos1-1);
                     }
                     if((int)line.find(".Title=")!=-1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         config->counters[num].title=std::string(val);
                     } else if (((int)line.find(".IsOR=")!=-1) && ((int)line.find("true")!=-1)) {
                         config->counters[num].filter.isOR=true;
                     } else if ((int)line.find(std::string(config->counters[num].name)+"=")!=-1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         for(uint32 i = 0; i < config->counters.size(); i++) {
                             if(std::string(config->counters[i].name) == val) {
                                 config->counters[num].filter = config->counters[i].filter;
@@ -300,7 +300,7 @@
                             }
                         }
                     } else if((int)line.find(".Mnemonic")!=-1) {
-                        char * mnem = std::strstr(line.c_str(),"=")+1;
+                        char * mnem = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(mnem) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.mnemonic.isNegative=true;
                         } else {
@@ -309,7 +309,7 @@
                             config->counters[num].filter.mnemonic.isInitialized=true;
                         }
                     } else if (std::strstr(line.c_str(), ".OpndNumber")) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.operandNumber.isNegative=true;
                         } else {
@@ -318,7 +318,7 @@
                             config->counters[num].filter.operandNumber.isInitialized=true;
                         }
                     } else if ((int)line.find(".Operand.") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         int pos = int(line.find(".Operand.")+9);
                         std::string v = line.substr(pos, line.find_first_of(".", pos)-pos);
                         int opNum;
@@ -368,7 +368,7 @@
                             }
                         }
                     } else if ((int)line.find(".RuntimeInfo.Kind") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.rtKind.isNegative=true;
                         } else {
@@ -381,7 +381,7 @@
                             config->counters[num].filter.rtKind.isInitialized=true;
                         }
                     } else if ((int)line.find(".RuntimeInfo.HelperID") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.rtHelperID.isNegative=true;
                         } else {
@@ -390,7 +390,7 @@
                             config->counters[num].filter.rtHelperID.isInitialized=true;
                         }
                     } else if ((int)line.find(".RuntimeInfo.IntHelperName") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.rtIntHelperName.isNegative=true;
                         } else {
@@ -399,7 +399,7 @@
                             config->counters[num].filter.rtIntHelperName.isInitialized=true;
                         }
                     } else if ((int)line.find(".isNative") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isNative.isNegative=true;
                         } else {
@@ -408,7 +408,7 @@
                             config->counters[num].filter.isNative.isInitialized=true;
                         }
                     } else if ((int)line.find(".isStatic") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isStatic.isNegative=true;
                         } else {
@@ -417,7 +417,7 @@
                             config->counters[num].filter.isStatic.isInitialized=true;
                         }
                     } else if ((int)line.find(".isSynchronized") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isSynchronized.isNegative=true;
                         } else {
@@ -426,7 +426,7 @@
                             config->counters[num].filter.isSynchronized.isInitialized=true;
                         }
                     } else if ((int)line.find(".isNoInlining") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isNoInlining.isNegative=true;
                         } else {
@@ -435,7 +435,7 @@
                             config->counters[num].filter.isNoInlining.isInitialized=true;
                         }
                     } else if ((int)line.find(".isInstance") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isInstance.isNegative=true;
                         } else {
@@ -444,7 +444,7 @@
                             config->counters[num].filter.isInstance.isInitialized=true;
                         }
                     } else if ((int)line.find(".isFinal") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isFinal.isNegative=true;
                         } else {
@@ -453,7 +453,7 @@
                             config->counters[num].filter.isFinal.isInitialized=true;
                         }
                     } else if ((int)line.find(".isVirtual") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isVirtual.isNegative=true;
                         } else {
@@ -462,7 +462,7 @@
                             config->counters[num].filter.isVirtual.isInitialized=true;
                         }
                     } else if ((int)line.find(".isAbstract") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isAbstract.isNegative=true;
                         } else {
@@ -471,7 +471,7 @@
                             config->counters[num].filter.isAbstract.isInitialized=true;
                         }
                     } else if ((int)line.find(".isClassInitializer") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isClassInitializer.isNegative=true;
                         } else {
@@ -480,7 +480,7 @@
                             config->counters[num].filter.isClassInitializer.isInitialized=true;
                         }
                     } else if ((int)line.find(".isInstanceInitializer") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isInstanceInitializer.isNegative=true;
                         } else {
@@ -489,7 +489,7 @@
                             config->counters[num].filter.isInstanceInitializer.isInitialized=true;
                         }
                     } else if ((int)line.find(".isStrict") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isStrict.isNegative=true;
                         } else {
@@ -498,7 +498,7 @@
                             config->counters[num].filter.isStrict.isInitialized=true;
                         }
                     } else if ((int)line.find(".isRequireSecObject") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isRequireSecObject.isNegative=true;
                         } else {
@@ -507,7 +507,7 @@
                             config->counters[num].filter.isRequireSecObject.isInitialized=true;
                         }
                     } else if ((int)line.find(".isInitLocals") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isInitLocals.isNegative=true;
                         } else {
@@ -516,7 +516,7 @@
                             config->counters[num].filter.isInitLocals.isInitialized=true;
                         }
                     } else if ((int)line.find(".isOverridden") != -1) {
-                        char * val = std::strstr(line.c_str(),"=")+1;
+                        char * val = (char *)std::strstr(line.c_str(),"=")+1;
                         if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
                             config->counters[num].filter.isOverridden.isNegative=true;
                         } else {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp Thu Feb 22 05:21:55 2007
@@ -42,11 +42,16 @@
         assert(cond);
 #else
 #ifdef WIN32
+#ifndef _EM64T_
         if (!cond) {
             __asm {
                 int 3;
             }
         }
+#else
+    // TODO: add proper code
+    assert(0);
+#endif
 #endif
 #endif    
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/enc.cpp Thu Feb 22 05:21:55 2007
@@ -53,10 +53,13 @@
 {
 #ifdef PLATFORM_POSIX
     raise(SIGTRAP);
-#else
+#elif !defined (_EM64T_)
     __asm {
         int 3
     }
+#else
+    // TODO:
+    assert(0);
 #endif
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h Thu Feb 22 05:21:55 2007
@@ -75,7 +75,7 @@
 APR_DECLARE(uint64) port_atomic_cas64(volatile uint64 * data, 
                                                  uint64 value, uint64 comp);
 
-#elif defined( WIN32 )
+#elif defined(WIN32) && !defined(_WIN64)
 
 INLINE uint8 port_atomic_cas8(volatile uint8 * data , uint8 value, uint8 comp) {
     __asm {
@@ -118,6 +118,17 @@
     }
     return comp;
 }
+
+#elif defined(_EM64T_) && defined (_WIN64)
+
+APR_DECLARE(uint8) port_atomic_cas8(volatile uint8 * data, 
+                                               uint8 value, uint8 comp);
+
+APR_DECLARE(uint16) port_atomic_cas16(volatile uint16 * data, 
+                                                 uint16 value, uint16 comp);
+
+APR_DECLARE(uint64) port_atomic_cas64(volatile uint64 * data, 
+                                                 uint64 value, uint64 comp);
 
 #elif defined (PLATFORM_POSIX)  
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/atomic/win/port_atomic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/atomic/win/port_atomic.c?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/atomic/win/port_atomic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/atomic/win/port_atomic.c Thu Feb 22 05:21:55 2007
@@ -21,3 +21,27 @@
 
 /* All code from this file was inlinied in port_atomic.h */
 
+#include <port_atomic.h>
+#include <assert.h>
+
+#if defined(_EM64T_) && defined(_WIN64)
+// TODO: these functions need to be implemented
+APR_DECLARE(uint8) port_atomic_cas8(volatile uint8 * data, 
+                                               uint8 value, uint8 comp) {
+	assert(0);
+	return 0;
+}
+
+APR_DECLARE(uint16) port_atomic_cas16(volatile uint16 * data, 
+                                                 uint16 value, uint16 comp) {
+	assert(0);
+	return 0;
+}
+
+APR_DECLARE(uint64) port_atomic_cas64(volatile uint64 * data, 
+                                                 uint64 value, uint64 comp) {
+	assert(0);
+	return 0;
+}
+
+#endif

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=510498&r1=510497&r2=510498
==============================================================================
--- 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 Thu Feb 22 05:21:55 2007
@@ -288,8 +288,11 @@
     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=510498&r1=510497&r2=510498
==============================================================================
--- 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 Thu Feb 22 05:21:55 2007
@@ -803,7 +803,7 @@
         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) : 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=510498&r1=510497&r2=510498
==============================================================================
--- 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 Thu Feb 22 05:21:55 2007
@@ -237,7 +237,12 @@
                 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 = mov(buf, *reg,  M_Opnd(0x14), size_64);
 #endif //!PLATFORM_POSIX
     return buf;

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=510498&r1=510497&r2=510498
==============================================================================
--- 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 Thu Feb 22 05:21:55 2007
@@ -24,6 +24,10 @@
 #include "apr_thread_ext.h"
 #include <apr_atomic.h>
 
+#if defined(_EM64T_) && defined(_WIN64)
+#include <intrin.h>
+#pragma intrinsic (_ReadWriteBarrier)
+#endif
 
 APR_DECLARE(apr_status_t) apr_thread_set_priority(apr_thread_t *thread, 
                 apr_int32_t priority) 
@@ -81,7 +85,11 @@
 }
 
 APR_DECLARE(void) apr_memory_rw_barrier() {
+#if defined(_EM64T_) && defined(_WIN64)
+    _ReadWriteBarrier();
+#else
     __asm mfence;
+#endif
 }
 
 APR_DECLARE(apr_status_t) apr_thread_times(apr_thread_t *thread, 

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h Thu Feb 22 05:21:55 2007
@@ -52,7 +52,7 @@
 
 #endif // !defined (_IPF_)
 
-#ifdef WIN32
+#if defined(WIN32) && !defined (_EM64T_)
 //use optimized asm monitor enter and exit helpers 
 #define ASM_MONITOR_HELPER
 // FS14_TLS_USE define turns on windows specific TLS access optimization 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/atomics.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/atomics.h?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/atomics.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/atomics.h Thu Feb 22 05:21:55 2007
@@ -25,6 +25,11 @@
 #include "jni.h"
 #include "Class.h"
 
+#if defined(_EM64T_) && defined(_WIN64)
+#include <intrin.h>
+#pragma intrinsic (_ReadWriteBarrier)
+#pragma intrinsic (_WriteBarrier)
+#endif
 
 JNIEXPORT jlong getFieldOffset
   (JNIEnv * env, jobject field);
@@ -81,10 +86,18 @@
         }
     #else
         inline void MemoryReadWriteBarrier() {
+        #if defined(_EM64T_) && defined(_WIN64)
+            _ReadWriteBarrier();
+        #else
             __asm mfence;
+        #endif
         }
         inline void MemoryWriteBarrier() {
+        #if defined(_EM64T_) && defined(_WIN64)
+            _WriteBarrier();
+        #else
             __asm sfence;
+        #endif
         }
     #endif
 #endif

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp Thu Feb 22 05:21:55 2007
@@ -657,7 +657,7 @@
     Global_Env * vm_env = jni_get_vm_env(jni_env);
 
     if (exn_raised()) return NULL;
-    char *ch = strchr(name, '.');
+    char *ch = (char *)strchr(name, '.');
     if (NULL != ch)
     {
         ThrowNew_Quick(jni_env, vm_env->JavaLangNoClassDefFoundError_String->bytes, name);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp Thu Feb 22 05:21:55 2007
@@ -406,7 +406,7 @@
 {
     int cmd_length = strlen(option_str);
     const char *lib_name = str + cmd_length;
-    char *opts_start = strchr(lib_name, option_separator);
+    char *opts_start = (char *)strchr(lib_name, option_separator);
     int lib_name_length;
 
     if (NULL == opts_start)

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp Thu Feb 22 05:21:55 2007
@@ -1328,7 +1328,7 @@
     ti->vm_brpt->process_native_breakpoint();
 }
 
-#ifdef _WIN32
+#if defined (_WIN32) && !defined(_EM64T_)
 static void __declspec(naked)
 asm_process_native_breakpoint_event()
 {
@@ -1369,7 +1369,7 @@
     // Copy original registers to TLS
     vm_thread->jvmti_saved_exception_registers = *regs;
     // Set return address for exception handler
-#if PLATFORM_POSIX
+#if defined (PLATFORM_POSIX) || defined(_EM64T_)
     regs->set_ip((void*)process_native_breakpoint_event);
 #else // PLATFORM_POSIX
     regs->set_ip((void*)asm_process_native_breakpoint_event);

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=510498&r1=510497&r2=510498
==============================================================================
--- 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 Thu Feb 22 05:21:55 2007
@@ -291,7 +291,12 @@
 
 /*    BEGIN SUPPORT FOR STUB OVERRIDE CODE SEQUENCES    */
 
+#if defined(_EM64T_) && defined(_WIN64)
+// TODO: couldn't compile "as is" under windows/em64t 
+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]);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/ini_em64t.cpp Thu Feb 22 05:21:55 2007
@@ -36,6 +36,7 @@
 #include "port_malloc.h"
 #include "tl/memory_pool.h"
 #include "encoder.h"
+#include "ini.h"
 #include "lil_code_generator_utils.h"
 
 #define LOG_DOMAIN "vm.helpers"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp Thu Feb 22 05:21:55 2007
@@ -19,16 +19,17 @@
  * @version $Revision: 1.1.2.1.4.5 $
  */  
 
+#undef LOG_DOMAIN
+#define LOG_DOMAIN "nt_exception_filter"
 
 #include "platform_lowlevel.h"
 #include "Class.h"
 #include "Environment.h"
-#include "gc_for_vm.h"
 #include "exceptions.h"
+#include "exceptions_jit.h"
 #include "method_lookup.h"
 #include "vm_strings.h"
 #include "vm_threads.h"
-#include "vm_utils.h"
 #include "compile.h"
 #include "ini.h"
 #include "cxxlog.h"
@@ -44,28 +45,28 @@
 
 void nt_to_vm_context(PCONTEXT pcontext, Registers* regs)
 {
-    regs->rax = pcontext->Eax;
-    regs->rcx = pcontext->Ecx;
-    regs->rdx = pcontext->Edx;
-    regs->rdi = pcontext->Edi;
-    regs->rsi = pcontext->Esi;
-    regs->rbx = pcontext->Ebx;
-    regs->rbp = pcontext->Ebp;
-    regs->rip = pcontext->Eip;
-    regs->rsp = pcontext->Esp;
+    regs->rax = pcontext->Rax;
+    regs->rcx = pcontext->Rcx;
+    regs->rdx = pcontext->Rdx;
+    regs->rdi = pcontext->Rdi;
+    regs->rsi = pcontext->Rsi;
+    regs->rbx = pcontext->Rbx;
+    regs->rbp = pcontext->Rbp;
+    regs->rip = pcontext->Rip;
+    regs->rsp = pcontext->Rsp;
 }
 
 void vm_to_nt_context(Registers* regs, PCONTEXT pcontext)
 {
-    pcontext->Esp = regs->rsp;
-    pcontext->Eip = regs->rip;
-    pcontext->Ebp = regs->rbp;
-    pcontext->Ebx = regs->rbx;
-    pcontext->Esi = regs->rsi;
-    pcontext->Edi = regs->rdi;
-    pcontext->Eax = regs->rax;
-    pcontext->Ecx = regs->rcx;
-    pcontext->Edx = regs->rdx;
+    pcontext->Rsp = regs->rsp;
+    pcontext->Rip = regs->rip;
+    pcontext->Rbp = regs->rbp;
+    pcontext->Rbx = regs->rbx;
+    pcontext->Rsi = regs->rsi;
+    pcontext->Rdi = regs->rdi;
+    pcontext->Rax = regs->rax;
+    pcontext->Rcx = regs->rcx;
+    pcontext->Rdx = regs->rdx;
 }
 
 int NT_exception_filter(LPEXCEPTION_POINTERS p_NT_exception) 
@@ -79,7 +80,7 @@
     Global_Env *env = VM_Global_State::loader_env;
 
     VM_Code_Type vmct =
-        vm_identify_eip((void *)p_NT_exception->ContextRecord->Eip);
+        vm_identify_eip((void *)p_NT_exception->ContextRecord->Rip);
     if(vmct != VM_TYPE_JAVA) {
         if (!get_boolean_property("vm.assert_dialog", TRUE, VM_PROPERTIES)) {
             LWARN(43, "Fatal exception, terminating");
@@ -125,7 +126,7 @@
 
     nt_to_vm_context(p_NT_exception->ContextRecord, &regs);
 
-    bool java_code = (vm_identify_eip((void *)regs.eip) == VM_TYPE_JAVA);
+    bool java_code = (vm_identify_eip((void *)regs.rip) == VM_TYPE_JAVA);
     exn_athrow_regs(&regs, exc_clss, java_code);
 
     vm_to_nt_context(&regs, p_NT_exception->ContextRecord);
@@ -138,8 +139,10 @@
     int NT_exception_filter(LPEXCEPTION_POINTERS p_NT_exception);
 
     // NT null pointer exception support
-    __try {  
-        call_the_run_method(p_xx);
+    __try {
+        // TODO: couldn't find where call_the_run_method() body is
+        //call_the_run_method(p_xx); 
+        assert(0);
         return 0;
     }
     __except ( p_NT_exception = GetExceptionInformation(), 
@@ -151,3 +154,28 @@
     }  // NT null pointer exception support
 
 }
+
+// TODO: the functions below need an implementation
+static void asm_exception_catch_callback() {
+assert(0);
+}
+
+void asm_jvmti_exception_catch_callback() {
+assert(0);
+}
+
+LONG NTAPI vectored_exception_handler(LPEXCEPTION_POINTERS nt_exception)
+{
+assert(0);
+return 0;
+}
+
+void init_stack_info() {
+assert(0);
+}
+
+size_t get_available_stack_size() { 
+assert(0);
+return 0;
+}
+

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp?view=diff&rev=510498&r1=510497&r2=510498
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/ver_utils.cpp Thu Feb 22 05:21:55 2007
@@ -790,7 +790,7 @@
                 // interfaces have methods with the same name
                 const char *sig1 = method_get_descriptor( method1 );
                 const char *sig2 = method_get_descriptor( method2 );
-                char *end_params = strrchr( sig1, ')' );
+                char *end_params = (char *)strrchr( sig1, ')' );
                 unsigned len = end_params - sig1 + 1;
                 if( !memcmp( sig1, sig2, len ) ) {
                     // methods arguments are the same



Mime
View raw message