From patchwork Mon Oct 31 22:00:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 620257 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3127754pvb; Mon, 31 Oct 2022 15:02:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ac9+wOxL+H+f/JNgqrZgMrJwE6XE+6z3lFfzUNE8o5jL1hk3x5aeJEWA7Y81/JKvQ7WrW X-Received: by 2002:a05:6214:2582:b0:4bb:9949:98f2 with SMTP id fq2-20020a056214258200b004bb994998f2mr12769221qvb.127.1667253772680; Mon, 31 Oct 2022 15:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667253772; cv=none; d=google.com; s=arc-20160816; b=svlBmLstJeEGg7FgB/mHrgo9Pupqqngid5n/Tb46cGZtIou5Y6Ch2qQxqbAvN/4Go9 sKOUaI+rY61KKnThWrpudy1++LERiN/hlwKuRbNEylxOeD2h6FO6hrWP8xK1qniHaHz2 aLhO04sEKgEP/f4bbVX83upBxtA8vA1hnxWUQFyBNwH5WSLWsy6/+6nlyNwDp07TZT9u bf4WQIcA47P/ZmLchyDM8KNIq7H2CeKnRNC5Uf+g+Kw+AVrba1z4fqSEJqO/bkgjY78t +4UYK4SA5Q38g1TdxQ3VvbySe6KC1ZvkYMXFIQ8q1qNeBLPb17ZTmzhJGxekM8MKKYPN PSeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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:cc:to :from:dkim-signature; bh=HkiTDoffwuSaTr7ke0a+7yV5MGBGA3Q19sPSnhU1cq4=; b=UieYxw0lJ+GkvEE6LKpR+qPXpzp8NlT1FFgNfwEsRA0DtgvlI66UfP3H2O4WrYCTxv 3tXKyN8+GI/+vUYPSfhJyp4o1clCnNod9lb5WSOeqp9zeygw6mMoUMmcka3Lz+XYsLL2 BXABstOQNUIVZsHdvQOEJvxSMNeIOTPVd57Jt99xFhH4+vgOwH0GweVQvP975OwpJ0ud sLuAi1kBHtgLeS/759R/yOxEMELhnmpU3Zp9ow99dziFAdvxcR4gRg55VWZoGDE1k+UU UZlkI8wiE4/tqNXt8yqStTfdBo5QFhTIlBMclNofClO2QoDb4/IK3f+QtuTk8YMB/xu7 T38w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GXW5tYW3; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+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 k9-20020ac86049000000b00396a8770b48si4630991qtm.451.2022.10.31.15.02.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Oct 2022 15:02:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+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=GXW5tYW3; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opcqq-0005Sg-7O; Mon, 31 Oct 2022 18:01:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opcpx-00058i-U8 for qemu-devel@nongnu.org; Mon, 31 Oct 2022 18:01:12 -0400 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opcpu-00015T-En for qemu-devel@nongnu.org; Mon, 31 Oct 2022 18:00:53 -0400 Received: by mail-io1-xd30.google.com with SMTP id p141so10932355iod.6 for ; Mon, 31 Oct 2022 15:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HkiTDoffwuSaTr7ke0a+7yV5MGBGA3Q19sPSnhU1cq4=; b=GXW5tYW3xjdpWahpZOpF0Y7SZo3/qPfBs/by5WS6sqJCrf0O9Aj/sMNFAxTI0JwZeG IAvq1UzINUdoJ6Gwdts63N/iovl08yuKyio9MlOA7WBzvDP2e+YVZgFvF83ty34kM60O 9YoPW1sQnttVmV8wG295JRsAN9aE+x7vUTJmPn3+7eDHCd3MRfRKluZoOa+cXISSw+X9 Fbqh4B2ldoNZSHsXdn2ceEiGSAdtQCuohHyKvlXYYgcDTkYjt6h5QHPNkbektEpUubSs Vv+2Yr3fKnk4zC7JSt0dLc2gpTBucRwd16CHWab829t0iicO0gEexCHONjinfAyRDxdj SbiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HkiTDoffwuSaTr7ke0a+7yV5MGBGA3Q19sPSnhU1cq4=; b=rHjVKD3VazCraeUCw+Ng4/uRpD/+Z4cyJqba0BlHcdFVYmwYjydxPOUP1qm72IGF9E yFOddsD7Gj6Rsq4dr7yA4PXioUTBTZnl2m9SB5YdRRpQId5u+AxIWMgsyboUe45FfSVr Wj5MkDFnrFuP/wR0Xc+fRPVw0gj0QcFPN52MOXePJcPpWGlnvABoeb/2t9Xvau1em1CT JTDe9dPFRknx6VpJNXhBcwXmihgqKcScb2I11JiH4R/9sUAianpz6RSMXapy4faresUi I+jSaPSbBxUYrag0rLWekwMontc4/xoModDaSLPmFSNIioi9ZdK1GYaR/+/ARVhwWoxW fjMQ== X-Gm-Message-State: ACrzQf0ko1h5IqW73zP2+RjgWSNqoE+b5pODl7qs5I6/fJ5i/ayMpUPD lSRPcPqACd0TP7EJ/engNcPOw26c97PFEw== X-Received: by 2002:a05:6638:42c5:b0:375:620d:4306 with SMTP id bm5-20020a05663842c500b00375620d4306mr3188762jab.104.1667253648270; Mon, 31 Oct 2022 15:00:48 -0700 (PDT) Received: from stoup.. ([172.58.176.58]) by smtp.gmail.com with ESMTPSA id d6-20020a926806000000b002f9537986f3sm2916853ilc.24.2022.10.31.15.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 15:00:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v2 07/13] target/openrisc: Always exit after mtspr npc Date: Tue, 1 Nov 2022 09:00:18 +1100 Message-Id: <20221031220020.414768-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221031220020.414768-1-richard.henderson@linaro.org> References: <20221031215723.414467-1-richard.henderson@linaro.org> <20221031220020.414768-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d30; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd30.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org We have called cpu_restore_state asserting will_exit. Do not go back on that promise. This affects icount. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 09b3c97d7c..a3508e421d 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -51,8 +51,8 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb) if (env->pc != rb) { env->pc = rb; env->dflag = 0; - cpu_loop_exit(cs); } + cpu_loop_exit(cs); break; case TO_SPR(0, 17): /* SR */