From patchwork Fri Dec 14 03:18:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 153722 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1603292ljp; Thu, 13 Dec 2018 19:34:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/X1xFCNmSP3nX1+SJf5d2e34i+11/uSlBJ6qS/2mXSpXpWFxcNrr+wSN+cOWH4yTNdxsbqc X-Received: by 2002:a0c:bd9f:: with SMTP id n31mr1248564qvg.193.1544758471864; Thu, 13 Dec 2018 19:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544758471; cv=none; d=google.com; s=arc-20160816; b=r1Mz18+WVIzRQVf2LbtYBzEQguknQueyxwRZaS1HANmRWTaKeFrmdt1uu7CIw0cGRh PC8ZX1yLRDvW90iEL2pCR6qtIYb/oRXKe7g/EkUNIs6VJAUfDKP8o6bgs6HXVnyVSzDB hXxovBeKBVQmFiQKT1Ft/IZUombSeKWGErErS5FKhKQ8o9DlHE0XGfWacIcEoAUqNzb/ xQtoLrnG1LA5BGyjeLBRL/nID9XUvcjtpfx28HD6lUBLadoUCH6pIlTpWsM1uUS6ikrd FwcWOCwz5Ri4Rd62/jRkZ52lHeKBt7lbfqrYBQOHthTmvUVXbM6sLZY/HNJ8bsgHx54T NXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=buPH91XJpUfNOE4HN6QSs39fZ6Yqo5clHmdORG592tI=; b=AMIfVsAeNtKKvGCdTNIrxyoHoirf2VYTGuD1w+1e0hMlvJ3oYGAL2iy+Me8QnNGV85 +rXQEQVaogAlaxMU2bEKiyLr0xywKhfwN155C3mAKLfQ8mJpusj4Ig+IiZs9ZSyJcqnd KxGMT8nZZqt9rfpOaa38w17QSHRSlrkzvqzTs9gr9tql8VO5xr33yzFsNtp6F1V+oRIR 2FOSew+80alSXkETEHwCh+7MHCxxTUDAknSRNE5lecXL5gdFZeyaFdsLtBuZ+HzZ3Dvb Xzx2nm1HI3e4SPbCQZb9FmLRWlpe9HiMFSeUjk8DDaG4TZKalpv6tMvsm3ye4r2a79jU elHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AxxiwuuX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id b2si691402qti.171.2018.12.13.19.34.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 13 Dec 2018 19:34:31 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AxxiwuuX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXeFD-000177-8a for patch@linaro.org; Thu, 13 Dec 2018 22:34:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXe0l-0005sX-I0 for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXe0k-0006Ur-KT for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:35 -0500 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:35544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXe0k-0006TU-Eg for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:34 -0500 Received: by mail-ot1-x330.google.com with SMTP id 81so4129229otj.2 for ; Thu, 13 Dec 2018 19:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=buPH91XJpUfNOE4HN6QSs39fZ6Yqo5clHmdORG592tI=; b=AxxiwuuXAwT9Ju6apEsJxb2aXwSCvjkULO4ET5NhU39oJU1Ge3s04pPD7+Pg1+8yNN VpBigsxqYurE0l/Fohna9zP1uOEi+EHcd9kcSycG9a0SmcywqrGUVTSE7VXzrhhOdbIj vb6kB8T7CIv/CbPwXwgB47Vgn3OACWWJB2QE8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=buPH91XJpUfNOE4HN6QSs39fZ6Yqo5clHmdORG592tI=; b=JgXgHAg8+qgeuXdutKflfv2DweuaEK9BB1n1WaeRSSiLb9VaoF6zOBYDjabUmjAqVE oVY86q4M+O+Eqzk8EeIkjygDi/umPgAHI3E32MLZ/vfL0GH7OekbHmGFUKmu7S9i0KTB c4tu9tvl+vULuLT1qvV7Zqf/yohxB4NXZBaCqotXE6HWS+o+HE4XCzVJi6WTwvHhzSOI pa63OIHEJpJhkRTFDW+Um8roMWg1DU37oswgVhQg1R2VS4IZS/0GQqBhrSf2u5GFBSux 2ZbJQKlTzR2pnkb2kaPNPPm+o7cweSMCVV7L0LhI24uhEdIhV4xlDjaB9hFoA86Qq9IF /uYg== X-Gm-Message-State: AA+aEWbYGgBf2G4kl3onc1vGqTqL7JIZE50U/fy+koaKYFWiLtaIgROp 38N5Xn02JPTZ4wRAreK3nD2tqxSFS3wkjQ== X-Received: by 2002:a9d:3f34:: with SMTP id m49mr920186otc.23.1544757573425; Thu, 13 Dec 2018 19:19:33 -0800 (PST) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id g138sm2367537oib.26.2018.12.13.19.19.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 19:19:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 21:18:57 -0600 Message-Id: <20181214031923.29527-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181214031923.29527-1-richard.henderson@linaro.org> References: <20181214031923.29527-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::330 Subject: [Qemu-devel] [PULL 06/32] tcg/arm: Fold away "noaddr" branch routines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are one use apiece for these. There is no longer a need for preserving branch offset operands, as we no longer re-translate. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) -- 2.17.2 diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 1142eb13ad..1651f00281 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc.c @@ -366,22 +366,6 @@ static inline void tcg_out_b(TCGContext *s, int cond, int32_t offset) (((offset - 8) >> 2) & 0x00ffffff)); } -static inline void tcg_out_b_noaddr(TCGContext *s, int cond) -{ - /* We pay attention here to not modify the branch target by masking - the corresponding bytes. This ensure that caches and memory are - kept coherent during retranslation. */ - tcg_out32(s, deposit32(*s->code_ptr, 24, 8, (cond << 4) | 0x0a)); -} - -static inline void tcg_out_bl_noaddr(TCGContext *s, int cond) -{ - /* We pay attention here to not modify the branch target by masking - the corresponding bytes. This ensure that caches and memory are - kept coherent during retranslation. */ - tcg_out32(s, deposit32(*s->code_ptr, 24, 8, (cond << 4) | 0x0b)); -} - static inline void tcg_out_bl(TCGContext *s, int cond, int32_t offset) { tcg_out32(s, (cond << 28) | 0x0b000000 | @@ -1082,7 +1066,7 @@ static inline void tcg_out_goto_label(TCGContext *s, int cond, TCGLabel *l) tcg_out_goto(s, cond, l->u.value_ptr); } else { tcg_out_reloc(s, s->code_ptr, R_ARM_PC24, l, 0); - tcg_out_b_noaddr(s, cond); + tcg_out_b(s, cond, 0); } } @@ -1628,7 +1612,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, bool is64) /* This a conditional BL only to load a pointer within this opcode into LR for the slow path. We will not be using the value for a tail call. */ label_ptr = s->code_ptr; - tcg_out_bl_noaddr(s, COND_NE); + tcg_out_bl(s, COND_NE, 0); tcg_out_qemu_ld_index(s, opc, datalo, datahi, addrlo, addend); @@ -1760,7 +1744,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, bool is64) /* The conditional call must come last, as we're going to return here. */ label_ptr = s->code_ptr; - tcg_out_bl_noaddr(s, COND_NE); + tcg_out_bl(s, COND_NE, 0); add_qemu_ldst_label(s, false, oi, datalo, datahi, addrlo, addrhi, s->code_ptr, label_ptr);