From: Rhys Weatherley Date: Tue, 8 Jun 2004 03:27:50 +0000 (+0000) Subject: arm_call: use a more efficient form of call for offsets beyond the X-Git-Tag: r.0.0.4~37 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9fa4a7ad29f905402b364e26d7cb33163ca1126d;p=francis%2Flibjit.git arm_call: use a more efficient form of call for offsets beyond the simple target range. --- diff --git a/ChangeLog b/ChangeLog index 026ad7d..87b755a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,9 @@ * jit/jit-reg-alloc.c (_jit_regs_set_outgoing): implement missing function. + * jit/jit-gen-arm.h (arm_call): use a more efficient form of + call for offsets beyond the simple target range. + 2004-06-08 Miroslaw Dobrzanski-Neumann * jit/jit-alloc.c: fix ROUND_END_PTR so that it adds the size diff --git a/jit/jit-gen-arm.h b/jit/jit-gen-arm.h index 35071e0..a96ccfa 100644 --- a/jit/jit-gen-arm.h +++ b/jit/jit-gen-arm.h @@ -576,9 +576,10 @@ extern arm_inst_ptr _arm_mov_reg_imm } \ else \ { \ - arm_mov_reg_imm((inst), ARM_WORK, (int)(target)); \ - arm_mov_reg_reg((inst), ARM_LINK, ARM_PC); \ + arm_load_membase((inst), ARM_WORK, ARM_PC, 4); \ + arm_alu_reg_imm8((inst), ARM_ADD, ARM_LINK, ARM_PC, 4); \ arm_mov_reg_reg((inst), ARM_PC, ARM_WORK); \ + *(inst)++ = (int)(target); \ } \ } while (0)