#include <mono/utils/mono-counters.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-memory-model.h>
-#include <mono/utils/mono-hwcap-x86.h>
+#include <mono/utils/mono-hwcap.h>
#include <mono/utils/mono-threads.h>
#include "trace.h"
return code;
}
- /*
- * mono_arch_translate_tls_offset:
- *
- * Translate the TLS offset OFFSET computed by MONO_THREAD_VAR_OFFSET () into a format usable by OP_TLS_GET_REG/OP_TLS_SET_REG.
- */
-int
-mono_arch_translate_tls_offset (int offset)
-{
-#ifdef __APPLE__
- return tls_gs_offset + (offset * 4);
-#else
- return offset;
-#endif
-}
-
/*
* emit_setup_lmf:
*
case OP_XZERO:
x86_sse_alu_pd_reg_reg (code, X86_SSE_PXOR, ins->dreg, ins->dreg);
break;
+ case OP_XONES:
+ x86_sse_alu_pd_reg_reg (code, X86_SSE_PCMPEQB, ins->dreg, ins->dreg);
+ break;
case OP_FCONV_TO_R8_X:
x86_fst_membase (code, ins->backend.spill_var->inst_basereg, ins->backend.spill_var->inst_offset, TRUE, TRUE);
if (method->save_lmf) {
gint32 lmf_offset = cfg->lmf_var->inst_offset;
guint8 *patch;
- gboolean supported = FALSE;
-
- if (cfg->compile_aot) {
-#if defined(MONO_HAVE_FAST_TLS)
- supported = TRUE;
-#endif
- } else if (mono_get_jit_tls_offset () != -1) {
- supported = TRUE;
- }
/* check if we need to restore protection of the stack after a stack overflow */
+ /* FIXME */
+#if 0
if (supported) {
if (cfg->compile_aot) {
code = emit_load_aotconst (NULL, code, cfg, NULL, X86_ECX, MONO_PATCH_INFO_TLS_OFFSET, GINT_TO_POINTER (TLS_KEY_JIT_TLS));
} else {
/* FIXME: maybe save the jit tls in the prolog */
}
+#endif
/* restore caller saved regs */
if (cfg->used_int_regs & (1 << X86_EBX)) {
* LOCKING: called with the domain lock held
*/
gpointer
-mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count,
+mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count,
gpointer fail_tramp)
{
int i;
size += item->chunk_size;
}
if (fail_tramp)
- code = mono_method_alloc_generic_virtual_thunk (domain, size);
+ code = mono_method_alloc_generic_virtual_trampoline (domain, size);
else
code = mono_domain_code_reserve (domain, size);
start = code;
}
if (!fail_tramp)
- mono_stats.imt_thunks_size += code - start;
+ mono_stats.imt_trampolines_size += code - start;
g_assert (code - start <= size);
#if DEBUG_IMT
if (vtable)
buff = g_strdup_printf ("imt_%s_%s_entries_%d", vtable->klass->name_space, vtable->klass->name, count);
else
- buff = g_strdup_printf ("imt_thunk_entries_%d", count);
+ buff = g_strdup_printf ("imt_trampoline_entries_%d", count);
mono_emit_jit_tramp (start, code - start, buff);
g_free (buff);
}