From patchwork Mon Oct 24 13:24:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617856 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2727790pvb; Mon, 24 Oct 2022 06:38:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7k5vuewMAHOIDBRWayilSb8IIIZPO7atsFsl92gjcCtqDPTJ1iRyZg5Ghx7gtjXbktl2nN X-Received: by 2002:a05:6214:d6e:b0:4b9:67fb:25a7 with SMTP id 14-20020a0562140d6e00b004b967fb25a7mr16936016qvs.115.1666618705469; Mon, 24 Oct 2022 06:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618705; cv=none; d=google.com; s=arc-20160816; b=D8WndAZ6GZ2dZmU5nT+M+Bao9oZZL3a0scYjn/Gg2U+Jm/snYmuVc1XdGGU0/8a1TA Th9Tr6ipdLcrFElV3PyfR9yb+5y6xMtQNuBekRcx6rGWFIE5UpTAYHs84n5pLoiAOl1I f4latl5/G2BD9QQA3cgASxocxew2rQ90D+iMarAZmPfNoSB2G/6azdYU2ua23L9jycHI jxRKlHxryV7EQvsZM9ZlKGF0IakaqcR4cDC+PSSQFj1oPUbhqxX3dzwfVOqfoA5fssD7 zXaMV9ibaHYEYtGDrEXHcvHNE8nAiolhjNZWynuqhvl6N1nWkFGkRFj5+1aXAUBNbxoB 5v1A== 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:to:from :dkim-signature; bh=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=QjMWFElzddope39KmbrBqtnOuJNlEYp//PuQdt1UX0UpXiu1D79LUVnyamC2kVS/bu 5OkBsaas9joYrS6eML8NdxJQcraTnHGs1Of8RuWc15n64S+azBs4H3zNeBd7YoiVOdM7 SezS3XHVqDTq8idOLvlEE288Pzk/CXxP3n5GajtBUxSAc038isndg1j+IBJGuMj62wtS ESQ9tmqdsYK++dAX/WeJA3xjDJfAyY1MOYrHtxn3FzwaxHVys2awBHyZyWSlz/Gz81UK XAm7OZj7cgLmrZqsML3h/DLgYFEeUqWDv3xFjn/gtRy+g8PngyFOWyxlRKsjnXT4iw1i F3nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UDesVsJh; 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 w24-20020a05620a0e9800b006e97ec5c927si15421879qkm.161.2022.10.24.06.38.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 06:38:25 -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=UDesVsJh; 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 1omxTI-0003cv-Li; Mon, 24 Oct 2022 09:26:28 -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 1omxTA-0003W8-7S for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxT8-0004B9-A9 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:20 -0400 Received: by mail-pj1-x1035.google.com with SMTP id v4-20020a17090a088400b00212cb0ed97eso8848051pjc.5 for ; Mon, 24 Oct 2022 06:26:15 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=UDesVsJh2VpOjVc027a6U5SDvYLB80WN9z52DdwNRDfq77l9NrTUepEQ7gjN5ZXj33 +NKphz+USTl4lNRIBL2i0zwStz/OedNLgegUFE1BHtkJvr2qK8a4Dtw8RF7iGe0bGI9M 3HeSPf5JAGIumRTEBEAEahxtoHKtkqoz4r9JEQQ1bYkqdWAimeqp0SBtHDpth/aQSnH7 iB2caxBO0NyKnhA81bpvKqsoPg3xIbecJHp3dtoKIstdyURC6f2jqOZuCHxpml+3zNsS X9gR3fTFPrnWXUodLqt8gOSrEtSBv3pAwrXw4aKmcVrn1Bc2agdjNFIOBdSoBSldjQD8 GjgQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=lhYkrMMw7lCXthU4nnyPDfDbqjgzrNLSWQekoZfG4xOpEEWY0KzsmP/57Zm4HbX3vF EVKk0f/MiYcRHCcyFua4Mxn9n9M9GYne70zpVsPC8pt9ceYwpuurTJdUHvDKY1iRnBOV kcPZ/7fFGwmUHkhAGmVVVPaR9CLfYGoElYycCnHvutIt7BRVz+LWCyN2E/2PUxcj8Na/ U+9rRmqWIp5tGpgoWnzLVFL87/WMa0wN6Lu2eiqpToBmPqApLeVs1V5FznZK2Gjk4ROc F0R9UCWli28AV/y2LSuk8I0GeZOr3BdRMHblaBKIYbIEpnjFGt5zkYsSXg/JrcKyXhkz Xa3A== X-Gm-Message-State: ACrzQf1n86aqu43pGUvhPOfUECFLo7v4pwoiIKlipDwogiZ5QUK4RNlX fLlsYo9pzXtGhSvV/RtjMtGofjIJrC5ebQ== X-Received: by 2002:a17:902:6a81:b0:186:7df2:340 with SMTP id n1-20020a1709026a8100b001867df20340mr16521310plk.120.1666617974245; Mon, 24 Oct 2022 06:26:14 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/29] target/openrisc: Always exit after mtspr npc Date: Mon, 24 Oct 2022 23:24:56 +1000 Message-Id: <20221024132459.3229709-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024132459.3229709-1-richard.henderson@linaro.org> References: <20221024132459.3229709-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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. 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 */