+2010-06-19 Zoltan Varga <vargaz@gmail.com>
+
+ * tramp-amd64.c (mono_arch_create_generic_trampoline): Increase the buf len a little,
+ to avoid an assert.
+
2010-06-18 Zoltan Varga <vargaz@gmail.com>
* aot-compiler.c (emit_klass_info): Mark unloadable classes properly.
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code, *tramp, *br [2], *r11_save_code, *after_r11_save_code;
- int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, tramp_offset, saved_regs_offset;
+ int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, tramp_offset;
+ int buf_len, saved_regs_offset;
int saved_fpregs_offset, rbp_offset, framesize, orig_rsp_to_rbp_offset, cfa_offset;
gboolean has_caller;
GSList *unwind_ops = NULL;
else
has_caller = TRUE;
- code = buf = mono_global_codeman_reserve (538);
+ buf_len = 548;
+ code = buf = mono_global_codeman_reserve (buf_len);
framesize = 538 + sizeof (MonoLMF);
framesize = (framesize + (MONO_ARCH_FRAME_ALIGNMENT - 1)) & ~ (MONO_ARCH_FRAME_ALIGNMENT - 1);
amd64_jump_membase (code, AMD64_RSP, rax_offset - 0x8);
}
- g_assert ((code - buf) <= 538);
+ g_assert ((code - buf) <= buf_len);
mono_arch_flush_icache (buf, code - buf);