From patchwork Sat Jul 2 06:02:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 586524 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp2073832mab; Fri, 1 Jul 2022 23:04:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1srGmw+gpVv17nouTzX5R6XV20G2StdtZBl2bVgvUdNF049w5jASP3t2pTSVa22Ezz04W5V X-Received: by 2002:a81:9191:0:b0:317:8350:b6a8 with SMTP id i139-20020a819191000000b003178350b6a8mr20861343ywg.193.1656741864438; Fri, 01 Jul 2022 23:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656741864; cv=none; d=google.com; s=arc-20160816; b=cxcbOEzD4/AOH9aIE9eG5EYcMaDlq6IYUj/nKjwU56K83MBGOr4zigwNry3aUTRnOb VbMTBd4cPnBsvXENIeCJztSVO4xJao8+G82x3KNwqFsqtquXfUu5wrr1ZveefZz/5L1f eazg/HYo1rZBIGwikj9DoFNLM+5N+G+qKzobIHFpXnMoeVTGDDkQ96rcCft98uEwoIm0 ++tfAyPKIrPsYXGsmQZAzN2HC8NSdB/UVHibgGXXmL0qFv//z1qDuC2dW0EZp51ROX1+ SOGQGEpqPP/vq7zFFYJlVc/3OS017k1N9TIZptNWM2BzWFNfiBrvCKV5b5TmZ0VaARIW ORJg== 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:cc:to :from:dkim-signature; bh=RpjQ/jx+Qxs41kvoM5hWq5FpDDhEEkw+sqWhzkGXZNw=; b=VPhask5oGsiwBWkHeDYl+qnhodNMdTOadfTHfT1IjgFvUl6zHIpA7h9V5GIQfdPQla jKnG4ysAfw32Y1hCuQGKbCjHFAh49LM49IU37CCtJRRPFhdhDf+pIEK4fjohdJ2vQ4C5 DACC+OV3lzkg3/X11yOLX2Sdcwil2hrkBDHJcvYzbNU4wyQB4aLgpjJK+/1wqgssRb8q kWIRxqd7f6BdG6s2xyFYJrDAfcBDGlH0tXH7+niGFhCLXt7IdKc6u7LnGBw01vOvp6Un OzsBevz0AZ2ml3RmBGmIcLc3DFt6nfd4YOsIT8rRcfmFz8k4o3umng/EvrpZ2kNUBzbW I84A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RZvsolZ2; 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 f74-20020a25384d000000b0066d56461987si13498081yba.122.2022.07.01.23.04.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jul 2022 23:04:24 -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=RZvsolZ2; 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]:57022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7WEx-000302-Tk for patch@linaro.org; Sat, 02 Jul 2022 02:04:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7WDI-0002pZ-Th for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:41 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:38830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7WDH-0004rF-Ax for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:40 -0400 Received: by mail-pf1-x42d.google.com with SMTP id k9so4302407pfg.5 for ; Fri, 01 Jul 2022 23:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RpjQ/jx+Qxs41kvoM5hWq5FpDDhEEkw+sqWhzkGXZNw=; b=RZvsolZ2xaT39Kt80mhV24Coq/u2JTLoMN06SYRgOqikj25NdCspzn/9lp/k4Uwp/A 1Uk5xHLCU+0HiWseTz+owOQLV3XAnssgK9cryWl2xQLn+Ch08TpcRF8gJiTvHVRaSk6R B28STYvfa8ggWj4u/UmdKnlfcvS8scA9Mip1HWBKUeba97cEJPRAl//WVqQCzVIG3K90 t8bR2+V1zgOfPgJ2cqB1g+B7bz3h3pUCFWlU0A11nXwq1bxYCg/xXJs/PI75oYyZR9V1 FdBWrs4z6fvIUsqnq52JvArvbSmRz7lGjNu2hyR26OYqDKUiuWwhOqHRF2CBENiTAHUT o3mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RpjQ/jx+Qxs41kvoM5hWq5FpDDhEEkw+sqWhzkGXZNw=; b=IlpKDrJrgcbOxwo7ohuVdFb/PHkhcukzFT5pr3gZPrGOPb3YJycZPvPF1A0PYojC1u UufP2i/Ucep9IGd5/rAwIxt5Qidz3qThLywVbPcskUFsPHW0eT0fIHP3L7jmBm0b9E/X JKA4bQAxTjIwdmYo8PuIE2ZUwwIPk0pjLH79TQZwd61kanEROQS43Nl+3O8gohLiK8Yz m0I2PPJsqEe60osCm31QBBh/lg3ORdeI/4WR+jWN+6so0Kl16iiBr6stt/BBNYsQNlWL 0JdgptWZg3CN8uGrojUuBnEGF1I1hXgDBeU93FenqFnKla1qPWEzAYN8ZjyFHjJKmU6b bFCg== X-Gm-Message-State: AJIora8pXDAi/T0I63AcWm/1OWNBxS5Nm4/KwW/dTDg28ShofZn65E1/ yXwrbP4o6kkWu62baAGcaU3fBcijctcdiYnO X-Received: by 2002:a63:1952:0:b0:411:90a3:5853 with SMTP id 18-20020a631952000000b0041190a35853mr13764333pgz.474.1656741757363; Fri, 01 Jul 2022 23:02:37 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a66c200b001ece55b938asm5232178pjl.32.2022.07.01.23.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 23:02:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@linux.ibm.com, qemu-s390x@nongnu.org Subject: [PATCH v2 1/4] target/s390x: Remove DISAS_GOTO_TB Date: Sat, 2 Jul 2022 11:32:25 +0530 Message-Id: <20220702060228.420454-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220702060228.420454-1-richard.henderson@linaro.org> References: <20220702060228.420454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There is nothing to distinguish this from DISAS_NORETURN. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/translate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index fd2433d625..e38ae9ce09 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1123,9 +1123,6 @@ typedef struct { exiting the TB. */ #define DISAS_PC_UPDATED DISAS_TARGET_0 -/* We have emitted one or more goto_tb. No fixup required. */ -#define DISAS_GOTO_TB DISAS_TARGET_1 - /* We have updated the PC and CC values. */ #define DISAS_PC_CC_UPDATED DISAS_TARGET_2 @@ -1189,7 +1186,7 @@ static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest) tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, dest); tcg_gen_exit_tb(s->base.tb, 0); - return DISAS_GOTO_TB; + return DISAS_NORETURN; } else { tcg_gen_movi_i64(psw_addr, dest); per_branch(s, false); @@ -1258,7 +1255,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, tcg_gen_movi_i64(psw_addr, dest); tcg_gen_exit_tb(s->base.tb, 1); - ret = DISAS_GOTO_TB; + ret = DISAS_NORETURN; } else { /* Fallthru can use goto_tb, but taken branch cannot. */ /* Store taken branch destination before the brcond. This @@ -6634,7 +6631,6 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) DisasContext *dc = container_of(dcbase, DisasContext, base); switch (dc->base.is_jmp) { - case DISAS_GOTO_TB: case DISAS_NORETURN: break; case DISAS_TOO_MANY: From patchwork Sat Jul 2 06:02:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 586525 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp2075748mab; Fri, 1 Jul 2022 23:08:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1um214Vh/KdXtiH8lDiqSbgYw7vGtSWcBJ3bkxcqTxEukqmQETykd1lkTzzlEzSYOMlWjUd X-Received: by 2002:a25:9901:0:b0:651:e25e:febe with SMTP id z1-20020a259901000000b00651e25efebemr18858417ybn.58.1656742082054; Fri, 01 Jul 2022 23:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656742082; cv=none; d=google.com; s=arc-20160816; b=B6WH63OayP2u7VXGujomM/+JclEnMHS+RB7LMKK3kEOEOWNEncPMGH5vJTWBE6Ow0f 4lq03aFQgOG2xlz4Fp7GlmHPNUb9JGcnf4G99iaPwuA9FgUfzOL501zVZH+SbTTqIXbm +u7EhktvbnN77Qb5L8vQtnmn6KtfIcLKj0j4+TrgCtVSDF2bnvaLSHLnf1QtwNrGNLiq nn/qw4K2G4QJeelui7TAaJU/6khF+ikHMzMl8w3S9Tz+9JhYoArvcY1aQtmwaGEblMKD TRMiZMHR4xSbWLv8vLMTTXROd+ZTiEkM+4UotthQzKe3rKr1L3VpVVneqArGp9adNVaI h81Q== 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:cc:to :from:dkim-signature; bh=Vr0uT7qqfwuP7HuZnNZDuuWBaqMj6lUxoak84Ik4zME=; b=QlDbsETHi3dC3GAeboWMkIedYVnIgX3beswBd/Wk0QAK4Wtsa6hIdL/xSSKEMjH/bi 0TZA/VTJtEpKEiNTqBxoqc0+qfVBKZBhA2YifOFbJ7hDsn6iS1bymM4rYHKFdOtcnQnI 2jrtIlj142dY1sQCJG5qmEi5l2g+UoJMoOvpbvbwK2JMmJ/5rifdCTT3MzOxtDRUSguI 4sRLmXqIQJHF5nCR1jkZVtSK+0udJYCm58AW8RRC9VS30ZzPJyDUzHqMObgRKtVD9kWX JyA/eG5CryoGEDjcUpARPed6m+9kRhj83imwjt4ySnJzy5302U5Dmf7sZwPfEXFLdmhW 79/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hGmD0boh; 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 m75-20020a25d44e000000b0066c810fc792si37419378ybf.369.2022.07.01.23.08.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jul 2022 23:08:02 -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=hGmD0boh; 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]:34956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7WIT-0007Ld-Jt for patch@linaro.org; Sat, 02 Jul 2022 02:08:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7WDM-0002vg-DR for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:44 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:43569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7WDJ-0004rd-M5 for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:44 -0400 Received: by mail-pf1-x431.google.com with SMTP id 136so4278044pfy.10 for ; Fri, 01 Jul 2022 23:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vr0uT7qqfwuP7HuZnNZDuuWBaqMj6lUxoak84Ik4zME=; b=hGmD0bohoC0VPo05P9u4ltrv9bFX/2yzR7lgsy3Cx/rfF1EnpblQ6OCtXA8bkQ+1Jb cmaV9tAW+yYXZfwPjjG3PER12WJ80DgSxD9IX5Jhab7aYkj9/QbRXaH7JWqIjZWoZsuk FOakitBVCE8H6ecr0uOsItQb9gMH4GF3rzfcFoaeR2qNkxaKdFc0DUgQP1fC5qPpg31l dUeNGcwLEBfl7ScxywsNzOmGgWPDsYUOO2JPxd/TJKXfGZEg4M9pjmw8pnu2beumwzb/ /vKUMRmTdSen9saUOyTBOtOfTRH5CRQvWZAccd3sJYGQ7sLsNBUDzxjfuIU7BCOwWGl9 Fxlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vr0uT7qqfwuP7HuZnNZDuuWBaqMj6lUxoak84Ik4zME=; b=PH7hgiqGWLOefaC0sRrCVCZSxbjVGhenJJBFYQCGGxY1iGcEyldioK5gk69ySkUK6v O+0yN+3enn6oD2+XTVQNO3OEDAcJ4X1ITzLzb4i3YzNv+miIIQt6Beuxflu60XTANcBZ btmNM1AaGDRy8x+bh4BDvwsdsOXuxAOKP7sd8Pg1i7NhbEol1+APJQaIEoWZCw9O4bec keu5lbf/iLBBdMVm66H31CDsZtT0PkoVOufBG7yi+noRos3uSWLz5dSBP/hTkFkQwfQn FehiW9P8Gv5Hoq7qvJkoVRp9kCP3DbOvcoWLz4GT7AekcPI5Fe+4f8ViwKvyy2ywj5co qQVw== X-Gm-Message-State: AJIora/sKjWOv2ZV7jW089IN0Q3NJoA6tCxmx7ZB97diw9uy2g0ZKr7L QDL46mu0/vqnxDloOwuEiuhzRryEkneM/GNR X-Received: by 2002:a63:d751:0:b0:401:9f40:3fcb with SMTP id w17-20020a63d751000000b004019f403fcbmr15373268pgi.311.1656741760085; Fri, 01 Jul 2022 23:02:40 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a66c200b001ece55b938asm5232178pjl.32.2022.07.01.23.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 23:02:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@linux.ibm.com, qemu-s390x@nongnu.org Subject: [PATCH v2 2/4] target/s390x: Remove DISAS_PC_STALE Date: Sat, 2 Jul 2022 11:32:26 +0530 Message-Id: <20220702060228.420454-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220702060228.420454-1-richard.henderson@linaro.org> References: <20220702060228.420454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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" There is nothing to distinguish this from DISAS_TOO_MANY. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/translate.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index e38ae9ce09..a3422c0eb0 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1126,10 +1126,6 @@ typedef struct { /* We have updated the PC and CC values. */ #define DISAS_PC_CC_UPDATED DISAS_TARGET_2 -/* We are exiting the TB, but have neither emitted a goto_tb, nor - updated the PC for the next instruction to be executed. */ -#define DISAS_PC_STALE DISAS_TARGET_3 - /* We are exiting the TB to the main loop. */ #define DISAS_PC_STALE_NOCHAIN DISAS_TARGET_4 @@ -3993,7 +3989,7 @@ static DisasJumpType op_sacf(DisasContext *s, DisasOps *o) { gen_helper_sacf(cpu_env, o->in2); /* Addressing mode has changed, so end the block. */ - return DISAS_PC_STALE; + return DISAS_TOO_MANY; } #endif @@ -4029,7 +4025,7 @@ static DisasJumpType op_sam(DisasContext *s, DisasOps *o) tcg_temp_free_i64(tsam); /* Always exit the TB, since we (may have) changed execution mode. */ - return DISAS_PC_STALE; + return DISAS_TOO_MANY; } static DisasJumpType op_sar(DisasContext *s, DisasOps *o) @@ -6562,13 +6558,13 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) /* io should be the last instruction in tb when icount is enabled */ if (unlikely(icount && ret == DISAS_NEXT)) { - ret = DISAS_PC_STALE; + ret = DISAS_TOO_MANY; } #ifndef CONFIG_USER_ONLY if (s->base.tb->flags & FLAG_MASK_PER) { /* An exception might be triggered, save PSW if not already done. */ - if (ret == DISAS_NEXT || ret == DISAS_PC_STALE) { + if (ret == DISAS_NEXT || ret == DISAS_TOO_MANY) { tcg_gen_movi_i64(psw_addr, s->pc_tmp); } @@ -6634,7 +6630,6 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) case DISAS_NORETURN: break; case DISAS_TOO_MANY: - case DISAS_PC_STALE: case DISAS_PC_STALE_NOCHAIN: update_psw_addr(dc); /* FALLTHRU */ From patchwork Sat Jul 2 06:02:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 586526 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp2075793mab; Fri, 1 Jul 2022 23:08:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTdScDSROJMQ+U0DRwl9twcJGP6UmIM710gvK6ajg6OILgIfvV94nR7jiuHA7P9QdEbMj0 X-Received: by 2002:a0d:fe03:0:b0:31c:71c8:9cbc with SMTP id o3-20020a0dfe03000000b0031c71c89cbcmr4080728ywf.164.1656742087760; Fri, 01 Jul 2022 23:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656742087; cv=none; d=google.com; s=arc-20160816; b=JQyphZXCVxNSrXZr6C3qPHKRlAr1TX1Hve4JTzIzbiHTDKcL82O9LHfBpx00BdBQ7c LCmeYLLN0lBFzwvRS6N2KQtVXeZ/MbzlitUm5NbPR/vkCVo7rLuMuWKbIwOd/pl1yubB 52pkh9uYyCickZbbQ4Urn2hnNPr4BCGWzq3J87pArWIIw0SBNmPj5S0y/2T5ffoVbeF7 K2aJ/66Zpuz0OJsmjb/C+7LaLcnY+migM9fgVvLFRRPg5jqW2u9n8r5wQgX7Hxpv8EmE Ak8HOMQaBlGNU5xVWBPO+KOgmoVe3iTjm0L6PAfJPNXzcjvvhykErnEjUZ/uJMljNrmG Tbhg== 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:cc:to :from:dkim-signature; bh=eHKkLzGG0Agc+EIiK5URkE6gZDnUx3WL+56oJZ1cu3c=; b=nKPUp32gYYslaw3EVwHu2qSKMe/XMM5HzJ/cjqWZ/8GmDhWja+ZAmCHPwWKEW9dl6C kc+/JqXpeqR1PQB5+WFpxj6K8tfluwQ8wuAonG5DGsi3UCWrBA3MY6/11oV3NU0d4m+6 RlDFb8DQ8cU6Wt9RNRR5loAje06yXgQpOp2W+4V+8abPRWSwlXHl26AjkkqLtjlLHvp6 5fkvMzMuXj5GWPsZNqXY7vDDvMizY2PnPjvCYGOc35pE54wTRLo47lLp/hFHiL2RJSjf CN5YdlQUpkWCC869xuzqk8/F5BYXzpoJcEPxqMcIf6yZ8wzBNf1lDeIOU3E1iZX6Dp4a 10hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=df68vIYd; 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 f140-20020a253892000000b0066d33613b6fsi17177254yba.63.2022.07.01.23.08.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jul 2022 23:08:07 -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=df68vIYd; 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]:35224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7WIZ-0007Wa-8x for patch@linaro.org; Sat, 02 Jul 2022 02:08:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7WDP-00035e-KO for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:47 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:43825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7WDN-0004sM-SJ for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:47 -0400 Received: by mail-pl1-x634.google.com with SMTP id r1so4173536plo.10 for ; Fri, 01 Jul 2022 23:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eHKkLzGG0Agc+EIiK5URkE6gZDnUx3WL+56oJZ1cu3c=; b=df68vIYdQLczovEaQQJf8gS/7y0fV/8tKo+oqOf7iTKgHxnHb6S7VApso7YBguPNcQ UvhTpIvW/yPFwrLoWVzIOEkJWB6w2vSNsPea/cGhUGt5G5W4qzQ9kb9Fne13jD4ltHmv zdtULHgfVwygA6z8vAfQHL80GB1nw0BTVLzF+1j36AITRskNi5TZiCbRK+GVQVjjMbHU aHJm1Xn84nKyFJ9ITnJZLeui1Lh6KQ262301g8u2r8iAdn2u23NL22hx8IWm74Yeq13k Ja2qVp8tbkH2yE/EETbw5U3Rp0jElwcUyukpUKl6VwLs1av3l9Pfe8EvlLkAv8r9Vl4M gYZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eHKkLzGG0Agc+EIiK5URkE6gZDnUx3WL+56oJZ1cu3c=; b=LtxYmj6QMTKAfx6Yi7b2nRUb9iTGAa/aioZ+thGW4CBufPqWk0Ev8Cvnj1Sbhzs7cL w7WWoA4iFGGyfkKySQdUxGLIgBHy41svIQmgQioAZkoKht1LAa2b8H/rYk9YwwTR2wDO Rnz/+r8Em7wTUfc+MfTtSBsEI5Pkz55kJgmm1o53TShqRdIdoMP7s89hpExOGjGSQ1Zh r1tm0dR+asjaJDX4mB6y1txPjZJPgIjrYktfHF0u3x+ofRDwpXDkasQeJ5F65icpeKX8 qjTy7CNh0znVIw5PRc5TeKo+11+BuYGKILX4uDrZvfy2sMBtILoUh/rac6HTl8C6Nyze ep1Q== X-Gm-Message-State: AJIora/0ZCQkohL0ksljgMqhJwpqe4Y1ZmODwljUX04r5D/XmYlZafIE g32dBvOoBydAHlPegagmYJTSJoVrXnwDl4iA X-Received: by 2002:a17:90b:218:b0:1ef:1440:ebe1 with SMTP id fy24-20020a17090b021800b001ef1440ebe1mr22466975pjb.166.1656741764447; Fri, 01 Jul 2022 23:02:44 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a66c200b001ece55b938asm5232178pjl.32.2022.07.01.23.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 23:02:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@linux.ibm.com, qemu-s390x@nongnu.org Subject: [PATCH v2 3/4] target/s390x: Remove DISAS_PC_STALE_NOCHAIN Date: Sat, 2 Jul 2022 11:32:27 +0530 Message-Id: <20220702060228.420454-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220702060228.420454-1-richard.henderson@linaro.org> References: <20220702060228.420454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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" Replace this with a flag: exit_to_mainloop. We can now control the exit for each of DISAS_TOO_MANY, DISAS_PC_UPDATED, and DISAS_PC_CC_UPDATED, and fold in the check for PER. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/translate.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index a3422c0eb0..eac59c3dd1 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -149,6 +149,7 @@ struct DisasContext { uint64_t pc_tmp; uint32_t ilen; enum cc_op cc_op; + bool exit_to_mainloop; }; /* Information carried about a condition to be evaluated. */ @@ -1126,9 +1127,6 @@ typedef struct { /* We have updated the PC and CC values. */ #define DISAS_PC_CC_UPDATED DISAS_TARGET_2 -/* We are exiting the TB to the main loop. */ -#define DISAS_PC_STALE_NOCHAIN DISAS_TARGET_4 - /* Instruction flags */ #define IF_AFP1 0x0001 /* r1 is a fp reg for HFP/FPS instructions */ @@ -3022,7 +3020,8 @@ static DisasJumpType op_lctl(DisasContext *s, DisasOps *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return DISAS_PC_STALE_NOCHAIN; + s->exit_to_mainloop = true; + return DISAS_TOO_MANY; } static DisasJumpType op_lctlg(DisasContext *s, DisasOps *o) @@ -3033,7 +3032,8 @@ static DisasJumpType op_lctlg(DisasContext *s, DisasOps *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return DISAS_PC_STALE_NOCHAIN; + s->exit_to_mainloop = true; + return DISAS_TOO_MANY; } static DisasJumpType op_lra(DisasContext *s, DisasOps *o) @@ -4283,7 +4283,8 @@ static DisasJumpType op_ssm(DisasContext *s, DisasOps *o) { tcg_gen_deposit_i64(psw_mask, psw_mask, o->in2, 56, 8); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return DISAS_PC_STALE_NOCHAIN; + s->exit_to_mainloop = true; + return DISAS_TOO_MANY; } static DisasJumpType op_stap(DisasContext *s, DisasOps *o) @@ -4548,7 +4549,8 @@ static DisasJumpType op_stnosm(DisasContext *s, DisasOps *o) } /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return DISAS_PC_STALE_NOCHAIN; + s->exit_to_mainloop = true; + return DISAS_TOO_MANY; } static DisasJumpType op_stura(DisasContext *s, DisasOps *o) @@ -6591,6 +6593,7 @@ static void s390x_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->cc_op = CC_OP_DYNAMIC; dc->ex_value = dc->base.tb->cs_base; + dc->exit_to_mainloop = (dc->base.tb->flags & FLAG_MASK_PER); } static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs) @@ -6630,7 +6633,6 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) case DISAS_NORETURN: break; case DISAS_TOO_MANY: - case DISAS_PC_STALE_NOCHAIN: update_psw_addr(dc); /* FALLTHRU */ case DISAS_PC_UPDATED: @@ -6640,8 +6642,7 @@ static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* FALLTHRU */ case DISAS_PC_CC_UPDATED: /* Exit the TB, either by raising a debug exception or by return. */ - if ((dc->base.tb->flags & FLAG_MASK_PER) || - dc->base.is_jmp == DISAS_PC_STALE_NOCHAIN) { + if (dc->exit_to_mainloop) { tcg_gen_exit_tb(NULL, 0); } else { tcg_gen_lookup_and_goto_ptr(); From patchwork Sat Jul 2 06:02:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 586527 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp2076735mab; Fri, 1 Jul 2022 23:09:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sC7/DvLGVek0Jnahd5y/fuQT4Qwk0Ugv/3oAyL3KiyGUweUWLxi2niVwYNBsDPjARaIwCb X-Received: by 2002:a25:28a:0:b0:66c:8fc0:27f7 with SMTP id 132-20020a25028a000000b0066c8fc027f7mr19119303ybc.312.1656742190945; Fri, 01 Jul 2022 23:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656742190; cv=none; d=google.com; s=arc-20160816; b=X63lvJDbFIHVLoq/jP/RUspYq3m72i0Sarbf9FwexsupMbieYn8o9xamRWD1syhXaE nGCeDySgjxceMAFkVwp1583JofcpTb8HkJnR1noeIzIIlDyMKMqhYheR7/jiUuLWkSBP 2m7JurKNBQFCULZYOfei6XFvXwYVR7vvJXYlLPbZcBACqURBcvbzrge+ogpMbyvdsLBh PfbHqwiJlp090B93NDaJANsU7QU97notxBXpdBrfio5VfQ80kv6BPlVp4pfr8lcKiLqq YFP5+7dFS8Ai2mwG1W6+r5MlWcJeZ/V6h+YNtA5seHtXSnK2ovuTNEztkLAd7SjDCMgk B+2g== 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:cc:to :from:dkim-signature; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=0z7Tq+EQ5JIeXAT9hPF2LP0Lw1OVrZdX/VMO6ZXV1NbhecApUSlZCzBUy05m0b6lbk tIKQhhdbBeWDfO/LNv92sBcNMEMJhwOGc6XLBDQ5b+kg8fYGtkaDIaUA2C4cmtsXbO56 8SEev5r04S+6S9j0vdo29egd6M7ZTJd4Hn10YhZ5Eyujzp/kyFfWTjrxKHlhwp6iLtHg SAe+DobM/H5OrJ9gOml5o0zpQJEG5Pcurz+60J7poHcCRmkFpLn4txVbrHmx9u4iKzhk KY9t3vLO4CmSSWJXbMQNpIp4pZGXjS0jtnZD/6UZ/OfwJN567o/KahnYZywidzRNHmmf W6Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CRCBep4Y; 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 184-20020a8119c1000000b0030c5a2eb3casi32138176ywz.206.2022.07.01.23.09.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jul 2022 23:09:50 -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=CRCBep4Y; 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]:39866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7WKE-0002Hl-GY for patch@linaro.org; Sat, 02 Jul 2022 02:09:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7WDR-0003Cw-V7 for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:49 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:46843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7WDQ-0004sp-Ga for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:49 -0400 Received: by mail-pl1-x62b.google.com with SMTP id q18so4160037pld.13 for ; Fri, 01 Jul 2022 23:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=CRCBep4YA3KLJs2P6ugE+pCtNc8XR9Qbbqqp9wpjnIwdl83pbl5GewLVBEkwkxmunQ 4I10zr7Ud8e2cZOeUcU2E0UCLsknTdoWFLYYscKRnUe6QP1kUAbynEv5xxB+LtbkpIYo C0bTLo5V1Qx/JxSinlXRphvFL+g5AlICgRUWBSFTcQUsFc0vD0M08f4Ef+WjP6WsLHYN JoUtNC7tMhevKFv0pxkdtM9tgQmOX4GpDhbNWCKgiOqVO28A4EI0f1uFQDkkYYxAH3Jl dF4WSHY6qhQ8K1nq5aDFrh4KeVdSXnmcjj52nnY8ia8LgkgArfzMczCe/UPHEMoWL/Rd p48A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=J8qR9gA1P/o8gtz8EiBGO/3sTH8DtzQr8sUIKASCrtWgaJ/vbxGTu1TZLxHX7uIj80 zOdTOoE+pp5MJT9vY/01gj53R7nARFE0Y1Qbqwfsd0gqmdM0LiYD/jlYWwamIkBv48AO +U8XZ4tDjZUwEiedpBT0jNHcCDIowbc7qdYXPjNBzBTDMPwsQN+LeA8chbRauTFLj1S5 g5Ves4lkzE4a4dMu4CqziT5dEJdz9WqaWZOB796Qenmh1rYI4DNWm2ygF/bkzERAKWa/ y/Odjjx1pFmrTgIxErh2VUuHj0G77HPA/8o7i7jkA6fvToDPTJDwM9pmLcnlRX5Yi3YQ MOtA== X-Gm-Message-State: AJIora/gc7mwN93KyM6M3UNNxmqvU88P3+7tfIETHl36f41/Dm1kVsyd bFVPzwgP5ri1TDYEsDDUmcz/2BLwwKzGrxaI X-Received: by 2002:a17:902:8216:b0:16a:6376:ef81 with SMTP id x22-20020a170902821600b0016a6376ef81mr25273603pln.2.1656741767190; Fri, 01 Jul 2022 23:02:47 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a66c200b001ece55b938asm5232178pjl.32.2022.07.01.23.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 23:02:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@linux.ibm.com, qemu-s390x@nongnu.org Subject: [PATCH v2 4/4] target/s390x: Exit tb after executing ex_value Date: Sat, 2 Jul 2022 11:32:28 +0530 Message-Id: <20220702060228.420454-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220702060228.420454-1-richard.henderson@linaro.org> References: <20220702060228.420454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When EXECUTE sets ex_value to interrupt the constructed instruction, we implicitly disable interrupts so that the value is not corrupted. Exit to the main loop after execution, so that we re-evaluate any pending interrupts. Reported-by: Sven Schnelle Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index eac59c3dd1..e2ee005671 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6593,7 +6593,7 @@ static void s390x_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->cc_op = CC_OP_DYNAMIC; dc->ex_value = dc->base.tb->cs_base; - dc->exit_to_mainloop = (dc->base.tb->flags & FLAG_MASK_PER); + dc->exit_to_mainloop = (dc->base.tb->flags & FLAG_MASK_PER) || dc->ex_value; } static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs)