aboutsummaryrefslogtreecommitdiff
path: root/lang/libjit
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-11-30 10:05:56 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-11-30 10:05:56 +0000
commit2452857462ee1890f50d091e3fbe4b0c1bcfd130 (patch)
treeefa38741d993950b4bd040b133fa75f56e3e6bc7 /lang/libjit
parentdf985467625497144f69aa253d7feaa9af81b441 (diff)
downloadports-2452857462ee1890f50d091e3fbe4b0c1bcfd130.tar.gz
ports-2452857462ee1890f50d091e3fbe4b0c1bcfd130.zip
Notes
Diffstat (limited to 'lang/libjit')
-rw-r--r--lang/libjit/Makefile3
-rw-r--r--lang/libjit/files/extra-jit-rules-interp.h103
2 files changed, 106 insertions, 0 deletions
diff --git a/lang/libjit/Makefile b/lang/libjit/Makefile
index 57d422e0a2d5..0415f8290f32 100644
--- a/lang/libjit/Makefile
+++ b/lang/libjit/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libjit
PORTVERSION= 0.1.0
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://download.savannah.gnu.org/releases/dotgnu-pnet/
@@ -33,6 +34,8 @@ BROKEN= Fails to compile: internal gcc error
.endif
post-patch:
+# fix for amd64, Upstream forgot a header file
+ ${CP} ${FILESDIR}/extra-jit-rules-interp.h ${WRKSRC}/jit/jit-rules-interp.h
.if ${OSVERSION} >= 502128
@${REINPLACE_CMD} -e 's|#undef HAVE_TGMATH_H||' \
${WRKSRC}/config.h.in
diff --git a/lang/libjit/files/extra-jit-rules-interp.h b/lang/libjit/files/extra-jit-rules-interp.h
new file mode 100644
index 000000000000..f0094076a703
--- /dev/null
+++ b/lang/libjit/files/extra-jit-rules-interp.h
@@ -0,0 +1,103 @@
+/*
+ * jit-rules-interp.h - Rules that define the interpreter characteristics.
+ *
+ * Copyright (C) 2004 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_RULES_INTERP_H
+#define _JIT_RULES_INTERP_H
+
+#include "jit-interp.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Information about all of the registers, in allocation order.
+ */
+#define JIT_REG_INFO \
+ {"r0", 0, -1, JIT_REG_ALL | JIT_REG_CALL_USED | \
+ JIT_REG_IN_STACK}, \
+ {"r1", 1, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r2", 2, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r3", 3, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r4", 4, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r5", 5, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r6", 6, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r7", 7, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r8", 8, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r9", 9, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r10", 10, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r11", 11, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r12", 12, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r13", 13, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r14", 14, -1, JIT_REG_ALL | JIT_REG_CALL_USED | JIT_REG_IN_STACK}, \
+ {"r15", 15, -1, JIT_REG_ALL | JIT_REG_CALL_USED | \
+ JIT_REG_IN_STACK},
+#define JIT_NUM_REGS 16
+#define JIT_NUM_GLOBAL_REGS 0
+
+#define JIT_REG_STACK 1
+#define JIT_REG_STACK_START 0
+#define JIT_REG_STACK_END 15
+
+/*
+ * Define to 1 if we should always load values into registers
+ * before operating on them. i.e. the CPU does not have reg-mem
+ * and mem-reg addressing modes.
+ */
+#define JIT_ALWAYS_REG_REG 1
+
+/*
+ * The maximum number of bytes to allocate for the prolog.
+ * This may be shortened once we know the true prolog size.
+ */
+#define JIT_PROLOG_SIZE jit_function_interp_size
+
+/*
+ * Preferred alignment for the start of functions.
+ */
+#define JIT_FUNCTION_ALIGNMENT (sizeof(void *))
+
+/*
+ * Define this to 1 if the platform allows reads and writes on
+ * any byte boundary. Define to 0 if only properly-aligned
+ * memory accesses are allowed.
+ */
+#define JIT_ALIGN_OVERRIDES 0
+
+/*
+ * Extra state information that is added to the "jit_gencode" structure.
+ */
+#define jit_extra_gen_state \
+ int working_area; \
+ int max_working_area; \
+ int extra_working_space
+#define jit_extra_gen_init(gen) \
+ do { \
+ (gen)->working_area = 0; \
+ (gen)->max_working_area = 0; \
+ (gen)->extra_working_space = 0; \
+ } while (0)
+#define jit_extra_gen_cleanup(gen) do { ; } while (0)
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* _JIT_RULES_INTERP_H */