From patchwork Fri Nov 30 21:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 152600 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4172949ljp; Fri, 30 Nov 2018 14:00:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/WLAOXhPecBqaLfOtxSyPcCNWHEjGOOrhJB7VJ8sEZCMca5+BhY6UGWp+1/XIfzFpwtoKI2 X-Received: by 2002:a5b:4a:: with SMTP id e10-v6mr7063723ybp.485.1543615254725; Fri, 30 Nov 2018 14:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543615254; cv=none; d=google.com; s=arc-20160816; b=HAHdQBEwFOE9WnAoJZzFL4UykHoy/mpbf4b/JYcdsEF/03tf3sG8oOgYLZi9YBgJIV QYxChwwZxHk3eXg6pB8NZSEWXmkQxCtA5rt407kH2flnccjfFUohzKt/mhBAP3Ee9xsS qC8aPIP/T/Sslh312F5hIel7a7Is/ex0OOqc7JnGyXXO0LzVmxwXYo5PXO0LM2zQZj4x JXK7vV3aDLQ1+ldxibOzLEjzMiI2FVBvj9yO2ZwnYIoL2Kl0jojLDYJ9muKAsvE2VSXB xuE8D7eqQkSo63XkuSjIQzuL6CB3jhmEOgEIzajouAYL8T0nCBvJflXnrBn7ivc2wkpH dktg== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=Kwdiribgzx2Cbccg4TG0vd/ef0gMrNWExhCNQW0ga6s=; b=GEUT7ohIgGxJWno6aj/T3C2BIpJ2z5fpCnxoyJ4FcygUxBajG99hVIAwd0PbI1yjXb kPDydDC78AVMJb4ZMZOvfp2J0II7f8s0AY/ACwdIFKDWTkPs0iUeNCQpvu28qtEu50ZB k1ScicGDEscLS4a7aPptAGNvW/XAQbzgjXUqtq7icBH6EYqUuD+tavvXGgu+mmyoldct aYJ7sdHhNszjEk1NFddQMIK9LBur+cTtSB+QjEonCYsuM41wzijZm+6WoH5OHcgpifmP 5VGxv8K1J5hNx1mzlaNYzJWO8crsSKYryQ475bwKy2hIqSZaT9NLn+Yqfxi426DmCcdG oGcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OmIBjvnm; 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 b13si3956872ywe.191.2018.11.30.14.00.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 30 Nov 2018 14:00:54 -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=OmIBjvnm; 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]:34780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSqqE-0000tZ-4J for patch@linaro.org; Fri, 30 Nov 2018 17:00:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSqi7-0007sI-0u for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSqi6-0006Wr-37 for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:30 -0500 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:44117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSqi5-0006RE-TF for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:30 -0500 Received: by mail-pg1-x544.google.com with SMTP id t13so3036035pgr.11 for ; Fri, 30 Nov 2018 13:52:29 -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; bh=Kwdiribgzx2Cbccg4TG0vd/ef0gMrNWExhCNQW0ga6s=; b=OmIBjvnm1G9nGS12ATFtW75Zmw2sdWzseKxscYWiH9Gt4d/n0IIyoTenXy4+VXYqTE hvIXxXRdo4PnfkFk0RJIVUoeSJG8h+9ct21XvQ1Bw8bx8bL+mJYiPwAAQ4zJkV/bkxSd FBqEmg8NQ8hk4L8+re/8k8/aMqapenpMZ+tXA= 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; bh=Kwdiribgzx2Cbccg4TG0vd/ef0gMrNWExhCNQW0ga6s=; b=FaUNpnz3g0FvBkfJExHcKHQz4KbM9VklND4FftQUQBdjTMSSJ1DZuI+FB1cuMFJ6w1 +e4zCbEqMS5a4yFHN7NuhoBYiWz/z+F7aIaW8gMtgElCFeBMf3m5EmqRW2KzQb6eFJPb xN87+pw/Rlo5w/VoY2C00UVMh0O03Du76/QE/wdNz9cGRi7GWuW0DimuL7ah08eVHGgc xY5VfAd/HU/EAxfLzI8pEcnCGUWYxDyzBgEaNMpWI4MYa8XDDl1OH5I491D8gkwqJxjq 49wT1KOJY63P37zRcv6+3A3DX5uuxIXU99ig62NJfuSRG4ua3jLmKIiD+Z8kQ3c8F+/k UhOQ== X-Gm-Message-State: AA+aEWbQd1bCijvHUApS8WmopuhhPfIpUFSvJqt0e9WkvcqBwumwCx3d C5mD484CrtmnHQags3oGfHAFLE/Z02k= X-Received: by 2002:a62:ce0e:: with SMTP id y14mr7531215pfg.100.1543614748468; Fri, 30 Nov 2018 13:52:28 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-170-180.tukw.qwest.net. [97.113.170.180]) by smtp.gmail.com with ESMTPSA id a18sm6973967pgj.30.2018.11.30.13.52.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 13:52:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 30 Nov 2018 13:52:09 -0800 Message-Id: <20181130215221.20554-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181130215221.20554-1-richard.henderson@linaro.org> References: <20181130215221.20554-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v3 04/16] tcg/aarch64: 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: alex.bennee@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. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) -- 2.17.2 Reviewed-by: Alex Bennée 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) } } -static inline void tcg_out_goto_noaddr(TCGContext *s) -{ - /* We pay attention here to not modify the branch target by reading from - the buffer. This ensure that caches and memory are kept coherent during - retranslation. Mask away possible garbage in the high bits for the - first translation, while keeping the offset bits for retranslation. */ - uint32_t old = 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 = 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 addr_reg, TCGMemOp opc, /* If not equal, we jump to the slow path. */ *label_ptr = s->code_ptr; - tcg_out_goto_cond_noaddr(s, TCG_COND_NE); + tcg_out_insn(s, 3202, B_C, TCG_COND_NE, 0); } #endif /* CONFIG_SOFTMMU */