From nobody Sun Sep 28 16:30: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=1756383120; cv=none; d=zohomail.com; s=zohoarc; b=ZsTBL/6OH6uo+gJcOG1Exuh7WuJGY/dAakeTwuGuAuSAtvQvRSTUON4H9flIbkBa/+HLgV6VakGbr7WatmEAQdOFeKTcKjX6fZxpToqZJun+foPheDhMDzXp9p3rmvN32PkDAG04cvE4Xo7KSdtNRW3d0vowv2onx9XEiPpndEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756383120; h=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=d1p9ZZX2L4dPqSAnciIvd5Ttg4kPY8+u2dEvBtnDYjk=; b=ILGoUMkMxVYA4xqBsmfbX7eVLuSt9jnL3MiuhXKFT3cUALNd17nO7I2LoAI/pI0IUvoM+/JFnPxdWKP3zNNLFUNM2JOSgE4tgPvVe0+Qm7MhbA3FjF8q2MxsGoSYpJXvYbIE60KsmuJISo13LaH9FX1Wga73QIjdA0YQA9o50xk= 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 1756383120970116.70063501639913; Thu, 28 Aug 2025 05:12:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1urbR4-00026H-C5; Thu, 28 Aug 2025 08:08:58 -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 1urbR1-00025M-DQ for qemu-devel@nongnu.org; Thu, 28 Aug 2025 08:08:55 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1urbQz-00078e-Rx for qemu-devel@nongnu.org; Thu, 28 Aug 2025 08:08:55 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-771fa65b0e1so470117b3a.0 for ; Thu, 28 Aug 2025 05:08:53 -0700 (PDT) Received: from stoup.. ([144.6.121.55]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b49cb8b4b98sm13933222a12.19.2025.08.28.05.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Aug 2025 05:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756382932; x=1756987732; 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=d1p9ZZX2L4dPqSAnciIvd5Ttg4kPY8+u2dEvBtnDYjk=; b=r/R14EADdYHgEsbJXilUD3DxCmVf00dX3zPnfrMlwb1Qa9tIKVx+G5Pij0L0ysKSvX yJ7Ys7OuInJJhsBo1nuhi1qO8seGXehERsNTrNPu2S4WtUPnpke0V7CRPwMZG+uUZVWQ FLGyDFvr9d7GM/EtNku7FgxHVMEh3dZbvUe0TPAOfoMb70xs2eM57LIo592nC5NqzWbA tjfxWqj5lNgohc3G6gNhIxRbZPlVBI2qZFEuAj5H4qTJ6gHW5vz8H2TUvhqtSKuyHHDW tF5IpFscHIxmaPS0W8K3v6CgLu1y3p2im0BrFMhu8X00bEzgw3dQjbYS3SrDYd0gPVU0 R/vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756382932; x=1756987732; 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=d1p9ZZX2L4dPqSAnciIvd5Ttg4kPY8+u2dEvBtnDYjk=; b=S1ysb9ExjfDSWThUtBsepywGoXvdmSD7aksyZU1Syes1iiY3Pjy+ofEZGu1gbI0IpX kWYKqtn7TThrD3hmjlQOcYXGk6n0jTN24Fyv+jEu3Ojxx3XP4OqISzSA17PArGNAZ8cb l+PtZhLLjln6GWoYaxulqM4BVRU5S7xjjOHKRgIRSATDK2VAvoEYUiBkZ+SJtTck+zZs ISUf1Jf9xoHJ9NQymyTCZj9apFy/4Lr7d2zLOm69nCoR+PwFxlNh2BmMKi2Dyo9RNlg3 gnQlSTLWnsYDX2Pyz88mI3Fbelh7Hu9f5fEdHnpQr0zWMyhIoczQ3hJLeeovkzHZF668 EM1g== X-Gm-Message-State: AOJu0YwwJpszlnZm5Fe0GxPpld8eUOchGeSbyfzXg2+V1e0LzAyHWtql tVskioze/OeG/pqmPWSh0rjMV7X70GwSUUKd1DyYzbk4FEHHafjXFVIWx83P3hwyayfEkPounpL nh36QzJI= X-Gm-Gg: ASbGncug6QAGVcbN8bjDDYBJaTbjVPaDvSY4P03WVuXStew0oQOCb5Iq6S6mK27zveE 4Yok6ToAfVSvdN2Y6J9l/vVJTgiXa0liH7Bm3n4u5uqbMTgezucOOw4iLUfVSjtyQxmR6pkbF0n N3wenl8mdaPHpNFKxFK13/ZZ7HTLFd7DuilvhtGjIr4hgO5PbM4ruZERZpNBFdrLOSRBMGCt0ic Lp/mquWbb0FeJF0nd99lSZ5nv8yd1i+Jp5r+QZt0YFEXGTNXwlEjgihSqjZrZiT9utWUyFZ9Ngh t8tKqqnJG+Oy8H9v8PhSleBott+p6K4gUok19h4g+6nbL7PukdHPElIf7Gb/JnFP9Hit4ViLeTL n4DCG4PxKBI0WHJN6IcqQ7Oeu1w== X-Google-Smtp-Source: AGHT+IHFFHjx+C55KJuRdYBIHtFG5cyaA9gpC4S9p02Sv4UjfZmxOyEKd1X7Fk5Si2aShu67XSiDlA== X-Received: by 2002:a05:6a20:3d12:b0:243:7cff:6251 with SMTP id adf61e73a8af0-2437cff65ccmr19817741637.26.1756382932365; Thu, 28 Aug 2025 05:08:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PATCH v3 04/87] linux-user/aarch64: Convert target_elf_gregset_t to a struct Date: Thu, 28 Aug 2025 22:07:13 +1000 Message-ID: <20250828120836.195358-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828120836.195358-1-richard.henderson@linaro.org> References: <20250828120836.195358-1-richard.henderson@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: 1756383122352116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- linux-user/elfload.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 0180f6063f..da57c6c2ce 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -384,18 +384,17 @@ static const VdsoImageInfo *vdso_image_info(uint32_t = elf_flags) #define ELF_CLASS ELFCLASS64 =20 #define ELF_NREG 34 -typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG]; +typedef struct target_elf_gregset_t { + target_elf_greg_t regs[ELF_NREG]; +} target_elf_gregset_t; =20 -static void elf_core_copy_regs(target_elf_gregset_t *regs, - const CPUARMState *env) +static void elf_core_copy_regs(target_elf_gregset_t *r, const CPUARMState = *env) { - int i; - - for (i =3D 0; i < 32; i++) { - (*regs)[i] =3D tswapreg(env->xregs[i]); + for (int i =3D 0; i < 32; i++) { + r->regs[i] =3D tswapreg(env->xregs[i]); } - (*regs)[32] =3D tswapreg(env->pc); - (*regs)[33] =3D tswapreg(pstate_read((CPUARMState *)env)); + r->regs[32] =3D tswapreg(env->pc); + r->regs[33] =3D tswapreg(pstate_read((CPUARMState *)env)); } =20 #define USE_ELF_CORE_DUMP --=20 2.43.0