From nobody Sat Nov 23 23:26:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1728549441; cv=none; d=zohomail.com; s=zohoarc; b=igxYX1tMJRJtG6VfADgx/uq9memlO7pXhK/3vWT1IpL9BKjPEgoH2wMMI1k/ldNoQF4uu718tHseEUHjE1KS2kOOhMp6F4ghfj7sALYN/44HDSp0KCEkCK7AiC5X3xDLz0D/OEhYUeYwXNJhCKv1widn0Q8yaD4p3Dik900Iakg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728549441; h=Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Y6ZhgI9A/PPL66uKE+bRh7ed0Z2uBOmJSzMOo3Ul9p0=; b=RuPVgqCh83h57LRICiU66R/MLzR1dudRmY3ASgjGVILJSrHsRJfJpD+Q9nWtMG84ZGqELnDexi7wVYBOER6gKFwrJH786wYKdqmwfO1w9Vxbdzpo1ZnyQDnhL5SmyAmqe83iKAZmusTgZS4gKDTB89yKZMvExfCsv/i42/4q2FU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1728549441764540.7418096818457; Thu, 10 Oct 2024 01:37:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syofL-0006D6-UP; Thu, 10 Oct 2024 04:36:59 -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 1syofE-0006Bu-4m for qemu-devel@nongnu.org; Thu, 10 Oct 2024 04:36:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syofC-00075n-IG for qemu-devel@nongnu.org; Thu, 10 Oct 2024 04:36:51 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-bxOlJhrxPAG1obiZKwE9Uw-1; Thu, 10 Oct 2024 04:36:46 -0400 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c938ae4152so346683a12.1 for ; Thu, 10 Oct 2024 01:36:46 -0700 (PDT) Received: from avogadro.local ([151.81.124.37]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c937260a9asm464026a12.67.2024.10.10.01.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 01:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728549408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Y6ZhgI9A/PPL66uKE+bRh7ed0Z2uBOmJSzMOo3Ul9p0=; b=D5vCj/Hhi3NZAZ/D0UOO4jVVBWJj5e30DuOKKCfNs/L3oPIU+pdHW7sq1xylKclBHFYqJl 6sRXVLxaYsJPxKeG9R6SXPO/KkiFXtC2yc7+uUkdGlSLNr+qmJ3nD7Hu9rhl5TAslhJP4W 0FeoygMVpE9aekVNAcR2F7CXy2HwjQ4= X-MC-Unique: bxOlJhrxPAG1obiZKwE9Uw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728549405; x=1729154205; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y6ZhgI9A/PPL66uKE+bRh7ed0Z2uBOmJSzMOo3Ul9p0=; b=exWGoCRnco+gyis8Fbota6joD9As5iQqqVlzpLoEC0i34vG98nOHs4PVg4aICCxRUG eSbyd9NSyZX7pCXcT/Vpi4hd7ru7BdMMCcpYUv7Q5/HxcnTfnKEwRT0F2vkWEMCIi1dX 2jGL2Byx0Kh4kpngVRSaMsRpztQDIVTjXzNR+v0FDEVqjME38OcjcSVZ5NAAKZZemiVk 68lA+vsU2TthQJU/lniyI2gFmDDRa5orDyGABF5YeiHKDMsOZ4D92QqFaslL1OPUxvTs v39yg9NuGJybLjXSEO/hyKw9hZKAbGwGSH2pGZVbr4ebe8g3vyG0KY1+eLElEUcWCKKd 47XQ== X-Gm-Message-State: AOJu0Yyph3oc6JHlyf179PI9MAomF87ghF69f8GHEaYTCW7pjdCHncg+ qfyhIZP90NcG+4gl4juQWHsUS/ED2Zs1B7rhQOPHh3pG9FZG8bV0vOoeoDrPYYUxCPSaKt1Myvd SLjYg94sfWr8X6c2ryy4M/7V2pIruMkOU7TFrzyKpL99uhLt9hptiLzBdqVnuI5Erurq8AsmEmb q1zsyS+i/aTCo6vGxnQw0TdAqFIA8VEHe1xTgtk6Y= X-Received: by 2002:a05:6402:35d3:b0:5c9:35bc:81a2 with SMTP id 4fb4d7f45d1cf-5c935bc88d4mr1528541a12.6.1728549404999; Thu, 10 Oct 2024 01:36:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8cLf8tnANgDA4Kpwis70Rruqwq+RYFwQeDwDvplN20RpRTZYvdIQjx9UbERy3k+WD77BtKg== X-Received: by 2002:a05:6402:35d3:b0:5c9:35bc:81a2 with SMTP id 4fb4d7f45d1cf-5c935bc88d4mr1528484a12.6.1728549404202; Thu, 10 Oct 2024 01:36:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH] tcg: remove singlestep_enabled from DisasContextBase Date: Thu, 10 Oct 2024 10:36:41 +0200 Message-ID: <20241010083641.1785069-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@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.151, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1728549442074116600 Content-Type: text/plain; charset="utf-8" It is used in a couple of places only, both within the same target. Those = can use the cflags just as well, so remove the separate field. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/exec/translator.h | 2 -- accel/tcg/translator.c | 1 - target/mips/tcg/translate.c | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index 25004dfb76e..d8dcb77b5f4 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -71,7 +71,6 @@ typedef enum DisasJumpType { * @is_jmp: What instruction to disassemble next. * @num_insns: Number of translated instructions (including current). * @max_insns: Maximum number of instructions to be translated in this TB. - * @singlestep_enabled: "Hardware" single stepping enabled. * @plugin_enabled: TCG plugin enabled in this TB. * @fake_insn: True if translator_fake_ldb used. * @insn_start: The last op emitted by the insn_start hook, @@ -86,7 +85,6 @@ struct DisasContextBase { DisasJumpType is_jmp; int num_insns; int max_insns; - bool singlestep_enabled; bool plugin_enabled; bool fake_insn; struct TCGOp *insn_start; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 113edcffe35..cbad00a5172 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -129,7 +129,6 @@ void translator_loop(CPUState *cpu, TranslationBlock *t= b, int *max_insns, db->is_jmp =3D DISAS_NEXT; db->num_insns =3D 0; db->max_insns =3D *max_insns; - db->singlestep_enabled =3D cflags & CF_SINGLE_STEP; db->insn_start =3D NULL; db->fake_insn =3D false; db->host_addr[0] =3D host_pc; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 333469b268e..50d8537a3b3 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -15362,7 +15362,8 @@ static void mips_tr_init_disas_context(DisasContext= Base *dcbase, CPUState *cs) * hardware does (e.g. if a delay slot instruction faults, the * reported PC is the PC of the branch). */ - if (ctx->base.singlestep_enabled && (ctx->hflags & MIPS_HFLAG_BMASK)) { + if ((tb_cflags(ctx->base.tb) & CF_SINGLE_STEP) && + (ctx->hflags & MIPS_HFLAG_BMASK)) { ctx->base.max_insns =3D 2; } =20 @@ -15445,7 +15446,7 @@ static void mips_tr_translate_insn(DisasContextBase= *dcbase, CPUState *cs) * together with its delay slot. */ if (ctx->base.pc_next - ctx->page_start >=3D TARGET_PAGE_SIZE - && !ctx->base.singlestep_enabled) { + && !(tb_cflags(ctx->base.tb) & CF_SINGLE_STEP)) { ctx->base.is_jmp =3D DISAS_TOO_MANY; } } --=20 2.46.2