From patchwork Mon Oct 31 05:39:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 620205 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2605114pvb; Sun, 30 Oct 2022 22:42:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5HSKYNZgoa6oIt8dkUtn976ZiYjWVdTZuk1ibdp3pVGEJ3YiM47Z4MUlckwTfWGFDNK3Fs X-Received: by 2002:a05:620a:1256:b0:6fa:2370:a7e8 with SMTP id a22-20020a05620a125600b006fa2370a7e8mr3852828qkl.374.1667194952007; Sun, 30 Oct 2022 22:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667194952; cv=none; d=google.com; s=arc-20160816; b=ZV1zTfJXjjAMbpD1fT7YK80TGT19MZe+3svG71KCwUOrjtvbeAn5tzmcexG0Jk6jme lMN/IDNe4lup2xCZKKyT4WE5asFktYQgUvSDZAWBTWNHVVWlNXSu+gc0oBjU21NgHLk2 p30j9luyDLvb5vVWbKnLPYD5h+qp6Gre4DD+VMct544ClC0ESmqQR/LhiYAJySI1Vfzp 6pAVihoG5xbarn8NsSnbAOHEoKrmnIjw1DaMH0cSgcnIdHFomnDVHrCFZ8ZaZ45HnDBM U07vvzzND2RD+dYns/DCF6q4XT8FI39aOpqmxyYr5i5CxwQB0Fk9B3Ua2FSPUluEEdyz Aeew== 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=dagFXuC0Cq8aHbDcYCKsZUyIofbmwNTTyRirGuVaVcTiaWbD790e1+A27sB6X0ie/s CLtJlHA0Y08W2m6VUNy0haghotQdII4tX5daJG9BMmyyhWInToJ0U+Crj7F18yf5uAje 9qifMNwwE4K8CyU3taAK/81+pJKhqA3Brzl1EIARxa25+vc/lAn2aDFxjoGhp/mH+OSQ YvLFHF8mgpMT5nNrqYW5+K0+jjY03VYKH3TQLDd4nNC7ikb9XHHdJeza6GvKoYbgYg0v mKFdiR24FrXVZUt5Myy2jN8SMn31McEruqMOLHybae6GSNbU3yDpRRLpvS4A3r7oRMYw nNxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M7SAalJg; 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 15-20020a0562140d6f00b004b7c8e1836csi3340777qvs.289.2022.10.30.22.42.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Oct 2022 22:42:32 -0700 (PDT) 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=M7SAalJg; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opNXL-0001g5-Uu; Mon, 31 Oct 2022 01:40:39 -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 1opNXI-0001dw-MY for qemu-devel@nongnu.org; Mon, 31 Oct 2022 01:40:36 -0400 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opNXH-0003yc-4C for qemu-devel@nongnu.org; Mon, 31 Oct 2022 01:40:36 -0400 Received: by mail-oi1-x22e.google.com with SMTP id p127so11863564oih.9 for ; Sun, 30 Oct 2022 22:40:34 -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=M7SAalJgVaK3xLz3SzTtnUQEPeKmWSRbyQNdAooO+muWiATuJLLfSpZb5R5aIVSz+i UJaM6RrNy4vfkJ3eUHqhxBFkiB/c5DZeEIP1POCfb2+D7k/EvSWYek5dWvSNvt8L5tK8 TddnrJr/8E1zoI+kD3kbcjSw5am7NeW7gqoPDTeirhssjgzoqnCOpXR5XU+QQvsoAtZR D2hJcMAwFR7+reuBSQlGshrXGUgC8B6+DGCVsJsuhpTJeaO1tnM+Tme3Y6v3RmXsGVQO Ntnss0G/f4EFnJ6afZXyXAsXCXfAeiNi8H+fZ9AW26nmFQLjkp/MNvQtCbIc5N1z8Pxm aIww== 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=qkZOwRXgVYyW9ad6/LbZTpyyj4DchWBH3eKqGnl0nsp8KZtxq2nddNq5zq0dMWrSif Fvga+vSaJ55H4H615Jrhr7/zzF02JmtDjZRRHh/wIGmpTZpT8rJSUVj+xOKzveLtv4YU jLBLWg0M88S2em0ezCqwrcC0vQkguvtJGJ9yu/BgNtKGpTQ8hmz6C2jnFrF3kG/2fGVr 9lqdNlvv5jt2C537xi55v2rqileasvsRonb7UiKwLD5cw/G1i6H+ixU0I8vhV75zzf+m JJ8VfO9FZHQgumGcr4hbhYgl1uJZ3jmWY7Lr+s2XbYmIkxfL9UAGrvLIqmCp2DcYQIkQ Wjvg== X-Gm-Message-State: ACrzQf2t7SiyAZ4GR8BZZVkoJXpsCkujQNpDGRghZrBSFjZpP5odL8zX doIFnL2UTcXnWKpwjfZhrP6elmJxXP3ZZA== X-Received: by 2002:aca:ded7:0:b0:359:dee9:7809 with SMTP id v206-20020acaded7000000b00359dee97809mr5736225oig.1.1667194834144; Sun, 30 Oct 2022 22:40:34 -0700 (PDT) Received: from stoup.. ([172.58.176.235]) by smtp.gmail.com with ESMTPSA id u8-20020a9d4d88000000b006618586b850sm2473857otk.46.2022.10.30.22.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 22:40:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 07/11] target/openrisc: Always exit after mtspr npc Date: Mon, 31 Oct 2022 16:39:44 +1100 Message-Id: <20221031053948.3408-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221031053948.3408-1-richard.henderson@linaro.org> References: <20221031053948.3408-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22e.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+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 */