From e377dd65b5599d5a9ecf4bfde625e25fcd45ae68 Mon Sep 17 00:00:00 2001 From: Virgile Bello Date: Tue, 10 Jul 2012 12:54:23 +0900 Subject: [PATCH] Fix #6112 c32a854: compile error and removed indirection. --- mono/mini/aot-compiler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 25c0f094b1c..320f9d9d6b5 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -1330,7 +1330,7 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size) #if defined(__native_client_codegen__) guint8 *buf_alloc; #endif - guint8 *labels [3]; + guint8 *labels [16]; guint8 mov_buf[3]; guint8 *mov_buf_ptr = mov_buf; @@ -1372,7 +1372,7 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size) /* No match */ 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)); + amd64_alu_reg_imm (code, X86_ADD, MONO_ARCH_IMT_SCRATCH_REG, 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; @@ -1381,7 +1381,7 @@ arch_emit_imt_thunk (MonoAotCompile *acfg, int offset, int *tramp_size) amd64_jump_membase (code, MONO_ARCH_IMT_SCRATCH_REG, 0); /* Fail */ - mono_x86_patch (labels [3], code); + mono_amd64_patch (labels [3], code); x86_breakpoint (code); /* mov (%rip), MONO_ARCH_IMT_SCRATCH_REG */ -- 2.25.1