From patchwork Tue Jan 17 23:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 643424 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp1443361pvb; Tue, 17 Jan 2023 15:12:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXvujB/3BV8AprX0kF2BhRwzL8ch7Z0jNn3Ydx3lwvB1so7LltxUkIcRAG5G27X7jw3r92Le X-Received: by 2002:a05:622a:4315:b0:3a9:8b48:f8f with SMTP id el21-20020a05622a431500b003a98b480f8fmr4911450qtb.67.1673997167175; Tue, 17 Jan 2023 15:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673997167; cv=none; d=google.com; s=arc-20160816; b=P4lUGhces0lzSJzttegxWM4p1V7PjiBeYKopLb8xV/hlvRJwCCDXZJHsueH687bWe3 cw7UivD45rhmCxNsdGFLs0O0y/4uyFfZT4aAw08qaTjaKXfGA6vPlqyTPa+jYKOTHDMw 6bDomaU+zsJQvhGM/INocU7TmgBuuEnACjhY5wdCgWKgQ7Hs36Q7MIOrAt/hwG1JbIsq VOFR2Oq4ihGSnDXes5CfLbw/vTZg4CUHqIiLzcbLSF7VRSTOIz5MrjMnkF9nYOfguhZ2 xJH7Q+IYAZUxiq/WItLf3FH5Yi8Id9RPqmnneiOp6mffS1ltvyqPOHhpBYOX+pn1z5cm mrFA== 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=7ziMP/fEP9bVzsZekB/BH6o4sM8gyTo9c+rdlYUkKqo=; b=gimn/zHB8PpqlXnF29V1vzZDWGMx2gm8ELGO5EZqJ09JXi2Wa1DpZzlWV5PAGttRJS 7mSLzHtkPWzTxiDvpeAZLLv56gcwRRg6IQo3HV9rU8MDfkXJ9BS4otLs7wgilhXGUdqN JK/bAvzTMB4od9El7Is57u31l4iiNBz91f95ZVjy/t+6Z8ZZk/LxVZufI8st8geemL45 Qo03B+18swsWnKXLQHiqO+n41U5tEtbSzvg0Tt3Hye9h1g3gMPoSlfllxQp08TgkDVg5 YfUZsADDbhtQyU/QIyuOQpKNVS0qKLJKIrSUAMWQ/fgGgZ6yLD14Wpn1/ExAu8gZtE6a 8ZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oQfOFQH7; 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 ff12-20020a05622a4d8c00b003af0c686743si15269079qtb.441.2023.01.17.15.12.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jan 2023 15:12:47 -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=oQfOFQH7; 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 1pHv6u-0003VM-7X; Tue, 17 Jan 2023 18:11:20 -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 1pHv6m-0003TC-Q6 for qemu-devel@nongnu.org; Tue, 17 Jan 2023 18:11:12 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHv6l-0001Kp-7q for qemu-devel@nongnu.org; Tue, 17 Jan 2023 18:11:12 -0500 Received: by mail-pg1-x52d.google.com with SMTP id 7so23209682pga.1 for ; Tue, 17 Jan 2023 15:11:10 -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=7ziMP/fEP9bVzsZekB/BH6o4sM8gyTo9c+rdlYUkKqo=; b=oQfOFQH77vO5tdjp3YlF+9TO1rGEOk+m4ti3MilPBvqBk3PWA5sQU3XDKDg1IRV08K 0RhFxd8GgJ8dpeR6ELjDB+YaGDvTol9aLqyzsTSwk7RchIX/J7BIzCPCTCWmt5u4soHT Pv81UyJeFasRj767YxHgzQhNQ/Tk9f/ASA5RD3fSleLXZFVBITQgOYzm0oXv/KHEFnLH WIQyacEzsa0YULj91UoxgXJX9ZneAmx/lItmEaHuXP4RJV2XJYkkHvZqgOU4F/dhCJBL VXrSj1UjOPzPiXjL4OKt4tbjnFn/Ab3tBS87HSQhrzrN8rgL+AI8o0eNmb1yRAnpJyFO YgbA== 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=7ziMP/fEP9bVzsZekB/BH6o4sM8gyTo9c+rdlYUkKqo=; b=r0zII5Vmkkb8M0cy1v3b0O2hhxiU2xpw6qBwgbo0Xilei+0G/xFXAfXm8dbhpMMExT OexSNEo2okuXJ1TAM1eD35XKmwWIv+fAAMfehbbB5OaA0/AQ4dVN5OsoMBTVBUe5XFQG l7JC5GIHBPpbbmBmopotoxgjpCn0eLF5qqL2v8Kjxfsv6YMPTlEDwtAn69VDev0i3B7J wdk374oHVp9iiHGOWMtLEaoASRsORkc2QcRQ7j+ol57q2GU5YK7cBXCDIGLbuLyatCqO 2rSUXswrsvkwl3+K+P7iUC5oXvPwHDD0/D7PyzbtjFrwkUz/BOSSYP3F2JAgivDRE+Qu GdBw== X-Gm-Message-State: AFqh2kpspILo8VxiBZ8e2Se+gEd1guaVmYi0vDclSt6ZydLinrKhPSqv /EYns/yv17qoHtnHbbVIvhRg1WgOQneWGoWC X-Received: by 2002:aa7:9569:0:b0:58b:97f2:2e3b with SMTP id x9-20020aa79569000000b0058b97f22e3bmr5597785pfq.1.1673997069994; Tue, 17 Jan 2023 15:11:09 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id b193-20020a621bca000000b005810c4286d6sm20747070pfb.0.2023.01.17.15.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:11:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 09/22] tcg: Rename TB_JMP_RESET_OFFSET_INVALID to TB_JMP_OFFSET_INVALID Date: Tue, 17 Jan 2023 13:10:38 -1000 Message-Id: <20230117231051.354444-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230117231051.354444-1-richard.henderson@linaro.org> References: <20230117231051.354444-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 979f8e1107..a4fdce5b72 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -508,10 +508,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); } @@ -693,9 +693,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 ffa4506e57..ff674c5122 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -4666,8 +4666,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;