From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id A02E23858D28 for ; Fri, 24 Mar 2023 07:42:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A02E23858D28 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=1679643754; bh=2iEFuDwy2xCwET2KxWOKqqu1UITaLDOMVRMymzz6vM4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=BVFNXt8R8x0ZvFxaFJpNfQrTWFqK5l/Qg9WG8OiEcScSdhXteeFdpioaq6W8ZqRHp fUakw0nrAAV3nWK4n+eWMjl4HmEghgTsbEVwj7avIh1lBSasQpn7u/SWWnMftcdIC/ C5cZW9nhmL36quizKOXcRDWQ7hpSbc7CGpwffRsM= Received: from [IPv6:240e:358:118d:1500:dc73:854d:832e:4] (unknown [IPv6:240e:358:118d:1500:dc73:854d:832e:4]) (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 6F3E065ADE; Fri, 24 Mar 2023 03:42:26 -0400 (EDT) Message-ID: 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 Date: Fri, 24 Mar 2023 15:40:58 +0800 In-Reply-To: <20230324062510.1812367-1-caiyinyu@loongson.cn> 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.7 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 Fri, 2023-03-24 at 14:25 +0800, caiyinyu wrote: > =C2=A0typedef struct mcontext_t > =C2=A0{ > -=C2=A0 unsigned long long __pc; > -=C2=A0 unsigned long long __gregs[32]; > -=C2=A0 unsigned int __flags; > -=C2=A0 unsigned long long __extcontext[0] __attribute__((__aligned__(16)= )); > +=C2=A0 unsigned long long __ctx(sc_pc); > +=C2=A0 unsigned long long __ctx(sc_regs)[32]; > +=C2=A0 unsigned int __ctx(sc_flags); > +=C2=A0 unsigned long long __ctx(sc_extcontext)[0] __attribute__((__align= ed__(16))); > =C2=A0} mcontext_t; How about this? __extension__ typedef struct mcontext_t { union { /* Backward compatibility names. */ struct { unsigned long long __pc; unsigned long long __gregs[32]; unsigned int __flags; unsigned long long __extcontext[0] __attribute__((__aligned__(16))); }; 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))= ); }; }; } mcontext_t; --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University