From: "alice" <alice@ayaya.dev>
To: <musl@lists.openwall.com>
Subject: Re: [musl] add loongarch64 port v7.
Date: Tue, 15 Aug 2023 09:32:52 +0000 [thread overview]
Message-ID: <CUT0JKSDQ452.288XGLOHO41ZF@cq14> (raw)
In-Reply-To: <278c595b-10fb-2180-b634-6bbcbd5a2614@loongson.cn>
On Tue Aug 15, 2023 at 9:24 AM UTC, Hongliang Wang wrote:
>
> > In fenv.S:
> >
> >> ++#ifdef __clang__
> >> ++#define FCSR $fcsr0
> >> ++#else
> >> ++#define FCSR $r0
> >> ++#endif
> >
> > It's not clear to me what's going on here. Is there a clang
> > incompatibility in the assembler language you're working around? Or
> > what? If so that seems like a tooling bug that should be fixed.
> >
> The GNU assembler cannot correctly recognize $fcsr0, but the
> LLVM IAS does not have this issue, so make a distinction.
> This issue has been fixed in GNU assembler 2.41. but for compatible
> with GNU assembler 2.40 and below, $r0 need reserved.
>
> The linux kernel also has a similar distinction:
the kernel patch checks if the assembler supports fcsr, and then uses that, or
falls back to r.
in this case, you only check for ifdef clang- which means even with binutils
2.41, it will not use fcsr (__clang__ is not defined). don't you need to perform
a similar test, so clang or binutils>=2.41 both use the top path? most likely,
you need a ./configure test.
>
> commit 38bb46f94544c5385bc35aa2bfc776dcf53a7b5d
> Author: WANG Xuerui <git@xen0n.name>
> Date: Thu Jun 29 20:58:43 2023 +0800
>
> LoongArch: Prepare for assemblers with proper FCSR class support
>
> The GNU assembler (as of 2.40) mis-treats FCSR operands as GPRs, but
> the LLVM IAS does not. Probe for this and refer to FCSRs as"$fcsrNN"
> if support is present.
>
> Signed-off-by: WANG Xuerui <git@xen0n.name>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
>
next prev parent reply other threads:[~2023-08-15 9:33 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 1:28 王洪亮
2023-04-18 9:38 ` Szabolcs Nagy
2023-04-18 10:47 ` Szabolcs Nagy
2023-04-18 11:32 ` 王洪亮
2023-05-10 3:36 ` 王洪亮
2023-06-01 12:44 ` wanghongliang
2023-06-25 3:43 ` Hongliang Wang
2023-07-19 6:55 ` Hongliang Wang
2023-08-05 6:18 ` 翟小娟
2023-08-05 15:43 ` Rich Felker
2023-08-13 1:41 ` Rich Felker
2023-08-15 9:24 ` Hongliang Wang
2023-08-15 9:32 ` alice [this message]
2023-08-25 9:27 ` 翟小娟
[not found] ` <99d954ca-faee-2cac-97af-7fc2ecdb9a89@loongson.cn>
2023-09-20 7:45 ` Jianmin Lv
2023-09-20 13:16 ` Szabolcs Nagy
2023-09-22 1:37 ` Hongliang Wang
2023-09-26 3:28 ` [musl] add loongarch64 port v8 Hongliang Wang
2023-10-08 3:05 ` 花静云
2023-11-09 13:15 ` Jingyun Hua
2023-11-14 13:16 ` Jingyun Hua
2023-11-16 2:54 ` [musl] add loongarch64 port v9 Hongliang Wang
2023-11-16 16:10 ` Rich Felker
2023-11-17 7:20 ` Hongliang Wang
2023-11-17 17:25 ` Rich Felker
2023-11-18 4:19 ` Jingyun Hua
2023-11-20 6:11 ` Hongliang Wang
2023-12-08 8:23 ` [musl] Re:[musl] add loongarch64 port v8 Hongliang Wang
2023-12-18 7:44 ` Jingyun Hua
2024-01-29 1:26 ` [musl] " Hongliang Wang
2024-01-29 3:14 ` Rich Felker
2024-01-29 7:37 ` Hongliang Wang
2023-11-16 16:44 ` [musl] add loongarch64 port v9 Szabolcs Nagy
2023-11-16 17:18 ` Szabolcs Nagy
2023-11-17 7:19 ` Hongliang Wang
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=CUT0JKSDQ452.288XGLOHO41ZF@cq14 \
--to=alice@ayaya.dev \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).