* Merged executionstate branch.
[cacao.git] / src / vm / jit / i386 / linux / md-os.c
index 13a585970c2e7d59d89f8f72e4bd40688e56adb6..92bb757315c97b42ed1451fc7ce72c295b7c0ad8 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vm/jit/i386/linux/md-os.c - machine dependent i386 Linux functions
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
@@ -37,7 +35,7 @@
 #include "vm/jit/i386/codegen.h"
 #include "vm/jit/i386/md.h"
 
-#include "threads/threads-common.h"
+#include "threads/thread.h"
 
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
@@ -45,6 +43,7 @@
 #include "vm/stringlocal.h"
 
 #include "vm/jit/asmpart.h"
+#include "vm/jit/executionstate.h"
 #include "vm/jit/stacktrace.h"
 
 
@@ -302,14 +301,13 @@ void md_signal_handler_sigusr2(int sig, siginfo_t *siginfo, void *_p)
 #endif
 
 
-/* md_replace_executionstate_read **********************************************
+/* md_executionstate_read ******************************************************
 
    Read the given context into an executionstate for Replacement.
 
 *******************************************************************************/
 
-#if defined(ENABLE_REPLACEMENT)
-void md_replace_executionstate_read(executionstate_t *es, void *context)
+void md_executionstate_read(executionstate_t *es, void *context)
 {
        ucontext_t *_uc;
        mcontext_t *_mc;
@@ -331,17 +329,15 @@ void md_replace_executionstate_read(executionstate_t *es, void *context)
        for (i = 0; i < FLT_REG_CNT; i++)
                es->fltregs[i] = 0xdeadbeefdeadbeefULL;
 }
-#endif
 
 
-/* md_replace_executionstate_write *********************************************
+/* md_executionstate_write *****************************************************
 
    Write the given executionstate back to the context for Replacement.
 
 *******************************************************************************/
 
-#if defined(ENABLE_REPLACEMENT)
-void md_replace_executionstate_write(executionstate_t *es, void *context)
+void md_executionstate_write(executionstate_t *es, void *context)
 {
        ucontext_t *_uc;
        mcontext_t *_mc;
@@ -358,7 +354,6 @@ void md_replace_executionstate_write(executionstate_t *es, void *context)
        _mc->gregs[REG_EIP] = (ptrint) es->pc;
        _mc->gregs[REG_ESP] = (ptrint) es->sp;
 }
-#endif
 
 
 /* md_critical_section_restart *************************************************