From nobody Fri Apr 4 06:44:50 2025 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742392030; cv=none; d=zohomail.com; s=zohoarc; b=gQDWBI6hmfOz1f0eYoJowGaJQuJ/AH51kTDHW1Hwk7fqQrOHVSm8gV7kJpE3AFq1i9PXmzQAClPnKzrgCo4RqkS2p6S877N47echUpxIjxf/g9/tG9vVGr7QcQAAKTvPpsRjG7f5Sclyz388c12KQxc1im3PHHVIkLm4iN/ax7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742392030; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SPrx/qQq0qEoYxnErEWIYikr7yzsC+mHkGeoZcaDE8c=; b=aw7AFG6w5Zj6PU05Puf+QVBIOQE0Ua5tjI5GvO7yn9O7AWsc3uoYVL7caxDrFFYjZD8C1sEWE4fvuJzsGBJmup9Uv1gs2aC1IF+VCMmvr9hw84Tk+f/2lF0/2uh1WHvxOqgpio0K6B7TKVJ0yLN8cPzLChi2Or3McxJN96wHTbI= 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 1742392030275547.3147168249704; Wed, 19 Mar 2025 06:47:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tutkz-0004EB-7z; Wed, 19 Mar 2025 09:46:54 -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 1tutk0-0003N3-Pm for qemu-devel@nongnu.org; Wed, 19 Mar 2025 09:45:54 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tutjy-00044L-T9 for qemu-devel@nongnu.org; Wed, 19 Mar 2025 09:45:52 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43cf034d4abso48336815e9.3 for ; Wed, 19 Mar 2025 06:45:50 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f37665sm19623035e9.2.2025.03.19.06.45.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 19 Mar 2025 06:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742391949; x=1742996749; 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=SPrx/qQq0qEoYxnErEWIYikr7yzsC+mHkGeoZcaDE8c=; b=PsPKZDPFcKqX9hO8xoDauVoZ4E8+IuRJSbDoiFdflhJ/FUlwYPp8iTmqkYUDP/9xGH 1LXQboeBOeNZZSUd19ZGPUp1tQ/PiXcuyz52bpiNdgvTaPi537w9jDMRCk3wwzwGNVyK cYXpfbxSP2LuqLjK36MD6ApF1abt9OFbnQlJza19MkrXL2y63bAAbW2fqLXndZWSnuex w6zdyBvPuW0ddcgjgsTl5pVYvTL+qzvkClFYNSld5qCA7gletaL9blrbIWC1cgWHXuVr k7dJq0hReAjBIMeiE8GE4EXoY5JnOhDjneBCri6Hkw5QPUPy8FSRlQ5Ghne9zl7kIYDD YVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742391949; x=1742996749; 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=SPrx/qQq0qEoYxnErEWIYikr7yzsC+mHkGeoZcaDE8c=; b=pVySWzoKYN/APZRW0v/dl8jqtORb63+Nm/VwG9Y/ioPzYu1qcJ93ayRJFX0r/BDctE yyRvvx7n+Bs0nn/V7JnHGcuwBCZNS2uLxJi2PxfHrthvCayEGBygD2Efva1gS1LK8fyC KmA5HeZsaICu+EiarAKR+r25an8xLp8/GQSk2ZpOh3OzSsuMkvZiIdpmX3lmvsFm42to AERIFrHkPHDqj+JJQOE9N5O0Q31P+8qyUIDNBcUehwbKIRLUAahcQmOTsitLBMxo8drR ES7HUYxmElWpauENsGzjl2a0D0jiUNtFvxL5Lc44OSlKNf9MYU2X90S+36TXVR6B3ejG Pl+Q== X-Gm-Message-State: AOJu0YzD9r70jvyJAJNsHkxA6A8pUEOmEKYsb0rmVqQpjHCLIr78yG3M ILolJ78xPrS9AHxFFZfBn52w6QU/yz95wIAN2viWbzzhadV28VGrT9XUqYVJiulHgu8AEdHDXWc o X-Gm-Gg: ASbGncshxdDsihO5ZTDY9YUz3j5O3Xa6rJczdzkysDnWrBQsDEQLTfgHo4oykHl6VzZ 2su8/it1I/aaGm1msoB6zKDX9BUSYfWqUn4IUZX8OJAkWIvkukNd091U3RKta5yfc5ANgAyP6vU BwaXfiy+aT1FStbdy+ahmuI99Ma+IiIyeHHmtGPbmE/JEW1geRetRQSBlNFLdL78kErKMeoL67n XgyFUf3ESP2uSd4XdiKxH9/36R+n0Mij4lgN5yjwhU5tqSnn6oEHNJ6aNlqL/vp2XOzxrt2s/t5 WAqUUW+C4bMq9GGsvxsrY/GYf7q9jW9UvQQgSvsGFehUyHjR/gi61LQFjIkFr+dzgpnHEMiDaLK 8U/i/nqQ6UsY/T24fWXo= X-Google-Smtp-Source: AGHT+IHdjs7aQ50tjKQlQC0Vj2JE6chXiS8iHMl/1H/jv8dgqA7RU+H5Ct0xNT3xYIarlJ8IRNph5A== X-Received: by 2002:a05:600c:b8f:b0:43c:f470:7605 with SMTP id 5b1f17b1804b1-43d4379505amr29533475e9.12.1742391948777; Wed, 19 Mar 2025 06:45:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anton Johansson , Peter Maydell , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.1 08/12] tcg: Declare arrays using TARGET_INSN_START_WORDS_MAX Date: Wed, 19 Mar 2025 14:45:02 +0100 Message-ID: <20250319134507.45045-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250319134507.45045-1-philmd@linaro.org> References: <20250319134507.45045-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742392030576019000 Prefer the target-agnostic TARGET_INSN_START_WORDS_MAX definition over the target-specific TARGET_INSN_START_WORDS. The former is guaranty to hold the latter. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/translate-all.c | 2 +- target/i386/helper.c | 3 ++- target/openrisc/sys_helper.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 5e2a89dc474..2f8cf6db144 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -206,7 +206,7 @@ static int cpu_unwind_data_from_tb(TranslationBlock *tb= , uintptr_t host_pc, void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, uintptr_t host_pc) { - uint64_t data[TARGET_INSN_START_WORDS]; + uint64_t data[TARGET_INSN_START_WORDS_MAX]; int insns_left =3D cpu_unwind_data_from_tb(tb, host_pc, data); =20 if (insns_left < 0) { diff --git a/target/i386/helper.c b/target/i386/helper.c index c07b1b16ea1..90e113c8b5a 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -31,6 +31,7 @@ #include "qemu/log.h" #ifdef CONFIG_TCG #include "tcg/insn-start-words.h" +#include "tcg/tcg.h" #endif =20 void cpu_sync_avx_hflag(CPUX86State *env) @@ -524,7 +525,7 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int = bank, static inline target_ulong get_memio_eip(CPUX86State *env) { #ifdef CONFIG_TCG - uint64_t data[TARGET_INSN_START_WORDS]; + uint64_t data[TARGET_INSN_START_WORDS_MAX]; CPUState *cs =3D env_cpu(env); =20 if (!cpu_unwind_state_data(cs, cs->mem_io_pc, data)) { diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 21bc137ccca..cf521461954 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -28,6 +28,7 @@ #include "hw/boards.h" #endif #include "tcg/insn-start-words.h" +#include "tcg/tcg.h" =20 #define TO_SPR(group, number) (((group) << 11) + (number)) =20 @@ -218,7 +219,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, targe= t_ulong rd, { OpenRISCCPU *cpu =3D env_archcpu(env); #ifndef CONFIG_USER_ONLY - uint64_t data[TARGET_INSN_START_WORDS]; + uint64_t data[TARGET_INSN_START_WORDS_MAX]; MachineState *ms =3D MACHINE(qdev_get_machine()); CPUState *cs =3D env_cpu(env); int idx; --=20 2.47.1