From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 169933858C5E for ; Mon, 3 Apr 2023 10:12:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 169933858C5E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1680516745; bh=+gGEJsMuMr62TDddTfqScEUQcaIg3jj6QyVl/VjN2c0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=hAJEt2ungBdOImj3uOQke9bQ4NuyhEib1/zS6oEs2TQCfJWPee/xoAQ2z9DYkqGwY cLCkDQCJN4vIecgrQQ7SwPbsdKZiPHlVz8yO5mg9W90uQYZFXOulKnLRMvmG9A0dsa aCFYwQk5qx19Pjmny1eK7X/XRhjm3VDL8XBqaNb8= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id AB00D663BD; Mon, 3 Apr 2023 06:12:23 -0400 (EDT) Message-ID: <20f7a4ae22c57c2b0f9324e1ac780d353ee0b022.camel@xry111.site> Subject: Re: [PATCH] LoongArch: Modify some member names in mcontext_t and ucontext_t structs to align them with the kernel. From: Xi Ruoyao To: caiyinyu , libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Chenghua Xu , =?gb2312?Q?=CD=F5=BA=E9=BB=A2?= , lixing@loongson.cn, wuxiaotian@loongson.cn Date: Mon, 03 Apr 2023 18:12:21 +0800 In-Reply-To: References: <20230324062510.1812367-1-caiyinyu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2023-04-03 at 17:41 +0800, caiyinyu wrote: > > Give me several hours trying to make the anonymous union work.=C2=A0 I = see > > similar things in other ports' mcontext_t definition so I guess I can > > make it work... I tried this (w/o __extension__: anyway we are already using "zero- length array" which is an extension, and -pedantic should not send alarm for system headers): typedef struct mcontext_t { union { struct { unsigned long long __ctx(sc_pc); unsigned long long __ctx(sc_regs)[32]; unsigned int __ctx(sc_flags); unsigned long long __ctx(sc_extcontext)[0] __attribute__((__aligned__(16= ))); }; struct { unsigned long long __pc; unsigned long long __gregs[32]; unsigned int __flags; unsigned long long __extcontext[0] __attribute__((__aligned__(16))); }; }; } mcontext_t; There is no conformance test failing. Can you try this? If there is still conformance test failing please send me the error message so I can know why it fails. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University