From patchwork Wed May 29 10:54:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 799841 Delivered-To: patch@linaro.org Received: by 2002:adf:e110:0:b0:35b:5a80:51b4 with SMTP id t16csp668295wrz; Wed, 29 May 2024 03:57:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUlpN5NiuZWwOpUXGos86cat1dwVdjIApqtF3bTGZ7NeDszt/wE5GYfVnbz9WVvVUkzYKC74DWMQ7dIJGusUULC X-Google-Smtp-Source: AGHT+IHg0MD9FNKm+Rb9cMcABUwUS0yl2t4KBY74mOEKZoebMuzkwBf6NX9Jei4vcpxqMwypDMY+ X-Received: by 2002:a05:620a:170a:b0:794:a729:da1f with SMTP id af79cd13be357-794ab04a5dfmr1815496785a.7.1716980275064; Wed, 29 May 2024 03:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716980275; cv=none; d=google.com; s=arc-20160816; b=wmCVMfuKat2hmvIpQSk9QjgcxN/7zM/b3t9eUUreRgQ5MN/16eavw/HbMVBk94t13E 5HQyKCvfXcdGXusxetkG1Di+nRk9VvfKs4KPd8VMxUGeIandop0kiW6izEM7x4twm2IP SR0QonnS89yeMSuYrJpblxJXWmeQhCAgXSURC5QxoMBnn70XqA9lH6o0ZPn/WtBrJ3bG typbufD0XxCAOC7PI8NA8AxkM19PmppfLIdrET1NkRcUZ4PnPgyr8e3oWpkFv+kB2/il DAjfxi4PzMQkETjp+fg1AcXAc6Es/aXJ8DdzW95wNjN36OmX/d8JRnCGyYB7MOvcqjrH 4Qkg== 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=gknOSq6mBkdlS86zMGskf2jg0fArR/rEv32THgzOXP0=; fh=LvDjHOtLmHsu9QDw2U5vQfic2aYV1dwSTRqXY4MzVo0=; b=Sp/aw4LN4eR/w2azXkaURjdEOKmyf3inXyz02LvDp4NynZe+Pfcs6p59LPNn4g3shH 80INDpBEFUbd5fBb4fTT8pdm6qy6uYycxF1B4QLzEB7FZUqE/uitaoHPgwRd1wch2DaH 26O1gMBzRqfCTII99joojzP/huGgj08yj3oS6HQhwUfrMFNO8AZYI5sUt80s4s2N9yCV nm/yfl62ZbuyuY9IulP4adb8QIESb8Sv8bN9UomsOIXiF7U+/LM8eVJA50NEG7lCe1Oo eJEiVGsI5xlvxG33j3ngB9ucl3CRDrnFNOtkKkKAjuGUcaOENpvSoq6Gq+vLas+YYhDG DUBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Tmm7hFwt; 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 af79cd13be357-794abcc8956si1199958185a.191.2024.05.29.03.57.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2024 03:57:55 -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=Tmm7hFwt; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCGxl-0004fg-AU; Wed, 29 May 2024 06:55:21 -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 1sCGxk-0004dR-Ax for qemu-devel@nongnu.org; Wed, 29 May 2024 06:55:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCGxh-0003AG-J6 for qemu-devel@nongnu.org; Wed, 29 May 2024 06:55:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716980117; 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=gknOSq6mBkdlS86zMGskf2jg0fArR/rEv32THgzOXP0=; b=Tmm7hFwt17L/5aMMmOb7o4UAkjOGOeS2fpmGKB1EPSzxVKUvi/QbQMfRWVk9NJ8/+HTMIl pnsAXKvrVJisa6aNs5DWp5ezh3GuJE4C2Dd0MA6ZfbZ4MZ9SpOqp9wmC/8A0D0jD7UCFTu aa8pHUj0nd5fkP9L2+c/LS5JgLEiqYE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-456-cCy01XHmP5Kk652QzKPBcg-1; Wed, 29 May 2024 06:55:12 -0400 X-MC-Unique: cCy01XHmP5Kk652QzKPBcg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35F84101A52C; Wed, 29 May 2024 10:55:12 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1753105480A; Wed, 29 May 2024 10:55:09 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PULL 08/22] target/s390x: Split per_breaking_event from per_branch_* Date: Wed, 29 May 2024 12:54:40 +0200 Message-ID: <20240529105454.1149225-9-thuth@redhat.com> In-Reply-To: <20240529105454.1149225-1-thuth@redhat.com> References: <20240529105454.1149225-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.036, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The breaking-event-address register is updated regardless of PER being enabled. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson Message-ID: <20240502054417.234340-9-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 78066aaf84..10d5e87bb4 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -344,8 +344,6 @@ static void update_psw_addr(DisasContext *s) static void per_branch(DisasContext *s, bool to_next) { #ifndef CONFIG_USER_ONLY - tcg_gen_movi_i64(gbea, s->base.pc_next); - if (s->base.tb->flags & FLAG_MASK_PER_BRANCH) { TCGv_i64 next_pc = to_next ? tcg_constant_i64(s->pc_tmp) : psw_addr; gen_helper_per_branch(tcg_env, gbea, next_pc); @@ -1081,13 +1079,13 @@ struct DisasInsn { static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest) { + per_breaking_event(s); if (dest == s->pc_tmp) { per_branch(s, true); return DISAS_NEXT; } if (use_goto_tb(s, dest)) { update_cc_op(s); - per_breaking_event(s); tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, dest); tcg_gen_exit_tb(s->base.tb, 0); @@ -1101,6 +1099,7 @@ static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest) static DisasJumpType help_goto_indirect(DisasContext *s, TCGv_i64 dest) { + per_breaking_event(s); tcg_gen_mov_i64(psw_addr, dest); per_branch(s, false); return DISAS_PC_UPDATED; @@ -1159,6 +1158,7 @@ static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, } /* Branch taken. */ + per_breaking_event(s); if (is_imm) { tcg_gen_movi_i64(psw_addr, dest); } else {