[arm] Fix the handler block trampoline, it didn't actually call the helper function.
authorZoltan Varga <vargaz@gmail.com>
Thu, 6 Jul 2017 19:06:51 +0000 (15:06 -0400)
committerZoltan Varga <vargaz@gmail.com>
Thu, 6 Jul 2017 19:06:51 +0000 (15:06 -0400)
mono/mini/tramp-arm.c

index 13c09ac33a72ca821bbd6085e2568cf7596171d3..743abcb79c0bc879dd5dc203ecf83006130f2f21 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);