Skip to content

Commit

Permalink
tcg-arm: Use movi32 + blx for calls on v7
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 authored and aurel32 committed Apr 27, 2013
1 parent 595b539 commit 302fdde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tcg/arm/tcg-target.c
Expand Up @@ -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);
Expand Down

0 comments on commit 302fdde

Please sign in to comment.