|
|
Message-ID: <20260311040740.GD1827@brightrain.aerifal.cx>
Date: Wed, 11 Mar 2026 00:07:40 -0400
From: Rich Felker <dalias@...c.org>
To: Xing Li <lixing@...ngson.cn>
Cc: musl@...ts.openwall.com, wanghongliang@...ngson.cn
Subject: Re: [PATCH] loongarch64: Add lsx and lasx regset definition
On Tue, Sep 10, 2024 at 09:17:57AM +0800, Xing Li wrote:
> Fix the upstream binutils-gdb building error caused by
> the lack of lsx and lasx regset definition.
> ---
> arch/loongarch64/bits/user.h | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/loongarch64/bits/user.h b/arch/loongarch64/bits/user.h
> index fd9b7b22..10e1be45 100644
> --- a/arch/loongarch64/bits/user.h
> +++ b/arch/loongarch64/bits/user.h
> @@ -22,3 +22,15 @@ typedef union {
> float f;
> } elf_fpreg_t;
> typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
> +
> +typedef union
> +{
> + double d[2];
> + float f[4];
> +} elf_lsxregset_t[32] __attribute__((__aligned__(16)));
> +
> +typedef union
> +{
> + double d[4];
> + float f[8];
> +} elf_lasxregset_t[32] __attribute__((__aligned__(32)));
> --
> 2.27.0
I don't like having the alignment directive bound to the whole type
like this where it's depending on weird GNUC-isms that can't be
represented in standard C alignas, but I think it's ok for now and we
can find a better way to express it later if needed. I know this is
another patch that distros have been carrying for a long time so I'd
like to merge it for release.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.