From patchwork Wed Dec 15 10:40:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 524256 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp235364imb; Wed, 15 Dec 2021 03:18:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHTsnX1uBUB2a6tr2sR/NazfQBxlTqZXyATn9GBekgYBnTjK8QgN3h3rzRkCiHjGyUQmc2 X-Received: by 2002:a05:6902:1105:: with SMTP id o5mr5792624ybu.519.1639567112980; Wed, 15 Dec 2021 03:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639567112; cv=none; d=google.com; s=arc-20160816; b=G6bpQ1GVtz/pH3ibjrvi32lFAXCxDUMo2iHBl0P4fHjFDJPZAWQVSlamUoiz927ZVH K42SxC0MEgz8y4zKIFT3XRlZcItxGCj8dwPGX2Yz6RehXQ212oR4sGECmgN3tSfRK/YS RoHJAnTXUGTgBu6P9IiN/ALXsdJND9t+U3q7yTpOQNaNfYjX5Ky93tLRQ/I9TcNJXySr kz21c6bjw5yik7H95CozFZV8Dzb6eSmQXFZaVWM0ZaLgop9ffeUF8nd6yr36fsF7l1yt /gB70NnBf7vn4wMzmhL0iBnvAlbj1fVOkiJGn7+JT6uHrq4slCoB8N+SnDDnZfrtTv2A 0b7A== 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=G182pIHkjJrICKs+H0StOPfRJTHwqdMAHlojnGkBCfQ=; b=SPGomF+P9fMbxbf8An579mTeglA39mPZrsAcpJEbClDg1ML5qMrGqTRzCnUp88B+Mf O5NAmublRrlYVtjZbcqEoxXTXE8iBN6i7r6uboMeZlP+cfvVpmBzyj4ODU4RrE8HTDfP szezTQjb0PDM2KvjiD691pdPCtqpl97aQpjfj73YxEKu1bWh2y9Eues/yD9J2ucSRgGk Y/Oxk0+dAvucMNYW0qCNZ/CHPyzY/4nVZUR9jmjRSJojBL4w2mbTBJX4XJswj9LFsyi/ jQwtyN1xQLxHnJpvt152zFBpfYZRbWNP8/HxWaXdgUZEHbrGpFxBWlfwgo5eGpMEvFOB E95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hCiaY+5q; 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 x13si2536025ybt.549.2021.12.15.03.18.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Dec 2021 03:18:32 -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=hCiaY+5q; 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]:60412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxSIq-0005Q2-EF for patch@linaro.org; Wed, 15 Dec 2021 06:18:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxRiY-0006la-HH for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:02 -0500 Received: from [2a00:1450:4864:20::436] (port=41580 helo=mail-wr1-x436.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-0008QT-Fu for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:02 -0500 Received: by mail-wr1-x436.google.com with SMTP id a9so37361301wrr.8 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=G182pIHkjJrICKs+H0StOPfRJTHwqdMAHlojnGkBCfQ=; b=hCiaY+5qKLBES+R6pWTsQpEvpSIm3ARlnIfK4DKLCy5XpiPnRJA7bVGafGoQDiLDsR f24S79YcjmBFDJllzWu8GlPs6/mJHFrLWG1NapUIB+iD5AzBux20tG0kH7+rkpGnw+yh 5m1VVclYbF+HYH35KJqJ0/tFL8DeR76l2VHMkXXJy3oh1/1remR9rAXmAMSgPh74XHDc xoQdQVTeNO7wUmOgkvi8NGj0HK4IhRoHEsXnfFvzMYvpXcyEgDfHWJlmaSYSw2PvZq47 UBkro/fgsq+RXo/dzPZNTiklpEtYb4HmxUeJOZvxyedh8M+ARz0qopaZBFHIu2IfI4qX EKPA== 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=G182pIHkjJrICKs+H0StOPfRJTHwqdMAHlojnGkBCfQ=; b=5WwrpSN2seBYUABW+U3yFJviC/Eo+3n8V1vN2LPuTYpgtvsI9qfpXBTRzHKZtX/vn2 BFDjvkAliNeN0N1F8oLOl3f/PjWy6WVTzGDHFqdfQP54KKEdBBIb5dJvqSY3JoAsM0n7 bCgSQT3rw5/vtXpLzu3aYnfkx2WS1tD5YcyKKzwGKk4UuUxulES/dhKNawHmUg5YTmh6 c/F8gT4Nm59DeLeIrMSX/8wUSnIYCdKk7ueATQWzxjqFTeGnc4D+SVIGcctn3D50afoI kPEsDF5BAgLpb4aEFODx8GuYkeDVe5+GTKaUN0NmitTKmvdII6leH/XOeOP2jqW4N/a6 5gzw== X-Gm-Message-State: AOAM532ULGegEky0BnkbHlrN8OXSAXGL4jshluT/0TzztQibhsstsLDn GDAxmL34EjLLbS3H8EiPZpOiM227oBRXsQ== X-Received: by 2002:a5d:630b:: with SMTP id i11mr3757570wru.316.1639564857128; Wed, 15 Dec 2021 02:40:57 -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 11/33] target/arm: Hoist pc_next to a local variable in thumb_tr_translate_insn Date: Wed, 15 Dec 2021 10:40:27 +0000 Message-Id: <20211215104049.2030475-12-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::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index c721b2ce42c..1c2a7274dfc 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9618,25 +9618,25 @@ static void thumb_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; uint32_t insn; bool is_16bit; if (arm_pre_translate_insn(dc)) { - dc->base.pc_next += 2; + dc->base.pc_next = pc + 2; return; } - dc->pc_curr = dc->base.pc_next; - insn = arm_lduw_code(env, &dc->base, dc->base.pc_next, dc->sctlr_b); + dc->pc_curr = pc; + insn = arm_lduw_code(env, &dc->base, pc, dc->sctlr_b); is_16bit = thumb_insn_is_16bit(dc, dc->base.pc_next, insn); - dc->base.pc_next += 2; + pc += 2; if (!is_16bit) { - uint32_t insn2 = arm_lduw_code(env, &dc->base, dc->base.pc_next, - dc->sctlr_b); - + uint32_t insn2 = arm_lduw_code(env, &dc->base, pc, dc->sctlr_b); insn = insn << 16 | insn2; - dc->base.pc_next += 2; + pc += 2; } + dc->base.pc_next = pc; dc->insn = insn; if (dc->pstate_il) {