From: Xi Ruoyao <xry111@xry111.site>
To: caiyinyu <caiyinyu@loongson.cn>, libc-alpha@sourceware.org
Cc: adhemerval.zanella@linaro.org,
"Chenghua Xu" <xuchenghua@loongson.cn>,
王洪虎 <wanghonghu@loongson.cn>,
lixing@loongson.cn, wuxiaotian@loongson.cn
Subject: Re: [PATCH] LoongArch: Modify some member names in mcontext_t and ucontext_t structs to align them with the kernel.
Date: Mon, 03 Apr 2023 18:12:21 +0800 [thread overview]
Message-ID: <20f7a4ae22c57c2b0f9324e1ac780d353ee0b022.camel@xry111.site> (raw)
In-Reply-To: <f2259f6a-430b-afe8-6f68-54f53c02f8a2@loongson.cn>
On Mon, 2023-04-03 at 17:41 +0800, caiyinyu wrote:
> > Give me several hours trying to make the anonymous union work. 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.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2023-04-03 10:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 6:25 caiyinyu
2023-03-24 7:00 ` Xi Ruoyao
2023-03-24 7:40 ` Xi Ruoyao
2023-03-31 3:52 ` caiyinyu
2023-04-03 2:52 ` caiyinyu
2023-04-03 8:56 ` Xi Ruoyao
2023-04-03 9:18 ` caiyinyu
2023-04-03 9:25 ` Xi Ruoyao
2023-04-03 9:41 ` caiyinyu
2023-04-03 10:12 ` Xi Ruoyao [this message]
2023-04-03 10:45 ` caiyinyu
2023-04-03 12:03 ` caiyinyu
2023-04-03 2:51 caiyinyu
2023-04-03 12:29 ` Adhemerval Zanella Netto
2023-04-03 12:33 ` caiyinyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20f7a4ae22c57c2b0f9324e1ac780d353ee0b022.camel@xry111.site \
--to=xry111@xry111.site \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=libc-alpha@sourceware.org \
--cc=lixing@loongson.cn \
--cc=wanghonghu@loongson.cn \
--cc=wuxiaotian@loongson.cn \
--cc=xuchenghua@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).