From patchwork Thu Jul 7 07:54:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 588109 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp332366mab; Thu, 7 Jul 2022 01:24:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uu57aJNmfsVS0y5Gmuw00mmDr50j/+IhSU4nQvlLzPZGgWjC9kUS2psyd6PtHvWbI8oK8y X-Received: by 2002:a05:6902:729:b0:66e:a7b2:d6eb with SMTP id l9-20020a056902072900b0066ea7b2d6ebmr5710577ybt.345.1657182294115; Thu, 07 Jul 2022 01:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657182294; cv=none; d=google.com; s=arc-20160816; b=dmufUpVKhQbRZoOCi83S0mb4coBcmzyIQv8b6QFYKLxd3HE/bdWrfbe3SiDYfJpDTH E0dM73wtYVHEI37gZAatGf1rLwTBvl4nL1+OhqvPNj2g5JsRbnTkloyru3bM8k36k4j1 ym6Tq7pw6oI+9s/+8eRgE/ovPHmVZbXhlo8KG7l3DJAtA9pTNgPoQPjFPMfom9GwqUzk 8nlWFYz17Li+k3CaesYqoI4erYiuo33cPW//3MyjATbnZvyhIFE9ZiTDYUYkUGrHeOdo 3FVEnfPO9E9PPKjAt0xCHugDFoPCRNkyyS0DyXA6qcDju0SBNmLptc9kbs5UwMbb0t0a Iryg== 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=dea8yWrQIeDLBiDdQQ0067znXc1QZ2VhPfan4n/Ed24=; b=p2DDC4Ix2a1E5L8Bt4s+d4wh4luN5BoCDWKKsAX3fBFkvgYgSMu/DORInAEHj3xEd8 r1hEGvnsmzuzbprMgVtWCTsYj1ZgjBkARed5HnkEnMO/Ze42zO8FOc+QnKQptWYMlnz9 F8rZuce7AuejjeT0oXHEtwKPOYTq1YKKr4RpvmKyzFVDIsjcrWGciQ6/KvGZzOHZvoTC WXMcDHQi58nm4RovWwfvP7L71fXHYbBuKAKOF+80C5xiLwzsKHXEmEJNnozr8Ozg4Tv7 M3Nj1CKy582wp7X8iO4SCxfqinKmLKhhSjTsEX6PK4rHnXbui+yjiQdNBqPojQ3ysWA5 zBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dAazEil0; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c204-20020a811cd5000000b0031cc0f962fdsi10579829ywc.314.2022.07.07.01.24.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jul 2022 01:24:54 -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=@redhat.com header.s=mimecast20190719 header.b=dAazEil0; 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=redhat.com Received: from localhost ([::1]:38586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9Mof-0003Xc-KY for patch@linaro.org; Thu, 07 Jul 2022 04:24:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLk-00032Y-7v for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLi-0007YI-NH for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:54:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657180498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dea8yWrQIeDLBiDdQQ0067znXc1QZ2VhPfan4n/Ed24=; b=dAazEil0oAAHRyFZcsigFR2fTHwlTWUpuMUbT4aiM6gPw/8OkNYFzuIIAtiZNSiuEVz75q vnMckESGlrV3Smn0jmzvsRLAn4TAMhvMVFH/Qd5eNoVN/ljgCY5HHI+Ui09OZAf4M5Nvzi lZmW0oBS3GjRdJBk+fWlGHSpe6y1OCI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-8-hiU1JYnJM725l_Jvm8rvHw-1; Thu, 07 Jul 2022 03:54:54 -0400 X-MC-Unique: hiU1JYnJM725l_Jvm8rvHw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D3C33817A62; Thu, 7 Jul 2022 07:54:54 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9BED400DFA6; Thu, 7 Jul 2022 07:54:53 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org Subject: [PULL 15/18] target/s390x: Remove DISAS_GOTO_TB Date: Thu, 7 Jul 2022 09:54:23 +0200 Message-Id: <20220707075426.1163210-16-thuth@redhat.com> In-Reply-To: <20220707075426.1163210-1-thuth@redhat.com> References: <20220707075426.1163210-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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" From: Richard Henderson There is nothing to distinguish this from DISAS_NORETURN. Signed-off-by: Richard Henderson Message-Id: <20220702060228.420454-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- 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 Thu Jul 7 07:54:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 588108 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp327989mab; Thu, 7 Jul 2022 01:17:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sn47fTYRpl0QDmi5UPeduKqLYy91fXr/hv/e7CW0/M5nlTOmKzkrLp+2JM3AdipGwr25H/ X-Received: by 2002:ad4:5dcb:0:b0:470:46eb:3a1c with SMTP id m11-20020ad45dcb000000b0047046eb3a1cmr41748161qvh.69.1657181829160; Thu, 07 Jul 2022 01:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657181829; cv=none; d=google.com; s=arc-20160816; b=S/4bLa3DtAuZevpFxKfGyGgSeyPwmfXQ4JSI5CYQqmpNNwg/YRabI9zm/zeYW5zRoT TVac7CuFW5HCXjvPN2SArBIhsvmx0dsvurn08dkXzhHC4tmBH15VsbVuTd3XSyYgqQLY 4MhJgpMQjuk8YcEeZvP4GX15Ke80uAK+ZNRELYjN4Z7i/JaujpOeYyNMXvJiI5k3uS87 HnOJbfnzm3c00ajGRQsfCmeP39BEYX8UkQ36ENMQQGUQ8/ueBtahDlvFVV53HNKVuAes IV2wlhcX/AwjDADyXE+a8dRYvs6D/l7yR6HjSms/HlOdi4walNBiJGvee3L7AkizXJxK CUEg== 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=5wL0hgUDAenXher0J65sDriO5cdDWQ+loZqkbDpxz3s=; b=EAaREkwcXmSztCZLXVQV3TxWmXuvUduD7DZwk2UwMy1iiz2NJDwZL+ioOtPeVCToho DsDaSUnkZg6M4zOzlcnTXKmTLWO3sTo98YaxrU0X58coAYkIsW+jLWibxoNcGXhw6pKO C7mIu1P42obtnnTSBie9ZGAUN5IXefSvIIwId0ZWP6a8jUJAsOvhiyKLttTGwsN2JiXc BsHFvO6d0HjwjcftQ50ZtmyEWOwmCvwdB7CpdjpVpRv0ZeJDPdf/YpXv6gDU5ykvZMej KV49qmKZkTokwpOMbM0H5Y9b+9GUNvLk61RB88Gzh1wJ2owgBpTkif6etJyjkBlIV201 sLSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g3dzi84H; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t11-20020a05622a180b00b0031e9aef5cfesi598106qtc.434.2022.07.07.01.17.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jul 2022 01:17:09 -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=@redhat.com header.s=mimecast20190719 header.b=g3dzi84H; 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=redhat.com Received: from localhost ([::1]:50962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9MhA-0000Zv-P1 for patch@linaro.org; Thu, 07 Jul 2022 04:17:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MM0-0003ZL-2m for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24315) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLu-0007b7-LB for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657180510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5wL0hgUDAenXher0J65sDriO5cdDWQ+loZqkbDpxz3s=; b=g3dzi84Hf7IsVfdu8b6XSc2adtwEyYz7yjiHDJMWK/ixIFmx+6haob9D+hm/k1YtXkpT0E caUh/M4XJmcK6keNKsYORWvk4SXLZFY6g+dIl1QCa7M+LGLjinU/KvnClmHHRLtmSoZhWS HGOWjgGtOx0qsqQBh4tZmrt2VaFE590= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-296-PrxLpx16OZqbbqmIZ3NGbg-1; Thu, 07 Jul 2022 03:54:56 -0400 X-MC-Unique: PrxLpx16OZqbbqmIZ3NGbg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12B6685A582; Thu, 7 Jul 2022 07:54:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0ACBB40CF8E5; Thu, 7 Jul 2022 07:54:54 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org Subject: [PULL 16/18] target/s390x: Remove DISAS_PC_STALE Date: Thu, 7 Jul 2022 09:54:24 +0200 Message-Id: <20220707075426.1163210-17-thuth@redhat.com> In-Reply-To: <20220707075426.1163210-1-thuth@redhat.com> References: <20220707075426.1163210-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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" From: Richard Henderson There is nothing to distinguish this from DISAS_TOO_MANY. Signed-off-by: Richard Henderson Message-Id: <20220702060228.420454-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- 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 Thu Jul 7 07:54:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 588107 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp326303mab; Thu, 7 Jul 2022 01:14:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6nz8XfcXIUcULj5f6cTsSYXDGX5ZlTkGdRYhD//4BdJt7xqFlrSxV5YFepogkmtq6SVCo X-Received: by 2002:ac8:5715:0:b0:31e:9bb1:98a with SMTP id 21-20020ac85715000000b0031e9bb1098amr615674qtw.192.1657181651288; Thu, 07 Jul 2022 01:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657181651; cv=none; d=google.com; s=arc-20160816; b=jg+nJ0TuQcw+EB6oIPJUF3uEk7Zk56WNTkDcJu0WYgStoT/oh4SPmc14iC4B8JrD3k eF2xctjhM0H8YIuYArlDjxMzhvMNmx5K4vUqNWxv8Cx/8PrLxekyBXQY2fsjhVupAMd4 C5nO4txbZGBoyOdK1Rd0gy3iy3a/KF0vnUEtHl78rjBwc8l6OD/VnB58b1BWbW+z7gB0 19jiY9EwB+P4Ldh+YBGf9RAhxQ1exUfCWQYp8K5Hny0gsnirIWI6d2QECKWgqX/tFAhg 9Z8MxP3JTo4l0KJfh7zVuVcQHmrPtqPecEpQimj+rNFEycDYo6nhOes5N5z8SasVnb20 xuog== 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=HPhhUw3G9VdD1hQpSr4Rthp2MHmD0SVEjQNXW/ak51k=; b=DtcxiTaujXkeT9+ETCbSr4SN84SymsJ9LSBJwHPVWwOK6MkmqulZxfzwqSDjpCIZKC sR/YzHycjMai5tQWpQbRnX+9v37WTE9jvahU0ZxqCgIAUFpAWRVbKiu9Yy+wtnVJhJpk Friu0r0w/u/ZG7faK+u9m7ZUkTmy6h3Yhi08M08zXmUecWiUeWNk4LSyaafzKrZfaW/C h1ktoXGet9s247EUxKJfw8fJCJ60ZnzHyKD0PHpEL4GlJginauRuDEFZyApRw6CiOPgd 7T2B4JckvRNNJbMUNeIUbH3i26yveCinMAkKw95fJ/+4pDLoVpDX+/kaRgAXDvq8KhVy gyVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XBWUyWBC; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if7-20020a0562141c4700b0047040660021si23638299qvb.281.2022.07.07.01.14.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jul 2022 01:14:11 -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=@redhat.com header.s=mimecast20190719 header.b=XBWUyWBC; 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=redhat.com Received: from localhost ([::1]:47658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9MeI-0006kW-SB for patch@linaro.org; Thu, 07 Jul 2022 04:14:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MM0-0003Zn-JN for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLy-0007kr-BX for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657180512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPhhUw3G9VdD1hQpSr4Rthp2MHmD0SVEjQNXW/ak51k=; b=XBWUyWBCZuym2eHi0sTziV2TAbL4c1466XybXMaOzlOT7TUhRr7BYhySAH67juC3jg5BPP oYNtMHD7nTxzn5u29xZ1Y6cNB0K2V32z+PYxS4hrxpE/NlUKAJTYvI0v8oKOmCcyQJO/L3 djit9z4Zz2iPViFsATG3xvOlv+Jppp0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-462-f_3ROYwJN_i95Psm4KTUcg-1; Thu, 07 Jul 2022 03:54:57 -0400 X-MC-Unique: f_3ROYwJN_i95Psm4KTUcg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31EC08339C4; Thu, 7 Jul 2022 07:54:57 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62BC6404754C; Thu, 7 Jul 2022 07:54:56 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org Subject: [PULL 17/18] target/s390x: Remove DISAS_PC_STALE_NOCHAIN Date: Thu, 7 Jul 2022 09:54:25 +0200 Message-Id: <20220707075426.1163210-18-thuth@redhat.com> In-Reply-To: <20220707075426.1163210-1-thuth@redhat.com> References: <20220707075426.1163210-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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" From: Richard Henderson 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 Message-Id: <20220702060228.420454-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- 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 Thu Jul 7 07:54:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 588110 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp337580mab; Thu, 7 Jul 2022 01:33:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uraSwrB+M4oEgxhb4nbDy9dXavdw9419R5BiDFfTj2kXJDVmHy1fkCnLGick+X/H2hcJLm X-Received: by 2002:a5d:4e49:0:b0:21d:6e8a:fa3 with SMTP id r9-20020a5d4e49000000b0021d6e8a0fa3mr15012338wrt.528.1657182833586; Thu, 07 Jul 2022 01:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657182833; cv=none; d=google.com; s=arc-20160816; b=o+R4UZ9KuUSxgHD5UN6V3TPalEkbdIJ2cVMjxZ2G27lle5DVwf9/M1ST9EwFf2s5GU H/cnn/iQMuqrDFOGDbErmILo0EmcUbRSZem34Rn7AVqxRG1f5Odz+IX/Lxejmeu2BSOh 55VaE9n4uNoJ3lS6XiTY/7NTVJEuY//JKxQUnW/ve61cifzeIXwTQp+25Xl0vhIgLr7F Vi8FYJdLZbUTKXmJXQEWsX/r+uJDF4x3A8jnxf6PPxAIzB02NOuN1O2RANQ5ZsOOavNX XxxQuT5gbLKYkviwT4hqZrih45k2FwJDQDS3/NJqhG0cSdMm8XEldT5ixBkYQHXVBMV1 /INQ== 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=ITdvtq8Q+74yy3dAxf8FaU1TpMnyw+GlQ65Es7wyTrI=; b=wKIEDZu15TPJq1jtKgTXhlYs+6TXaKC9ALWFdPbBInSTpSsMd7MRsajvPhY/Miqf2g pcgL5L2Fl4tdRfeiwpCFEOAwBIA2woFtsr9WQ28bn/b/Hw9ZdNSu3uekLyvYGtd9Gp/7 EERcQl/eXVqI2ypwZXQIASDNprP8ubRXzrelWD6xiSzgZ/VMblUQViC6k2TI4yu6Qxyf tYEHPB8x7zfkPIVQ+Cn62mOYjaH8z+NHxFZbWBjB4NpwL8la7sbBgsK+ZaBYMy6Xb0Ad S1B2GQTqoEvxuPq2WFvsvjGRX3FPHxGbgnHfaXTO9/x04GY3A/UjtFMRtLFcLkJwWhKn zoVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IF+ZSvvM; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c7-20020a056000184700b0021d163daeb4si47219275wri.500.2022.07.07.01.33.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jul 2022 01:33:53 -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=@redhat.com header.s=mimecast20190719 header.b=IF+ZSvvM; 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=redhat.com Received: from localhost ([::1]:50598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9MxM-0004HF-HB for patch@linaro.org; Thu, 07 Jul 2022 04:33:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLy-0003Yk-Kp for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9MLt-0007aS-14 for qemu-devel@nongnu.org; Thu, 07 Jul 2022 03:55:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657180508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ITdvtq8Q+74yy3dAxf8FaU1TpMnyw+GlQ65Es7wyTrI=; b=IF+ZSvvMw+K4HYq+6jNmRRpZZvXbB/Hdbv+k1a2pv7SITbe+K2BDr/jS7hAZcbQA0p2TDR iv23m+/9qY09CkyGAGplWHFoFWR8z06DCvUrhdTTmKXfIE/NAphBGocAYHCnNATyV5HnyE /99ksD4Hrqd3WJh5C/KSgKKXe/4Dz9o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-466-5v4S-u3rMkWzYEJUrJEcMA-1; Thu, 07 Jul 2022 03:54:58 -0400 X-MC-Unique: 5v4S-u3rMkWzYEJUrJEcMA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8EE9E857A87; Thu, 7 Jul 2022 07:54:58 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72698404754C; Thu, 7 Jul 2022 07:54:57 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org, Sven Schnelle Subject: [PULL 18/18] target/s390x: Exit tb after executing ex_value Date: Thu, 7 Jul 2022 09:54:26 +0200 Message-Id: <20220707075426.1163210-19-thuth@redhat.com> In-Reply-To: <20220707075426.1163210-1-thuth@redhat.com> References: <20220707075426.1163210-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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" From: Richard Henderson 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 Message-Id: <20220702060228.420454-5-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- 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)