From patchwork Wed Apr 24 23:02:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791565 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1096283wrq; Wed, 24 Apr 2024 16:04:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQiowjbJYX6FAtjaF+v2i73vYw5YN+uLZt+XPNfNo1bitJ7XWG7O7bMacArrnstvqq2Xx1Wx6aLX5xNwSns/kd X-Google-Smtp-Source: AGHT+IFZlRLUohNjlTvaXUujheThMvGUqrY4xcUPEmWPJTBaRYME8Wybofeka4R6jDSRc/EZukNa X-Received: by 2002:a05:6214:e82:b0:69b:7363:92a with SMTP id hf2-20020a0562140e8200b0069b7363092amr1961874qvb.8.1713999853450; Wed, 24 Apr 2024 16:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999853; cv=none; d=google.com; s=arc-20160816; b=gqQkD0BwmLeQa5nziOLsdJX7a9aBlqVZFAWafX73Az+tuOcfuNytwkYZzwtmSsNc9g nK1573oF+ZcKVG+Z0C/rP3W6axtXh3ESAoi/FY+ltZMVCirAaBjq3vEVE93fzB0DV9f0 JIWluLUoAzO3/bvWkP9shTR0Mf+B4wVW0WoTfmwABJeDKtIE/rb0auCwhEUvf5sI/n5I GjZYLb58v/xiAYlmyX/NNE0uYjZza2laGWP+/2EMHcLGub+h3hIpRGoS/hz3QeMtgVQL tlGXpHaTDHF8LCjlE68WmLFDrQsSIdon8oWGj8KY97I+0TAQ98N7E/kjfp21pkIlNi2i vtxQ== 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=nSa2977I3Rq8Xc+67Y2/yCKgEWXvHU4DRnUfHiUzUVE=; fh=eu2DY09p+eeddYDiV+DalJS3Vr0kxK5BujclYkgWvDw=; b=Pfi7Zex/LeqnOJjPqTZSMVRJP/Uq37OjQrpOek/PGaLs1jHwBjrk/TCYpm1Lf2erJx bSkh6KFiqRM+gY1IDDuKoIbrtvp67dGTEDLWi1nwSH5ljVwtqjbNrXqJYLDlDmQ/hdI3 lmeWi/rk58xGXNSm7IceGHHfzqjpqXWs2puFVLq5vBVXc7WVFShKzILOM1rsmqSKzdO2 XU+/PvPzRpS7dp/8TT28ALEzVIKRt8kidf91RhchrfaavMo8eXpp6fX33NskVFsbvpcz jS7jjbdUkjLzG6XfveFWH1N7hD7ykqPPMGOIb7M03PGlUTd64LxBZzUL5B1f0uymqLAw 80Kw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rWdA/Zoc"; 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 kc21-20020a056214411500b006a04756facdsi16747414qvb.182.2024.04.24.16.04.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 16:04:13 -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="rWdA/Zoc"; 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 1rzldc-0003tH-4l; Wed, 24 Apr 2024 19:02:52 -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 1rzldZ-0003qM-A4 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:02:49 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzldX-0002ff-L8 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:02:49 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6ed2170d89fso1069564b3a.1 for ; Wed, 24 Apr 2024 16:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999766; x=1714604566; 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=nSa2977I3Rq8Xc+67Y2/yCKgEWXvHU4DRnUfHiUzUVE=; b=rWdA/ZocjsbTHgQyVSCBkurn0kpCIzt7nHMhhe+LkutEV3yxrW6IEtB1DH5o7tYvk8 Kp/KSg76YryBVmYAMwNrcUYCWh/Z+wZOLX5XOVNveOULK3EElgHhJp8B6QheslEHD1Sl Wkk2liwlVTtvk9w7RlpghIMBmTTwk1IpLgShcvOSRjJwwywSUfhZrjVxHICtcAz5zWge eVko/0TAxc/lK3VhFi6quog/ys5+EeXResQ72M/VzVh5z7o3NnBji4r7T+WbD86Vaody UqkmUO89XZnRNepvP8Rm3pfInDl1aZ3vMrVCab342F9j8F0QBrFIjBnDAuY87v9FePum cTDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999766; x=1714604566; 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=nSa2977I3Rq8Xc+67Y2/yCKgEWXvHU4DRnUfHiUzUVE=; b=Rl1ymeJki0CMsuQn2o1g5uxfXR/tgqgyngJbCfY9y/FxUHSz7zvq4YXThKfqwfUB0c cSF/X+vSyFdDTuX7KGfxryH5htL+6OuKp8PLXyI7EWoVKwA8PbxqrQc6fWsx4hA1Pbc0 yupgP+QJlwtphEUUqxYMLWGCV/VpxmRkUv5xsDj2EZJZz01oaKxVf2BUOnw0vYrd8tKF OR95n3KeUz3NEEcFAk7TzUQQ9aUdiIfo7+luOymsnRxaQ/KbW5rUKaduM31qJkGwkiFs 88T825HZagoOoCihq6i0Onj7ZIm6nzhxfc3rL6BOeohMme7dUZ1UVR63wZcGMaC/iPc2 HGng== X-Gm-Message-State: AOJu0Yz3Lx7KH/mmmbf3ryRq36pNsokiUT02oVy/llvSVSM/CQQJaEbr EsKk+9xqBq0EcQFyoNDLtSewy8mxce/VHScL+mxhivHBN2kyITapEeCAIyy6iVAh7Mc6MbjgWpE n X-Received: by 2002:a05:6a20:564b:b0:1a9:509c:eba6 with SMTP id is11-20020a056a20564b00b001a9509ceba6mr1531026pzc.25.1713999766125; Wed, 24 Apr 2024 16:02:46 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id h5-20020a056a00000500b006ed4aa9d5c0sm11981405pfk.188.2024.04.24.16.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:02:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 19/20] plugins: Inline plugin_gen_empty_callback Date: Wed, 24 Apr 2024 16:02:23 -0700 Message-Id: <20240424230224.941028-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424230224.941028-1-richard.henderson@linaro.org> References: <20240424230224.941028-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 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. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- 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 c0cbc26984..d914d64de0 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -60,19 +60,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) { @@ -362,7 +349,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; @@ -419,12 +406,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); } /*