Fix #6112 for amd64 as well.

This commit is contained in:
Zoltan Varga committed 2012-07-16 05:13:38 +02:00
1 parent e1b5c77de1
commit c32a854800
1 file changed
+11 -1
+11 -1
View File
@@ -1370,8 +1370,18 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size)
amd64_jump_membase (code, MONO_ARCH_IMT_SCRATCH_REG, 0);
/* No match */
/* FIXME: */
mono_amd64_patch (labels [1], code);
/* Load fail tramp */
amd64_mov_reg_membase (code, MONO_ARCH_IMT_SCRATCH_REG, MONO_ARCH_IMT_SCRATCH_REG, sizeof (gpointer), sizeof (gpointer));
/* Check if there is a fail tramp */
amd64_alu_membase_imm (code, X86_CMP, MONO_ARCH_IMT_SCRATCH_REG, 0, 0);
labels [3] = code;
amd64_branch8 (code, X86_CC_Z, 0, FALSE);
/* Jump to fail tramp */
amd64_jump_membase (code, MONO_ARCH_IMT_SCRATCH_REG, 0);
/* Fail */
mono_x86_patch (labels [3], code);
x86_breakpoint (code);
/* mov <OFFSET>(%rip), MONO_ARCH_IMT_SCRATCH_REG */