Merge pull request #4419 from BrzVlad/fix-oom-nre
[mono.git] / mono / mini / mini-mips.h
index d8d769130c4fc049ec242d90b650e55040a17865..df179bd2545334cd8cf1eca629efc0f54b487a43 100644 (file)
@@ -17,7 +17,7 @@
 #endif
 
 
-#define MONO_ARCH_CPU_SPEC mips_desc
+#define MONO_ARCH_CPU_SPEC mono_mips_desc
 
 #define MONO_MAX_IREGS 32
 #define MONO_MAX_FREGS 32
@@ -231,7 +231,15 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_EMULATE_LCONV_TO_R4 1
 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
 #define MONO_ARCH_EMULATE_FREM 1
-#define MONO_ARCH_BIGMUL_INTRINS 1
+#endif
+
+/*
+ * mips backend misses some instructions that enable emitting of optimal
+ * code on other targets and, additionally, the register allocator gets
+ * confused by this optimization, failing to allocate all hw regs.
+ */
+#if SIZEOF_REGISTER == 4
+#define MONO_ARCH_NO_DIV_WITH_MUL
 #endif
 
 #if SIZEOF_REGISTER == 8
@@ -265,10 +273,9 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS 1
 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
 
-#define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
+#define MONO_ARCH_HAVE_GENERALIZED_IMT_TRAMPOLINE 1
 #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
 #define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
-#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
 #define MONO_ARCH_HAVE_SETUP_RESUME_FROM_SIGNAL_HANDLER_CTX 1
 #define MONO_ARCH_GSHARED_SUPPORTED 1
 
@@ -330,8 +337,6 @@ typedef struct {
 
 #undef DEBUG_EXCEPTIONS
 
-#define MONO_ZERO_REG          mips_zero
-
 #define        MONO_EMIT_NEW_MIPS_COND_EXC(cfg,cond,sr1,sr2,name) do { \
                 MonoInst *inst; \
                MONO_INST_NEW ((cfg), (inst), cond); \