harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r691951 - in /harmony/enhanced/drlvm/trunk: make/vm/ vm/gc_gen/src/common/ vm/port/include/ vm/port/src/crash_handler/linux/ vm/vmcore/src/ncai/utils/
Date Thu, 04 Sep 2008 09:39:01 GMT
Author: hindessm
Date: Thu Sep  4 02:39:00 2008
New Revision: 691951

URL: http://svn.apache.org/viewvc?rev=691951&view=rev
Log:
Minor fixes for freebsd7/x86.

Modified:
    harmony/enhanced/drlvm/trunk/make/vm/common-vm.xml
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h
    harmony/enhanced/drlvm/trunk/vm/port/include/port_mutex.h
    harmony/enhanced/drlvm/trunk/vm/port/include/port_thread.h
    harmony/enhanced/drlvm/trunk/vm/port/src/crash_handler/linux/native_unwind_os.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp

Modified: harmony/enhanced/drlvm/trunk/make/vm/common-vm.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/make/vm/common-vm.xml?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/make/vm/common-vm.xml (original)
+++ harmony/enhanced/drlvm/trunk/make/vm/common-vm.xml Thu Sep  4 02:39:00 2008
@@ -130,7 +130,8 @@
 
             <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock,psapi" if="is.windows"/>
 
-            <syslibset type="shared" libs="m,dl,stdc++,rt" if="is.unix.x86"/>
+            <syslibset type="shared" libs="m,dl,stdc++,rt" if="is.linux.x86"/>
+            <syslibset type="shared" libs="pthread" if="is.freebsd"/>
             <!--linkerarg value="-lgcc_s" if="is.unix.x86" unless="is.icc"/-->
         </linker>
     </target>

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h Thu Sep  4 02:39:00 2008
@@ -66,7 +66,7 @@
 #define prefetchnta(pref_addr)	_mm_prefetch((char*)(pref_addr), _MM_HINT_NTA )
 #endif /*ALLOC_PREFETCH*/
 
-#elif defined (__linux__)
+#elif defined (__linux__) || defined(FREEBSD)
 #define FORCE_INLINE inline  __attribute__((always_inline))
 
 #ifdef PREFETCH_SUPPORTED

Modified: harmony/enhanced/drlvm/trunk/vm/port/include/port_mutex.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/port_mutex.h?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/port_mutex.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/port_mutex.h Thu Sep  4 02:39:00 2008
@@ -36,6 +36,9 @@
 extern "C" {
 #endif
 
+#if defined(FREEBSD)
+#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+#endif
 
 /**
  * @defgroup port_mutex Basic mutexes

Modified: harmony/enhanced/drlvm/trunk/vm/port/include/port_thread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/port_thread.h?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/port_thread.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/port_thread.h Thu Sep  4 02:39:00 2008
@@ -45,6 +45,8 @@
 #endif /* _syscall0 */
 
 #else /* !LINUX */
+#include <sys/types.h>
+#include <unistd.h>
 #define gettid() getpid()
 #endif
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/crash_handler/linux/native_unwind_os.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/crash_handler/linux/native_unwind_os.cpp?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/crash_handler/linux/native_unwind_os.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/crash_handler/linux/native_unwind_os.cpp Thu
Sep  4 02:39:00 2008
@@ -21,6 +21,10 @@
 #include "port_modules.h"
 #include "native_unwind.h"
 
+#if defined(FREEBSD)
+#include <pthread_np.h>
+#endif
+
 #if defined(MACOSX)
 #include <crt_externs.h>
 #define environ (*_NSGetEnviron())

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp?rev=691951&r1=691950&r2=691951&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/utils/ncai_utils_ia32.cpp Thu Sep  4 02:39:00
2008
@@ -59,6 +59,49 @@
     return sizeof(g_ncai_reg_table)/sizeof(g_ncai_reg_table[0]);
 }
 
+#if defined(FREEBSD)
+
+static void ncai_context_to_registers(ucontext_t* pcontext, NcaiRegisters* pregs)
+{
+    pregs->eax  = pcontext->uc_mcontext.mc_eax;
+    pregs->ebx  = pcontext->uc_mcontext.mc_ebx;
+    pregs->ecx  = pcontext->uc_mcontext.mc_ecx;
+    pregs->edx  = pcontext->uc_mcontext.mc_edx;
+    pregs->esp  = pcontext->uc_mcontext.mc_esp;
+    pregs->ebp  = pcontext->uc_mcontext.mc_ebp;
+    pregs->esi  = pcontext->uc_mcontext.mc_esi;
+    pregs->edi  = pcontext->uc_mcontext.mc_edi;
+    pregs->ds = pcontext->uc_mcontext.mc_ds;
+    pregs->es = pcontext->uc_mcontext.mc_es;
+    pregs->fs = pcontext->uc_mcontext.mc_fs;
+    pregs->gs = pcontext->uc_mcontext.mc_gs;
+    pregs->ss = pcontext->uc_mcontext.mc_ss;
+    pregs->cs = pcontext->uc_mcontext.mc_cs;
+    pregs->eip    = pcontext->uc_mcontext.mc_eip;
+    pregs->eflags = pcontext->uc_mcontext.mc_eflags;
+}
+
+static void ncai_registers_to_context(NcaiRegisters* pregs, ucontext_t* pcontext)
+{
+    pcontext->uc_mcontext.mc_eax  = pregs->eax;
+    pcontext->uc_mcontext.mc_ebx  = pregs->ebx;
+    pcontext->uc_mcontext.mc_ecx  = pregs->ecx;
+    pcontext->uc_mcontext.mc_edx  = pregs->edx;
+    pcontext->uc_mcontext.mc_esp  = pregs->esp;
+    pcontext->uc_mcontext.mc_ebp  = pregs->ebp;
+    pcontext->uc_mcontext.mc_esi  = pregs->esi;
+    pcontext->uc_mcontext.mc_edi  = pregs->edi;
+    pcontext->uc_mcontext.mc_ds = pregs->ds;
+    pcontext->uc_mcontext.mc_es = pregs->es;
+    pcontext->uc_mcontext.mc_fs = pregs->fs;
+    pcontext->uc_mcontext.mc_gs = pregs->gs;
+    pcontext->uc_mcontext.mc_ss = pregs->ss;
+    pcontext->uc_mcontext.mc_cs = pregs->cs;
+    pcontext->uc_mcontext.mc_eip  = pregs->eip;
+    pcontext->uc_mcontext.mc_eflags  = pregs->eflags;
+}
+#else
+
 #ifdef PLATFORM_POSIX
 
 static void ncai_context_to_registers(ucontext_t* pcontext, NcaiRegisters* pregs)
@@ -149,6 +192,7 @@
 }
 
 #endif // #ifdef PLATFORM_POSIX
+#endif // # defined(FREEBSD)
 
 bool ncai_get_register_value(hythread_t thread, jint reg_number, void* buf_ptr)
 {



Mime
View raw message