From patchwork Thu Apr 24 00:49:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883805 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199784wrs; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU4m4wc5QxRoDBTiGJwbGJg2cryUMHkVHbscchJukHZoWFDEiDHuFQAFSxN9ahc70Ul1xpFfw==@linaro.org X-Google-Smtp-Source: AGHT+IFRGDQfLhLKRM2EbhkNRX/vZdMUinHBDu3OryRyuxzJ3gMnmtq42FIC3+zVG6vFGrA79N95 X-Received: by 2002:a05:622a:148a:b0:477:cb1:ab2a with SMTP id d75a77b69052e-47eb2d99c60mr12774731cf.13.1745456345160; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456345; cv=none; d=google.com; s=arc-20240605; b=LoEUnJVoWw8Lj4IJlj6LwCpAMsxiPU1H3fs9HJ0UDh4LLrOdBsgw67U5YddBfs/+dz Q3MFkYQJG1rrOFlZlrotjwCF8ulkOraNjCy3wLqPp8nFKAZ4jCdWl0YFRrSLr86YE4Ds aKxjEh546Yw76qBk69PE2/RM9DOaC42njX443YjwODqnCRnkrpp+PtcK/8pPcQHhAkFL Lz7se2LJKnHDaFNkUTgBgqaF3XLZilEhOHLm5uIDO3gmHByKW6VPwLHAWHqG04XFZB8U VfzWj+DLbgwLELrZIOybla8eeqiehBYrx6GE5C2/GBN3qLc3SrVebIY+WItEYL32SVFx dxIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=NwvOSpu2DrdM6ZODmA2hVWxgMlMSICAWT9lEKKZhM/xBABri0/F9oatovgMmEX39w0 dWuzuk/uvYh0JzGyRWjXYL5/OOjuVScrKtlIK/5vhmYeExoWRsOyU5KeE2KvJSIwMrcK n7goVa9Ls8F8B8oK4bMkPpFgP2Nrad3lz/I6L1wzV7QZhJwDYcHtjnOHjwNTIe0bfZ4T AwRaEyx/FWEs6FyRF8ZU7104dB+QR07xds3zpuhH/xlgeVqyl3K7xnLaQNLWmkxpLm7n I81wG6xXPEt1EPqSDDnFlKka88gzO9i+QwQiw3tk+PX5fUdPKFf/69ydvJIYcQ5Wwzrr 0Trg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=InUymLG5; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f9a254asi5057831cf.201.2025.04.23.17.59.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:05 -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=InUymLG5; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvF-00015F-3M; Wed, 23 Apr 2025 20:58:37 -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 1u7ktk-00067N-5C for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktg-00059W-Iz for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:03 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso354521b3a.2 for ; Wed, 23 Apr 2025 17:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456219; x=1746061019; 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=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; b=InUymLG5wTNXv8vG/b3acKZY/6t716y/oPkGDI+ZuuesJxZJmE9X5ukJFpvtxCjdK6 67904IUNRnUgGpwjBtBUoQU6IDTzdp+hxypiZbyq0Umk6uWLPP49EH9Z3Jr9aQSh10Xf EyOiOgKGsl2hDRCxeKoxYakzRNYfGnRmRrLP2PwYfqKFWF7oTf9M4mcDx5TDjxvmKbG4 rAhDzm1YVgsAaGzwHj8qmc7j8UCCfUtMbEFF2tjSrFY4SBrFr7/Jq0c4sq98sz6AJOLa fuKZhzHjJTN7HaZ1iMsM6JPvsej5hvMDBl4z1HlEkcSFmMhQHYqummNaWXT7uDmbwcEB u3ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456219; x=1746061019; 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=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; b=CFAuoekWhoVNJ+XMixHMb9Ab3iF9fzOnPX0ScXjQjtWitOGL7ZpkOX+sreYy1BTQ5H L3EYluoBmOIzEVew7iJlhWKYJqLpe+noQagCvegirKkI886mh1kKAwyZdFTrKyx0lJgp +LqfialQGgPzYhBVWCjA+pZRp/Bd9PoHZ56Zdv5R60x6J/F49ZaMRJ0JnVrLbJ8AkqSP 2gdIDsDtCXk0Jtdq0QzhqfHLtjLPvbL/rIdEeLt4i4iWlwIRkuCxxrL/W0Lzj6mnH2ro 0Q4qD0bZSwZzzF1LHLN/P9vqPg7GDTIeGpc3BbGUspqowABYeORuKWadPVC1U3dALKpZ ZgyQ== X-Gm-Message-State: AOJu0YwCYYF0RVmle3NtHdFv9YaMeXZKRah6WiZJ7XdQWYnRoz10ZbWC H4g2kjRuA/Zm4iolNaCmOGQMd+kXhEVpyj9W91CGPmIxprOqjnoQm36whaxYUHA31z7ZZRcHF9A x X-Gm-Gg: ASbGncv8o0CbizzSBhkWl35C+I5yXJAsTONGi7uJbEqrl1wWmNAicpP7/vF9w4bVth0 07BB4bApGBSZrjmuZjiPr3DDG6mjw9IBlpTaT0ZkZRGGfktW9Yq9qY9LvBr1DVIwYif3kWTSXUN jdGHSC1rvub2XzlkpMRZELl+PYfxM+cpEaQLR4kDMys8wBFhmx7TdBvV+1CN8vRJwFtF/+NER4I Q3Y/ZHWj2VNt45job52dKHr5nT3Kh9puW2wm/vQUqr3TjVJA3Hm59/n0ZxzP5pLzdMqjP0BUIcT AoS+u3xa7ReWvWgvGgrDBVlVJmD7dYsL0iqQA5JDKhHHB4kBXdCTxwYXRw4M4Q3tH6/blWYdYdv bW/r/WNdX9Q== X-Received: by 2002:a05:6a20:2d28:b0:1f5:6e71:e45 with SMTP id adf61e73a8af0-20444f276d6mr971621637.27.1745456218906; Wed, 23 Apr 2025 17:56:58 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 116/148] target/arm/cpu: flags2 is always uint64_t Date: Wed, 23 Apr 2025 17:49:01 -0700 Message-ID: <20250424004934.598783-117-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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 From: Pierrick Bouvier Do not rely on target dependent type, but use a fixed type instead. Since the original type is unsigned, it is safe to extend its size without any side effect. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-21-pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 10 ++++------ target/arm/tcg/hflags.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index ab7412772b..cc975175c6 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -194,7 +194,7 @@ typedef struct ARMPACKey { /* See the commentary above the TBFLAG field definitions. */ typedef struct CPUARMTBFlags { uint32_t flags; - target_ulong flags2; + uint64_t flags2; } CPUARMTBFlags; typedef struct ARMMMUFaultInfo ARMMMUFaultInfo; @@ -2968,11 +2968,9 @@ uint64_t arm_sctlr(CPUARMState *env, int el); * We collect these two parts in CPUARMTBFlags where they are named * flags and flags2 respectively. * - * The flags that are shared between all execution modes, TBFLAG_ANY, - * are stored in flags. The flags that are specific to a given mode - * are stores in flags2. Since cs_base is sized on the configured - * address size, flags2 always has 64-bits for A64, and a minimum of - * 32-bits for A32 and M32. + * The flags that are shared between all execution modes, TBFLAG_ANY, are stored + * in flags. The flags that are specific to a given mode are stored in flags2. + * flags2 always has 64-bits, even though only 32-bits are used for A32 and M32. * * The bits for 32-bit A-profile and M-profile partially overlap: * diff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c index 8d79b8b7ae..e51d9f7b15 100644 --- a/target/arm/tcg/hflags.c +++ b/target/arm/tcg/hflags.c @@ -506,8 +506,8 @@ void assert_hflags_rebuild_correctly(CPUARMState *env) if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) { fprintf(stderr, "TCG hflags mismatch " - "(current:(0x%08x,0x" TARGET_FMT_lx ")" - " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n", + "(current:(0x%08x,0x%016" PRIx64 ")" + " rebuilt:(0x%08x,0x%016" PRIx64 ")\n", c.flags, c.flags2, r.flags, r.flags2); abort(); }