diff options
author | Richard Henderson <rth@twiddle.net> | 2013-03-13 13:40:43 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2013-04-27 02:16:45 +0200 |
commit | 302fdde73f88fd958acfa18b670eed092eab21a0 (patch) | |
tree | 47410ab7519dc0578a7b71f19653a46b957445d1 | |
parent | 595b5397cc589d694ec3af660b21f483e8142f69 (diff) |
tcg-arm: Use movi32 + blx for calls on v7
Work better with branch predition when we have movw+movt,
as the size of the code is the same. Perhaps re-evaluate
when we have a proper constant pool.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | tcg/arm/tcg-target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 5fa3cb1258..eb697f2942 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1016,6 +1016,9 @@ static inline void tcg_out_call(TCGContext *s, uint32_t addr) } else { tcg_out_bl(s, COND_AL, val); } + } else if (use_armv7_instructions) { + tcg_out_movi32(s, COND_AL, TCG_REG_TMP, addr); + tcg_out_blx(s, COND_AL, TCG_REG_TMP); } else { tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R14, TCG_REG_PC, 4); tcg_out_ld32_12(s, COND_AL, TCG_REG_PC, TCG_REG_PC, -4); |