From patchwork Wed Dec 15 10:40:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 524259 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp237685imb; Wed, 15 Dec 2021 03:21:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdaFMcWNRVZR+kGANlyLG3gfazvA3BP0UcBXy2T9QDykHoBeoJuzDpp0qnm61FOlmo2Kq/ X-Received: by 2002:a25:aba3:: with SMTP id v32mr5140289ybi.358.1639567299256; Wed, 15 Dec 2021 03:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639567299; cv=none; d=google.com; s=arc-20160816; b=ojBXuZ1SVZDaEvcnYnkmrT77g/sUfJ2KJC3w7PRiHBlQ6DYaYQXOyv6W1k4ctxDGXH xzV8Ps0IpEfabADIbQw0W0WwVjWEj/iv7xa5IztzImzU9tNvp9xG6VrBdumu1GNlVq9Q SLJRDNjlK2i7pJfsoP7Sw19Zrt4IfnKlMU7xXFqCP8IU0PT6iAv/W6E8aJtU3t//bMoe I61Jsr9anwNpZjkLRJ2zkcU6fOzT1wHGZ3uem6AOW11jkMW1KhDgEu4MWS5JvTXpD15G obbQv4bPGlMj+B10d04ilhosxVydUrMxZxxn8glFHrlVmFSQL2rC7+YfJ4jEd1/A3gZv 48mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WnLnjL7txGvuWh5pOnws/qxampi6HwwdnoH/cJfxyxo=; b=ZmIoz8DpHbrMjx/l3Ew4XeDODK+pAlFe1zmOtgNnXd4rD+iJ1Y0cJSeBIN/Rcdv7KT pC6Atc3b4BzT+TOfKMdUnwfGXGZlr+cDzrkciczgzeRv08fW5Ud9PQZlg59Nt2yy6F/o 72/abQ3b9UtQyt+u0VoIsZDgo8TMGPaGC2wmbWpFSebwx/4h6FyEiQ662QF2P10p7YHa 7VaoXvCB8FaInlj9oYzPBVPZ5HNvYq5+/+mrAWXDApCDtBKX/QRGhiy/AFRz701Wqd68 W0avJwINrD5a1yEZHrtNZQXkNeduogdbNtLgFIQtkSlKIQ4ood2nZsPQ9IRgBubPRnND cnmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kSkQDIV7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g7si1962091ybg.677.2021.12.15.03.21.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Dec 2021 03:21:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kSkQDIV7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxSLq-0001TN-Md for patch@linaro.org; Wed, 15 Dec 2021 06:21:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxRiZ-0006nL-Bk for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:03 -0500 Received: from [2a00:1450:4864:20::431] (port=46875 helo=mail-wr1-x431.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxRiW-0008QL-KG for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:03 -0500 Received: by mail-wr1-x431.google.com with SMTP id i22so7568276wrb.13 for ; Wed, 15 Dec 2021 02:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WnLnjL7txGvuWh5pOnws/qxampi6HwwdnoH/cJfxyxo=; b=kSkQDIV7bp7qciXWC6mrW6w1PTZkY5WH/2UnoBYvzD3WXYCFcAUwTMGiaogComQMUz h7YdgofuTdPuI6ySHMqDbUHatUvnfP8h/sE0Pn4D2D2xmkLL8FbB2fHYVAmMmXAgdRhm wHvaNDnWe4HVI5FngJ+fwcSnjcFJetMzkPWoqgfD9yd0Ogs85su/n32PT9MhAwNSmowg 941PkEygxcczqeutIG9sDWILtsLcRfNvncHRIFHxwBxE7966t8K1tfjZDBOlTM53tBNr T0QlbglQaGWNPhUApQeEtUpD0kepwLcffiZlAegZShvqsdUwVQm0vbaIYc8N7jYtF2II 1WNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WnLnjL7txGvuWh5pOnws/qxampi6HwwdnoH/cJfxyxo=; b=CiYjkBwj+p+7qaMAEw43hwpjY66E27KbSq+U2eHNl3Gdk9wFaj+I7XuLggoXc2+iCi jF/HLQEOtSz8j5BV5n0iEVMbsi1InbL2ZEQafed3uOTEuwFGsR5pQVtfyWKvuButCFRz 0HHMl3uKRKrlw5xk7FV7FKKPdON+UAGaqjo3kqgyAX86k/c50RojApTXXGqiwPvXrkUo fE5gHxSNfrzof+DthJJVC5rbb5jkfOL+dh9T5BBrXgSFVTgWYQPW7wLH0WnMMdS3GF5q 0j+rL802u6XKetBK6gNgkWG4yGcpQgXw7/dYJa+ClIO1tfuY2WYFadYzv9h+eA5JvxTq W/0g== X-Gm-Message-State: AOAM533vqKhD3zsCalHtjRnBXnbdWVpw+vH/XgTAfvCl7nFzagCckdsG eyRJloPOFqNhOQvrgVOO/h1st9CNmCnGaQ== X-Received: by 2002:a5d:69ca:: with SMTP id s10mr3797769wrw.218.1639564856599; Wed, 15 Dec 2021 02:40:56 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e18sm1600815wrs.48.2021.12.15.02.40.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 02:40:56 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/33] target/arm: Hoist pc_next to a local variable in arm_tr_translate_insn Date: Wed, 15 Dec 2021 10:40:26 +0000 Message-Id: <20211215104049.2030475-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215104049.2030475-1-peter.maydell@linaro.org> References: <20211215104049.2030475-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::431 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 98f59259284..c721b2ce42c 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9548,17 +9548,18 @@ static void arm_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) { DisasContext *dc = container_of(dcbase, DisasContext, base); CPUARMState *env = cpu->env_ptr; + uint32_t pc = dc->base.pc_next; unsigned int insn; if (arm_pre_translate_insn(dc)) { - dc->base.pc_next += 4; + dc->base.pc_next = pc + 4; return; } - dc->pc_curr = dc->base.pc_next; - insn = arm_ldl_code(env, &dc->base, dc->base.pc_next, dc->sctlr_b); + dc->pc_curr = pc; + insn = arm_ldl_code(env, &dc->base, pc, dc->sctlr_b); dc->insn = insn; - dc->base.pc_next += 4; + dc->base.pc_next = pc + 4; disas_arm_insn(dc, insn); arm_post_translate_insn(dc);