From patchwork Mon Jan 9 01:42:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640567 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1915771pvb; Sun, 8 Jan 2023 17:48:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXveYIslgRx0+aV20oNWVZXIlAD6m3BstE6yPaADKqUQm0jlIrE6YckDs/LGMcZCEo3soSJh X-Received: by 2002:ac8:6a0e:0:b0:3a9:86c6:e27b with SMTP id t14-20020ac86a0e000000b003a986c6e27bmr75191929qtr.28.1673228881019; Sun, 08 Jan 2023 17:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673228881; cv=none; d=google.com; s=arc-20160816; b=MafUA6flyc39a1qm4ponkU0sRuZWEU5k1vqCM3jK2gI+mJ/ivAWnsbXRSDd9XiGM+4 5v7FAp0lGqSDyxU9CFGzeZ4zJp0d2zVyC+PLDuyX2sIB67IdyKjwmaNaGTRNkhcPCfx9 dVP2kTZWk9wIiqqrVXUymFXJ3FZ7nWyVK7UWdNOVbSLqD6MC0PNL8wCASTtMxwHb3XKN 3inOtcS2TvBriezWh5NHpkSynAS5JfqxcyqqnLJcl8lU0/4kW6XwweD0GcLAjUpqMr5k 8fEZjvyAyVafoUFAbhRnhyPfr7KArNCxf9SfGPTm9Ipei/WnerhqDhqMhruKjrzvjRc6 cz8Q== 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=NWiFXNj6R/76TLM7GNYc4jJNs/0+KnaQLuUilm2f5p4=; b=JZIMZ3JvOIX23aL14WHtQr/6i7px0Eun1n6LV1j8I06E9NIgqHff+XjYmw6K0D6WOF Xntoak5PFlD+9rTKQBJ9a/i26/mD6zo/eZvT8fz5YzadZFmDVNyIYUIAcaLoOhPg3M/b qvHhhuyK5+XH8Neek/Jp8Pi75VntzOq58wBdrhfSMj2v3CuxdLMzxrlJUFLdTqktl0hU LKOxGcGt0ap7jvXlaghE02TyJ3GCwoSSEvpUWPx9XxptR5AmlTkaCCQT5OTB0xzXfxnY FTlwEKkxpoBTM+qmxMahTwWhiGRAWm+ZHiwH5veJkpYzxt2A5bR7bOfGANtKdnXZq8+N ttww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HFprXzEC; 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 z11-20020ae9f44b000000b006eebc5cf8c5si3589161qkl.743.2023.01.08.17.48.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Jan 2023 17:48:00 -0800 (PST) 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=HFprXzEC; 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 1pEhBl-0000ml-GY; Sun, 08 Jan 2023 20:43:01 -0500 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 1pEhBk-0000mN-UH for qemu-devel@nongnu.org; Sun, 08 Jan 2023 20:43:00 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEhBj-0001XZ-C7 for qemu-devel@nongnu.org; Sun, 08 Jan 2023 20:43:00 -0500 Received: by mail-pl1-x62e.google.com with SMTP id jn22so7927649plb.13 for ; Sun, 08 Jan 2023 17:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=NWiFXNj6R/76TLM7GNYc4jJNs/0+KnaQLuUilm2f5p4=; b=HFprXzECG0BGuFPIJO+kfDkINr6KVgS2QisMXH6QfikJGIIbf5bmWQCF/GuOwG2+Ss K2pNT6nJmvnp/2qNyDG8wb2gc3qyBjTkto79caN/a5QkozOTt4PpbtQj3EDyjIs5Dmzd ld5y3X+/6cz9BrEdomFsvZ8mgZs/g5c8yi4Kn1lzsJUV2YzrdMeDHWlcFT5f3fmGIim+ 2VeD6we9DDx0aBnfKFhwzAugefFuGVzB95miObLyt4+FYXwr/bz/0X4zBemN2sdCIobE Csw0ERJaHjJsEqR5n7EYV9a5HcrCh6YKl4fSWWLbNI1y4R+oM5uguDPTsAeMyN7cGHbA iB4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NWiFXNj6R/76TLM7GNYc4jJNs/0+KnaQLuUilm2f5p4=; b=j+nI7Yd4lqPR/9Hh2gBec8c6XMHuqdgHaEXnHuQUfsrxtb9Fek3jKm/ClA5QVpqtME /80xcSLREYskDPwcs/EkfiQf1HwHkRsrbKcGNsbGe1YXTLYRn7H3QkCXccci9pphG5YY ohaIR08IN1y+KdPGT/rM2h0nsYlwT74RjSyoTOI5mQw6vWw3oOJXPlmi5YtXDgu1pRJ9 95zH9pUs/vpXFe7HLSwNJvxBin9A1zA/y3VEPKKCP+uhLCo8uzBWVRvpDFwh4ouu91/G FXdqMRMe/Nu6L1aAsxExwScDFZhYP0zSDGbVHhbDnqACu/KRM42I+r+41UT4y1lnST12 z+8Q== X-Gm-Message-State: AFqh2kppviLvdRlsUfjwr14K7jfoNweAL7yxAdsDOxfm6F2CygJL4QNj E5veAxgHppdwNhSALpyaekIVbVST9HIvV+fA X-Received: by 2002:a17:902:c1c9:b0:192:6544:18b0 with SMTP id c9-20020a170902c1c900b00192654418b0mr57161669plc.63.1673228578071; Sun, 08 Jan 2023 17:42:58 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:a909:891c:953d:a6b0]) by smtp.gmail.com with ESMTPSA id w13-20020a170902ca0d00b00178b77b7e71sm4743617pld.188.2023.01.08.17.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 17:42:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 09/22] tcg: Rename TB_JMP_RESET_OFFSET_INVALID to TB_JMP_OFFSET_INVALID Date: Sun, 8 Jan 2023 17:42:35 -0800 Message-Id: <20230109014248.2894281-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109014248.2894281-1-richard.henderson@linaro.org> References: <20230109014248.2894281-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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 This will shortly be used for more than reset. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- include/exec/exec-all.h | 2 +- accel/tcg/translate-all.c | 8 ++++---- tcg/tcg.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 25e11b0a8d..b4d09c89ab 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -585,8 +585,8 @@ struct TranslationBlock { * setting one of the jump targets (or patching the jump instruction). Only * two of such jumps are supported. */ +#define TB_JMP_OFFSET_INVALID 0xffff /* indicates no jump generated */ uint16_t jmp_reset_offset[2]; /* offset of original jump target */ -#define TB_JMP_RESET_OFFSET_INVALID 0xffff /* indicates no jump generated */ uintptr_t jmp_target_arg[2]; /* target address or offset */ /* diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 51ac1f6c84..99c81e9691 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -501,10 +501,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tb->jmp_dest[1] = (uintptr_t)NULL; /* init original jump addresses which have been set during tcg_gen_code() */ - if (tb->jmp_reset_offset[0] != TB_JMP_RESET_OFFSET_INVALID) { + if (tb->jmp_reset_offset[0] != TB_JMP_OFFSET_INVALID) { tb_reset_jump(tb, 0); } - if (tb->jmp_reset_offset[1] != TB_JMP_RESET_OFFSET_INVALID) { + if (tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) { tb_reset_jump(tb, 1); } @@ -686,9 +686,9 @@ static gboolean tb_tree_stats_iter(gpointer key, gpointer value, gpointer data) if (tb_page_addr1(tb) != -1) { tst->cross_page++; } - if (tb->jmp_reset_offset[0] != TB_JMP_RESET_OFFSET_INVALID) { + if (tb->jmp_reset_offset[0] != TB_JMP_OFFSET_INVALID) { tst->direct_jmp_count++; - if (tb->jmp_reset_offset[1] != TB_JMP_RESET_OFFSET_INVALID) { + if (tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) { tst->direct_jmp2_count++; } } diff --git a/tcg/tcg.c b/tcg/tcg.c index 467604efa3..8c35a40eb3 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -4664,8 +4664,8 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, target_ulong pc_start) #endif /* Initialize goto_tb jump offsets. */ - tb->jmp_reset_offset[0] = TB_JMP_RESET_OFFSET_INVALID; - tb->jmp_reset_offset[1] = TB_JMP_RESET_OFFSET_INVALID; + tb->jmp_reset_offset[0] = TB_JMP_OFFSET_INVALID; + tb->jmp_reset_offset[1] = TB_JMP_OFFSET_INVALID; tcg_ctx->tb_jmp_reset_offset = tb->jmp_reset_offset; if (TCG_TARGET_HAS_direct_jump) { tcg_ctx->tb_jmp_insn_offset = tb->jmp_target_arg;