From nobody Sat Apr 26 08:28:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544758205176544.101496958195; Thu, 13 Dec 2018 19:30:05 -0800 (PST) Received: from localhost ([::1]:59106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+importer=patchew.org@nongnu.org>) id 1gXeAu-0007Ag-6D for importer@patchew.org; Thu, 13 Dec 2018 22:30:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe0j-0005px-EC for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe0i-0006O1-GX for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:33 -0500 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:41312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe0i-0006LS-9K for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:19:32 -0500 Received: by mail-ot1-x330.google.com with SMTP id u16so4105094otk.8 for <qemu-devel@nongnu.org>; Thu, 13 Dec 2018 19:19:32 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 19:19:30 -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=n03+W+s+dTlXDYsWDVZ6aqC7ETXVj+GjdAXOLOy0wp8=; b=NbCFN2D0FN5jBPG9cvBbEbDv1Dne1odpBcM2G/vO6suLYsJa5XwLsu5WyCtQi10lSh OI8wfjZvExquQF1XTbnz9usy5n1OJteiAc0iyIGj9evF3v6cCdP7AFQoTPwzLnECBRWo jLO6ayJZ+u0N9KE2bpLXHi9UiLYc8MKjCLN7A= 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=n03+W+s+dTlXDYsWDVZ6aqC7ETXVj+GjdAXOLOy0wp8=; b=aM+1pYIkmi47+H5PFxkmcSc4yIugWO2f4GQYI12fKERRsSDQgcYC0KzE10/jaFgwHO Nk/D0EN/lXv6p2oXtZxjzvPNn2aYSbNy3Yz+tGKsYVMaX0XJSOhKdz2PyNQlliuvXHE+ v0bWo8Udj56+kT+2BY5s76Nti0Du7jpVnlwtKLLGNnCPlZVV9tDp4GIZdfKpXgkRr+zT k8JY3sxv1DSv1sGnVe1uyqWap7QfOwSMNaGD88fNgeI1l21n4UH4za2nb+qQ+TA7OWdc DopeTBKDaampRuN2oQpGYigA+KByoR6w09BMQwAWdqeTMr4MeE/oZDBhMBnLX1p2XYjr O75w== X-Gm-Message-State: AA+aEWbjyaLPD+2pSNziuscrk/vPMV1vizo/wm436OvGtCbhsCr+Srsn nIcOJG0xqRhB2M24aoSVEpNcY3vv/raDyQ== X-Google-Smtp-Source: AFSGD/XMV5OKjVFjKqh4eQF1gYKnm5m9Fy8G/fuUEiBCkbSAKPaq56Q2ZS5Mk5GyIx+ddDedSSC7kA== X-Received: by 2002:a9d:88d:: with SMTP id 13mr898257otf.269.1544757571249; Thu, 13 Dec 2018 19:19:31 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 21:18:55 -0600 Message-Id: <20181214031923.29527-6-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 04/32] tcg/aarch64: Fold away "noaddr" branch routines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+importer=patchew.org@nongnu.org> X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/aarch64/tcg-target.inc.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index a41b633960..28de0226fb 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -1129,23 +1129,6 @@ static inline void tcg_out_goto_long(TCGContext *s, = tcg_insn_unit *target) } } =20 -static inline void tcg_out_goto_noaddr(TCGContext *s) -{ - /* We pay attention here to not modify the branch target by reading fr= om - the buffer. This ensure that caches and memory are kept coherent du= ring - retranslation. Mask away possible garbage in the high bits for the - first translation, while keeping the offset bits for retranslation.= */ - uint32_t old =3D tcg_in32(s); - tcg_out_insn(s, 3206, B, old); -} - -static inline void tcg_out_goto_cond_noaddr(TCGContext *s, TCGCond c) -{ - /* See comments in tcg_out_goto_noaddr. */ - uint32_t old =3D tcg_in32(s) >> 5; - tcg_out_insn(s, 3202, B_C, c, old); -} - static inline void tcg_out_callr(TCGContext *s, TCGReg reg) { tcg_out_insn(s, 3207, BLR, reg); @@ -1192,7 +1175,7 @@ static inline void tcg_out_goto_label(TCGContext *s, = TCGLabel *l) { if (!l->has_value) { tcg_out_reloc(s, s->code_ptr, R_AARCH64_JUMP26, l, 0); - tcg_out_goto_noaddr(s); + tcg_out_insn(s, 3206, B, 0); } else { tcg_out_goto(s, l->u.value_ptr); } @@ -1523,7 +1506,7 @@ static void tcg_out_tlb_read(TCGContext *s, TCGReg ad= dr_reg, TCGMemOp opc, =20 /* If not equal, we jump to the slow path. */ *label_ptr =3D s->code_ptr; - tcg_out_goto_cond_noaddr(s, TCG_COND_NE); + tcg_out_insn(s, 3202, B_C, TCG_COND_NE, 0); } =20 #endif /* CONFIG_SOFTMMU */ --=20 2.17.2