]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
arm_call: use a more efficient form of call for offsets beyond the
authorRhys Weatherley <rweather@southern-storm.com.au>
Tue, 8 Jun 2004 03:27:50 +0000 (03:27 +0000)
committerRhys Weatherley <rweather@southern-storm.com.au>
Tue, 8 Jun 2004 03:27:50 +0000 (03:27 +0000)
simple target range.

ChangeLog
jit/jit-gen-arm.h

index 026ad7d086e246967dca027486c742ac9df5bd74..87b755a582e126b439a13aa02149223a9fc827a1 100644 (file)
--- 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  <mne@mosaic-ag.com>
 
        * jit/jit-alloc.c: fix ROUND_END_PTR so that it adds the size
index 35071e0b46e2eb223d51daebf4c4b049f40746d1..a96ccfa58fffc271ab84bf8e4e90f2f2199e0c64 100644 (file)
@@ -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)