]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
add jit-arch-arm.h
authorAleksey Demakov <ademakov@gmail.com>
Thu, 5 Feb 2009 21:06:43 +0000 (21:06 +0000)
committerAleksey Demakov <ademakov@gmail.com>
Thu, 5 Feb 2009 21:06:43 +0000 (21:06 +0000)
ChangeLog
include/jit/jit-arch-arm.h [new file with mode: 0644]

index 43845698e6d310942293b476f885fa6da5304293..875e8321e29cad243c0bb32860284a2ba1f27f7a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 2009-02-06  Michele Tartara  <mikyt@users.sourceforge.net>
 
-       * jit/jit-rules.h; define JIT_BACKEND_ARM on ARM
-       * tools/gen-apply.c: define PLATFORM_IS_ARM on ARM
+       * jit/jit-rules.h; define JIT_BACKEND_ARM on ARM.
+       * tools/gen-apply.c: define PLATFORM_IS_ARM on ARM.
+       * include/jit/jit-arch-arm.h: add ARM arch header.
 
 2009-01-30  Peter Fristedt  <fristedt@gmail.com>
             Kirill Kononenko  <Kirill.Kononenko@gmail.com>
diff --git a/include/jit/jit-arch-arm.h b/include/jit/jit-arch-arm.h
new file mode 100644 (file)
index 0000000..88223db
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * jit-arch-arm.h - Architecture-specific definitions.
+ *
+ * Copyright (C) 2006  Southern Storm Software, Pty Ltd.
+ *
+ * The libjit library is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation, either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * The libjit library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the libjit library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef        _JIT_ARCH_ARM_H
+#define        _JIT_ARCH_ARM_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)         \
+       do {                                    \
+               register void *__f asm("fp");   \
+               f = __f;                        \
+       } while(0)
+#else
+#undef _JIT_ARCH_GET_CURRENT_FRAME
+#endif
+
+#endif /* _JIT_ARCH_ARM_H */