#include "jit-icalls.h"
#include "ir-emit.h"
-static gint appdomain_tls_offset = -1;
-static gint thread_tls_offset = -1;
-
#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
#define IS_IMM32(val) ((((guint64)val) >> 32) == 0)
MonoMethodSignature *sig;
CallInfo *cinfo;
+ if (!strcmp (cfg->method->name, "MoveNextCore") && !strcmp (cfg->method->klass->name, "PredicateIterator"))
+ cfg->verbose_level = 4;
+
sig = mono_method_signature (cfg->method);
cinfo = get_call_info (cfg, cfg->mempool, sig, FALSE);
/* Branch opts can eliminate the branch */
if (!next || (!(MONO_IS_COND_BRANCH_OP (next) || MONO_IS_COND_EXC (next) || MONO_IS_SETCC (next)))) {
- ins->opcode = OP_NOP;
+ NULLIFY_INS (ins);
break;
}
/* Branch opts can eliminate the branch */
if (!next || (!(MONO_IS_COND_BRANCH_OP (next) || MONO_IS_COND_EXC (next) || MONO_IS_SETCC (next)))) {
- ins->opcode = OP_NOP;
+ NULLIFY_INS (ins);
break;
}
return NULL;
}
-static gboolean tls_offset_inited = FALSE;
-
void
mono_arch_setup_jit_tls_data (MonoJitTlsData *tls)
{
- if (!tls_offset_inited) {
- tls_offset_inited = TRUE;
-
- appdomain_tls_offset = mono_domain_get_tls_offset ();
- thread_tls_offset = mono_thread_get_tls_offset ();
- }
}
void
g_assert (code.buf - buf <= size);
size = code.buf - buf;
- start = mono_code_manager_reserve (domain->code_mp, size);
+ start = mono_domain_code_reserve (domain, size);
memcpy (start, buf, size);
mono_arch_flush_icache (start, size);
return 0;
}
-MonoInst* mono_arch_get_domain_intrinsic (MonoCompile* cfg)
+MonoInst*
+mono_arch_get_domain_intrinsic (MonoCompile* cfg)
{
- MonoInst* ins;
-
- if (appdomain_tls_offset == -1)
- return NULL;
-
- MONO_INST_NEW (cfg, ins, OP_TLS_GET);
- ins->inst_offset = appdomain_tls_offset;
- return ins;
+ return mono_get_domain_intrinsic (cfg);
}
-MonoInst* mono_arch_get_thread_intrinsic (MonoCompile* cfg)
+MonoInst*
+mono_arch_get_thread_intrinsic (MonoCompile* cfg)
{
- MonoInst* ins;
-
- if (thread_tls_offset == -1)
- return NULL;
-
- MONO_INST_NEW (cfg, ins, OP_TLS_GET);
- ins->inst_offset = thread_tls_offset;
- return ins;
+ return mono_get_thread_intrinsic (cfg);
}
gpointer