Fix #6112 c32a854: compile error and removed indirection.
authorVirgile Bello <virgile.bello@gmail.com>
Tue, 10 Jul 2012 03:54:23 +0000 (12:54 +0900)
committerVirgile Bello <virgile.bello@gmail.com>
Tue, 10 Jul 2012 03:54:23 +0000 (12:54 +0900)
mono/mini/aot-compiler.c

index 25c0f094b1ce57b0fc0786cba13a1579582facfb..320f9d9d6b5dc95476eadb1125355c135edcf8eb 100644 (file)
@@ -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 <OFFSET>(%rip), MONO_ARCH_IMT_SCRATCH_REG */