dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] libjit/include/jit jit-arch-generic.h jit-arch-...


From: Aleksey Demakov
Subject: [dotgnu-pnet-commits] libjit/include/jit jit-arch-generic.h jit-arch-...
Date: Mon, 25 Sep 2006 06:56:36 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    libjit
Changes by:     Aleksey Demakov <avd>   06/09/25 06:56:36

Added files:
        include/jit    : jit-arch-generic.h jit-arch-x86.h 

Log message:
        add jit-arch-generic.h and jit-arch-x86.h files

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-arch-generic.h?cvsroot=dotgnu-pnet&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-arch-x86.h?cvsroot=dotgnu-pnet&rev=1.1

Patches:
Index: jit-arch-generic.h
===================================================================
RCS file: jit-arch-generic.h
diff -N jit-arch-generic.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ jit-arch-generic.h  25 Sep 2006 06:56:36 -0000      1.1
@@ -0,0 +1,30 @@
+/*
+ * jit-arch-generic.h - Architecture-specific definitions.
+ *
+ * Copyright (C) 2006  Southern Storm Software, Pty Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef        _JIT_ARCH_GENERIC_H
+#define        _JIT_ARCH_GENERIC_H
+
+/*
+ * If defined _JIT_ARCH_GET_CURRENT_FRAME() macro assigns the current frame
+ * pointer to the supplied argument that has to be a void pointer.
+ */
+#undef _JIT_ARCH_GET_CURRENT_FRAME
+
+#endif /* _JIT_ARCH_GENERIC_H */

Index: jit-arch-x86.h
===================================================================
RCS file: jit-arch-x86.h
diff -N jit-arch-x86.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ jit-arch-x86.h      25 Sep 2006 06:56:36 -0000      1.1
@@ -0,0 +1,43 @@
+/*
+ * jit-arch-x86.h - Architecture-specific definitions.
+ *
+ * Copyright (C) 2006  Southern Storm Software, Pty Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef        _JIT_ARCH_X86_H
+#define        _JIT_ARCH_X86_H
+
+/*
+ * If defined _JIT_ARCH_GET_CURRENT_FRAME() macro assigns the current frame
+ * pointer to the supplied argument that has to be a void pointer.
+ */
+#if defined(__GNUC__)
+#define _JIT_ARCH_GET_CURRENT_FRAME(f)         \
+       asm("movl %%ebp, %0" : "=g" (f))
+#elif defined(_MSC_VER) && defined(_M_IX86)
+#define        _JIT_ARCH_GET_CURRENT_FRAME(f)          \
+       do {                                    \
+               __asm                           \
+               {                               \
+                       mov dword ptr f, ebp    \
+               }                               \
+       } while(0)
+#else
+#undef _JIT_ARCH_GET_CURRENT_FRAME
+#endif
+
+#endif /* _JIT_ARCH_X86_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]