From patchwork Sat Mar 16 01:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 780744 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp489461wrs; Fri, 15 Mar 2024 18:59:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQb8xgxSIfPpb/mHNjosqatWBLuQWAagjkuosWrN6tHezYrE+eaf277o2c/QimIjGy9cZ4hRDTwWt2VPcrYAwV X-Google-Smtp-Source: AGHT+IGpk39u8zIXY01UUxp2AgIGjZ1LHVU+i1eO9z7etXLp1a+9t/mDon0TjB0C9FCxz6EDCtM6 X-Received: by 2002:a05:622a:1d4:b0:42f:3096:c4d3 with SMTP id t20-20020a05622a01d400b0042f3096c4d3mr7724040qtw.20.1710554354212; Fri, 15 Mar 2024 18:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710554354; cv=none; d=google.com; s=arc-20160816; b=nlu93diGtuwGWpfa73S+6IfcVElKcC7KPExgfJf4uNKSMfINQd2OjAdRWdb5VODNRB 7q4M8O1XteGyCtDUV8kvjj+IPUApUjXl4iwHwC74DaLtWgv39JCV0H9MFddrgk0uYwXT BJ2FwfHrg4ja7r82AJIUQhrUD6czNWXq9E1n/7bSpF1I1RbQ6meTbcf+QnSseUA//uk9 ak7u5+DFTuFy5mngTWtcCAgbvmgVRpmw5uWO7om+npZVwNFvVDz1q4YkzaqDI2Xpj5Xy fFS2j+U7NdPzkHJFIVhVCsOi5bKBnl4uRP+NiMrCRNAxvfA8lgfeuF8/TZQCsyo5QaiI MaYw== 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=T4SjKUXNEFn8jDbcremHLBaU7vP8s71moqLjJgD1MWo=; fh=DfUxOGz7MnM49MBgqH5VPROGi+97fYtPWhcEZCG1Y5Q=; b=WFPAPj8TQsAh0f1xk6WQtOfcVuphaHVIcqw52qoDOfqNKgMqe77q7PW2g1MJryFtw7 MH9AqL7jI3rATV3cH9/uaPqhV/Zw7kNpdKHQspSSV5Msy7+jI/elJR4BJshIJm58EXnm nNFUNdpJKOMtDjLAdfv/hGy3LTss+hl2jf87CRz7eG73NP6+xUG+Td7EwkjjA+xRRuQd rCsyilisxPxO+NdVIETWtd4BfLnlNEXjKfOQQZpbai7DHKrj0gFeoYl6oeRBZPQoVJOC j2LdXU7LQYYQF4iPUIxjtLGdtPdb9FXGdY0L7cvnMd5wj78hAlltdIADuyQsyeaBoV+1 1T8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xzA0WqcA; 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 d1-20020ac85ac1000000b0042f213973a5si4922495qtd.318.2024.03.15.18.59.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2024 18:59:14 -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=xzA0WqcA; 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 1rlJJO-00031o-UO; Fri, 15 Mar 2024 21:58:14 -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 1rlJJK-0002zg-72 for qemu-devel@nongnu.org; Fri, 15 Mar 2024 21:58:11 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlJJI-0000oz-1Q for qemu-devel@nongnu.org; Fri, 15 Mar 2024 21:58:09 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1def3340682so9382885ad.1 for ; Fri, 15 Mar 2024 18:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710554287; x=1711159087; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T4SjKUXNEFn8jDbcremHLBaU7vP8s71moqLjJgD1MWo=; b=xzA0WqcAHeHxjLeWnIhZg/prJCBfMEv2ET1JtrkHP5YZPeah3Tq/71Husc1FUnFWym N2F+Mxeufi8y54joz/9vFarUPoK4xn/+f1sFdOg30YflAfQg5B5xzDxsSanIqZH7hxTF QTcBPPvyzvvW7YZV9r0F1mMM7jy72ifWa5zWe3j4uOl1hNK9R/G7V4zc2h9Efjo5YnDn 9mxCb/z1nWW1pDl7/9t9WH74CcxLjc1ReT8od1bQ3bAlUYBqfHWZXfCh4CAbVfVwOhDI xTk63QBkz6Gbcl8ZCTKVecks0tC5t2i0uvGgE7QcTU8RKZUrHz/rnID+LB7EMvAfVK5g lW7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710554287; x=1711159087; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T4SjKUXNEFn8jDbcremHLBaU7vP8s71moqLjJgD1MWo=; b=JOPERhGsLQgxGm8Owas9HzhOr1z47Fx2b962LtwM7bi/U/LS7n9Op+yN6GzRmMg6jr C2YLya2G+8dyFDomPm2H04dZwzQUAwoqHuH2tm+NBl9pcyS6/ZNrw2VYDrW4UzAoWnXz 3CO+l6g58qWQ/GovbosQz0yiuMgEN6VQ69dbMyJuqIEhoLBNzJ5TUwAdOYFJ6U0qPiWQ c3HmHBAmW2NgQ74X+fK+7FpjoFfW8fGm+3BXm2/BQrwvOWLW07IDkl8eFxBUmxwI0kl7 PURXXL7l/M/iogfbak40tX7cfkhcOuvvOynI3gWNTt8zoZPTxO+ZaTQEXrijcba81CFk UE2A== X-Gm-Message-State: AOJu0YzHrXdvKRpZO4H/lu8dI/FAGbop4q5mODEnMNzxh3Cyye5xFU5J OpzCQuPB9CW1cq3HRpgKmJDC+gasxjQPVwh9ZVzK+ntlVHX+CCYZ4uKAXLjWz3eL54kovJPQ978 R X-Received: by 2002:a17:903:1108:b0:1da:1daa:e2bd with SMTP id n8-20020a170903110800b001da1daae2bdmr8335452plh.19.1710554286810; Fri, 15 Mar 2024 18:58:06 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b3-20020a170903228300b001dd42bbb08asm4592985plh.253.2024.03.15.18.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 18:58:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, alex.bennee@linaro.org Subject: [PATCH 21/22] plugins: Inline plugin_gen_empty_callback Date: Fri, 15 Mar 2024 15:57:19 -1000 Message-Id: <20240316015720.3661236-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240316015720.3661236-1-richard.henderson@linaro.org> References: <20240316015720.3661236-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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-bounces+patch=linaro.org@nongnu.org Each caller can use tcg_gen_plugin_cb directly. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- accel/tcg/plugin-gen.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 70914c3bf8..fd52ea3987 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -67,19 +67,6 @@ enum plugin_gen_from { PLUGIN_GEN_AFTER_TB, }; -static void plugin_gen_empty_callback(enum plugin_gen_from from) -{ - switch (from) { - case PLUGIN_GEN_AFTER_INSN: - case PLUGIN_GEN_FROM_TB: - case PLUGIN_GEN_FROM_INSN: - tcg_gen_plugin_cb(from); - break; - default: - g_assert_not_reached(); - } -} - /* called before finishing a TB with exit_tb, goto_tb or goto_ptr */ void plugin_gen_disable_mem_helpers(void) { @@ -369,7 +356,7 @@ bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db, ptb->mem_only = mem_only; ptb->mem_helper = false; - plugin_gen_empty_callback(PLUGIN_GEN_FROM_TB); + tcg_gen_plugin_cb(PLUGIN_GEN_FROM_TB); } tcg_ctx->plugin_insn = NULL; @@ -426,12 +413,12 @@ void plugin_gen_insn_start(CPUState *cpu, const DisasContextBase *db) insn->haddr = ptb->haddr2 + pc - ptb->vaddr2; } - plugin_gen_empty_callback(PLUGIN_GEN_FROM_INSN); + tcg_gen_plugin_cb(PLUGIN_GEN_FROM_INSN); } void plugin_gen_insn_end(void) { - plugin_gen_empty_callback(PLUGIN_GEN_AFTER_INSN); + tcg_gen_plugin_cb(PLUGIN_GEN_AFTER_INSN); } /*