#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;
/* 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;
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 */