[Mono-dev] [PATCH] Minor MIPS changes to mono/mono/mini

Mark Mason mason at broadcom.com
Wed Oct 11 20:59:59 EDT 2006


Hello all,

Included below are patches to mono/mono/mini to begin adding support for
MIPS to the Mono JIT.  Primarily, this includes minor header file changes,
Makefile support for MIPS, and making print_ins() non-static for better
verbose support.

MIPS-specific files, and substantive MIPS-specific changes to shared
files will follow in later patches.  I just wanted to get the trivial
one out of the way first as a test balloon.

Tested by building svn tip + these changes for x86, and running 'make
check' in mono/mono/mini.

Thanks in advance,
Mark

---

Infrastructure changes to mono/mono/mini to support the MIPS JIT port.

Signed-off-by: Mark Mason <mason at broadcom.com>

Index: mono/mini/mini-arch.h
===================================================================
--- mono/mini/mini-arch.h	(revision 66536)
+++ mono/mini/mini-arch.h	(working copy)
@@ -21,6 +21,8 @@
 #include "mini-arm.h"
 #elif defined(__alpha__)
 #include "mini-alpha.h"
+#elif defined(__mips__)
+#include "mini-mips.h"
 #else
 #error add arch specific include file in mini-arch.h
 #endif
Index: mono/mini/mini-codegen.c
===================================================================
--- mono/mini/mini-codegen.c	(revision 66536)
+++ mono/mini/mini-codegen.c	(working copy)
@@ -27,6 +27,9 @@
 #elif defined(__sparc__) || defined(sparc)
 const char * const sparc_desc [OP_LAST];
 static const char*const * ins_spec = sparc_desc;
+#elif defined(__mips__) || defined(mips)
+const char * const mips_desc [OP_LAST];
+static const char*const * ins_spec = mips_desc;
 #elif defined(__i386__)
 extern const char * const x86_desc [OP_LAST];
 static const char*const * ins_spec = x86_desc;
@@ -382,7 +385,7 @@
 } RegTrack;
 
 #ifndef DISABLE_LOGGING
-static void
+void
 print_ins (int i, MonoInst *ins)
 {
 	const char *spec = ins_spec [ins->opcode];
Index: mono/mini/Makefile.am
===================================================================
--- mono/mini/Makefile.am	(revision 66536)
+++ mono/mini/Makefile.am	(working copy)
@@ -134,6 +134,13 @@
 	exceptions-arm.c	\
 	tramp-arm.c
 
+mips_sources = \
+	mini-mips.c		\
+	mini-mips.h		\
+	exceptions-mips.c	\
+	mini-codegen.c		\
+	tramp-mips.c
+
 sparc_sources = \
 	mini-sparc.c		\
 	mini-sparc.h		\
@@ -253,6 +260,12 @@
 arch_built=cpu-g4.h
 endif
 
+if MIPS
+arch_sources = $(mips_sources)
+arch_BURGSRC= $(srcdir)/inssel-long32-mips.brg $(srcdir)/inssel-mips.brg
+arch_built=cpu-mips.h
+endif
+
 if ARM
 
 # pick up arm_dpimacros.h and arm_fpamacros.h
@@ -356,6 +369,7 @@
 cpu-s390x.h: cpu-s390x.md
 cpu-ia64.h: cpu-ia64.md
 cpu-alpha.h: cpu-alpha.md
+cpu-mips.h: cpu-mips.md
 
 ## Gross hack.  Making 'genmdesc' a host binary takes more effort
 $(arch_built):
@@ -391,6 +405,9 @@
 cpu-alpha.h: cpu-alpha.md genmdesc$(EXEEXT)
 	./genmdesc $(srcdir)/cpu-alpha.md cpu-alpha.h alpha_desc
 
+cpu-mips.h: cpu-mips.md genmdesc$(EXEEXT)
+	./genmdesc $(srcdir)/cpu-mips.md cpu-mips.h mips_desc
+
 endif !CROSS_COMPILING
 
 inssel.c inssel.h: $(BURGSRC)





More information about the Mono-devel-list mailing list