From patchwork Fri Dec 14 03:18:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 153719 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1601041ljp; Thu, 13 Dec 2018 19:30:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/WUyUi8WvYeq/m4XFGuBkZI24ihGPCbkd/d1/MhpGvs491riXVMMyHIIimUCSVTCRDvh+a5 X-Received: by 2002:ac8:30ac:: with SMTP id v41mr1241222qta.51.1544758256454; Thu, 13 Dec 2018 19:30:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544758256; cv=none; d=google.com; s=arc-20160816; b=V4jDAUmUhKHQ4fBNRgjQODiNlim662EP4iRtw/i756hZK56ihm++hRaQFmfGl+mdo+ Q3NU2x/vOGz315qh78xwU/vihjFk9vXxSh9ethAKyzF8s2QN0G5T4q7Ol/XLlVuP32wQ 3nR61Urn/Ik5IPQvL0RS4ZSQvlKqOboRKQwmFClhCAN/OEVmYDV8wyRcq0KteyEgZH1f MpSmKgvwo3G4VjdXLiFMY4+5ViqGTEUw5Wj9DNo+zGTd4Zo0Sj1bTGTiRf8PU/mfbh4J p+kMzoMM3+h4DQmKvnyLKymRbi+YozNQmhy2zNzx4H9uNZOeSstgxk7Ev5XzR7YqKv0i XEwg== 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=n03+W+s+dTlXDYsWDVZ6aqC7ETXVj+GjdAXOLOy0wp8=; b=sJisJ6ng3u0CDTi/kXv98CwDKqbI/PV9FTgZ/fU03ax1srMjK/CGLfkh3ju2n8JyKd iKXcHsDzr/HkdRj5XLdB+nLjAIrc8QrfJT+tTK0kSBAQYLxHQ2JnU92I+QsxKF56sM1i 06WZkWPzqcooamh5NouVarkPwGwUfqRRlwqz6yPexadYfGaufbiv0qBffMhxYHmsJUwP SJvceqt3o7oIXR6GElVPsXhNvjMdO9Iac9zjJWDThKvjbtg5oiq57qyGBmoZ7+2xhSaF uoBtlYmJodmmEp7MIy8pigFmNx+AeXIVOt6EE2kBD4iV7Q+a3haff/9zuBBKm1gUuNfv 5R4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NbCFN2D0; 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 h34si1074696qtd.155.2018.12.13.19.30.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 13 Dec 2018 19:30:56 -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=NbCFN2D0; 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]:59106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXeBj-0007Ag-U5 for patch@linaro.org; Thu, 13 Dec 2018 22:30:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) 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 ) 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 ) 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 ; Thu, 13 Dec 2018 19:19:32 -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-Received: by 2002:a9d:88d:: with SMTP id 13mr898257otf.269.1544757571249; Thu, 13 Dec 2018 19:19:31 -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) From: Richard Henderson 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 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: 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/aarch64/tcg-target.inc.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) -- 2.17.2 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 */