Merge pull request #5101 from alexrp/profiler-api
[mono.git] / mono / mini / tramp-arm.c
index 82d3e95868cbc7cfeb73749282c80fbe1a644594..935a2ee6882c14839f1b5bd6e6c3721c826990a7 100644 (file)
@@ -717,14 +717,13 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
        /* Obtain jit_tls->handler_block_return_address */
        if (aot) {
                code = mono_arm_emit_aotconst (&ji, code, buf, ARMREG_R0, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_arm_handler_block_trampoline_helper");
-               ARM_B (code, 0);
        } else {
                ARM_LDR_IMM (code, ARMREG_R0, ARMREG_PC, 0);
                ARM_B (code, 0);
                *(gpointer*)code = mono_arm_handler_block_trampoline_helper;
                code += 4;
        }
-
+       ARM_BLX_REG (code, ARMREG_R0);
        /* Set it as the return address so the trampoline will return to it */
        ARM_MOV_REG_REG (code, ARMREG_LR, ARMREG_R0);