From patchwork Sat Mar 30 20:43:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 232566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CB1582C009F for ; Sun, 31 Mar 2013 07:49:07 +1100 (EST) Received: from localhost ([::1]:55500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM2i2-0002kO-0r for incoming@patchwork.ozlabs.org; Sat, 30 Mar 2013 16:49:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM2dV-0004DJ-Dq for qemu-devel@nongnu.org; Sat, 30 Mar 2013 16:44:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UM2dT-0005wH-04 for qemu-devel@nongnu.org; Sat, 30 Mar 2013 16:44:25 -0400 Received: from mail-pb0-f43.google.com ([209.85.160.43]:45515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UM2dS-0005wC-Qy for qemu-devel@nongnu.org; Sat, 30 Mar 2013 16:44:22 -0400 Received: by mail-pb0-f43.google.com with SMTP id md4so664835pbc.2 for ; Sat, 30 Mar 2013 13:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=JkMx8XsxMzPEIGDbjwc2+LsKSxDizi/DyNfKtlUVgbc=; b=BzlBeWMm9CHZCltY2RiDTpr2aJ8adzryjjsGOUPuGAbAMH3TBNx6GW0gUy/rKInM/2 gs0oQOY/J+MDkfipx96f3skbp8k7WcDlvlfR47k9hNlK1QMSDLvnhCrRwxWORw5mv9+y JtGwphBvPLYe+caPaEt5/u83zNDcSh2FqUCbTZGigwc58N4I+rbDEDHw0tNZ3Ad9vRyG PlMFE5TZX9s65V6jtDLqWbHX86TZ03LjDTYO8T49awCvyBGFiG+i8xQtKRCaaGNembLN tgyttzMtKxpQMIyHuvotGfsGr6lGWnKtxQwo6lSWKgTgH9l19Cmao60u6cC1PfP5LSD8 BGWQ== X-Received: by 10.68.164.33 with SMTP id yn1mr10447670pbb.166.1364676262205; Sat, 30 Mar 2013 13:44:22 -0700 (PDT) Received: from fremont.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id gf1sm7620362pbc.24.2013.03.30.13.44.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 30 Mar 2013 13:44:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 30 Mar 2013 13:43:25 -0700 Message-Id: <1364676207-21516-17-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1364676207-21516-1-git-send-email-rth@twiddle.net> References: <1364676207-21516-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.43 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH v4 16/18] tcg-arm: Use movi32 + blx for calls on v7 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 7962136..7791314 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1019,6 +1019,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);