From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULEq6-00028e-1u for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULEpz-0003hN-Qm for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:34:05 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:45278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULEpz-0003hE-LZ for qemu-devel@nongnu.org; Thu, 28 Mar 2013 11:33:59 -0400 Received: by mail-pa0-f44.google.com with SMTP id bi5so2756683pad.3 for ; Thu, 28 Mar 2013 08:33:59 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 28 Mar 2013 08:33:00 -0700 Message-Id: <1364484781-15561-20-git-send-email-rth@twiddle.net> In-Reply-To: <1364484781-15561-1-git-send-email-rth@twiddle.net> References: <1364484781-15561-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v3 19/20] tcg-arm: Use movi32 + blx for calls on v7 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Aurelien Jarno 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. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 3949623..148fd6f 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -988,6 +988,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); -- 1.8.1.4