public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: caiyinyu <caiyinyu@loongson.cn>
To: Florian Weimer <fweimer@redhat.com>
Cc: josmyers@redhat.com, libc-alpha@sourceware.org,
	adhemerval.zanella@linaro.org, xry111@xry111.site
Subject: Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
Date: Tue, 2 Apr 2024 11:40:00 +0800	[thread overview]
Message-ID: <393612ff-b4fa-6047-d203-5b23bd96d29a@loongson.cn> (raw)
In-Reply-To: <87le5x1ar2.fsf@oldenburg3.str.redhat.com>


在 2024/4/1 下午9:19, Florian Weimer 写道:
>> This patch accomplishes the following:
>> 1. Implements soft floating-point functions to enhance compatibility and
>>    flexibility in environments without hardware floating-point support.
>> 2. Refactors macro definitions by moving them from `fenv_libc.h` to
>>    `fpu_control.h`. This change not only simplifies the codebase but also
>>    eliminates the need for the unexported header file `fenv_libc.h`,
>>    streamlining the inclusion of floating-point utilities across different
>>    modules.
> This patch appears to add a new ABI.  The commit message doesn't mention
> this, and it probably needs a NEWS update, too.
>
> The new ABI is backdated to glibc 2.36.  For new ABIs, we would expect a
> glibc 2.40 baseline, but this is not a hard technical requirement.


The LoongArch soft ABI was added to glibc in version 2.37[1], but it was 
not fully implemented,
lacking functions for handling soft float exceptions/rounding modes. 
This patch fills in
the missing functions and fixes related failed test cases.
Therefore, would backporting this patch to 2.37 be sufficient?

I will update the NEWS (if necessary) and
the commit message of this patch in the v3 version of the patch as follows:

diff --git a/NEWS b/NEWS
index da4b2223e9..b64607ff57 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,11 @@ Major new features:
    more extensive verification tests for AT_SECURE programs and not 
meant to
    be a security feature.

+* Added missing functions for handling soft float exceptions/rounding modes
+  in the LoongArch soft ABI. The LoongArch soft ABI was introduced in 
version
+  2.37 of glibc, but it did not include comprehensive support for soft 
float
+  exceptions/rounding modes.
+
  Deprecated and removed features, and other changes affecting 
compatibility:

    [Add deprecations, removals and changes affecting compatibility here]


commit info:

     LoongArch: Add soft floating-point fe* function implementations.

     This patch accomplishes the following:
     1. Implements soft floating-point functions to enhance 
compatibility and
       flexibility in environments without hardware floating-point support.
     2. Refactors macro definitions by moving them from `fenv_libc.h` to
       `fpu_control.h`. This change not only simplifies the codebase but 
also
       eliminates the need for the unexported header file `fenv_libc.h`,
       streamlining the inclusion of floating-point utilities across 
different
       modules.

     The LoongArch soft ABI was introduced in version 2.37 of glibc, but 
it did
     not include comprehensive support for soft float 
exceptions/rounding modes.
     This commit added missing functions for handling soft float 
exceptions/rounding
     modes in the LoongArch soft ABI and fixes related failed test cases.

     Signed-off-by: caiyinyu <caiyinyu@loongson.cn>

[1]
commit 930993921f2f381b545ea1b1f2d9c534b2b72b08
Author: caiyinyu <caiyinyu@loongson.cn>
Date:   Mon Aug 22 16:00:51 2022 +0800

     LoongArch: Add soft float support.


  scripts/build-many-glibcs.py                      |  4 ++++
  sysdeps/loongarch/Makefile                        |  8 --------
  sysdeps/loongarch/__longjmp.S                     |  2 ++
  sysdeps/loongarch/bits/setjmp.h                   |  3 +++
  sysdeps/loongarch/dl-trampoline.S                 | 11 +++++++++--
  sysdeps/loongarch/fpu_control.h                   | 13 +++++++++++++
  sysdeps/loongarch/nofpu/Implies                   |  1 +
  sysdeps/loongarch/nofpu/math-tests-exceptions.h   | 28 
++++++++++++++++++++++++++++
  sysdeps/loongarch/nofpu/math-tests-rounding.h     | 27 
+++++++++++++++++++++++++++
  sysdeps/loongarch/preconfigure                    |  1 -
  sysdeps/loongarch/preconfigure.ac                 |  1 -
  sysdeps/loongarch/setjmp.S                        |  2 ++
  sysdeps/unix/sysv/linux/loongarch/Makefile        |  9 +++++++++
  sysdeps/unix/sysv/linux/loongarch/configure       | 51 
++++++++++++++++++++++++++++++++++++++++++++++++---
  sysdeps/unix/sysv/linux/loongarch/configure.ac    | 22 
+++++++++++++++++++---
  sysdeps/unix/sysv/linux/loongarch/ldd-rewrite.sed |  2 +-
  sysdeps/unix/sysv/linux/loongarch/shlib-versions  |  2 ++

> Thanks,
> Florian


  reply	other threads:[~2024-04-02  3:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 12:46 caiyinyu
2024-03-26 17:34 ` Joseph Myers
2024-03-27  8:42   ` caiyinyu
2024-03-27 17:10     ` Joseph Myers
2024-03-31 10:14       ` caiyinyu
2024-04-01 13:19         ` Florian Weimer
2024-04-02  3:40           ` caiyinyu [this message]
2024-04-02 10:40             ` Xi Ruoyao
2024-04-02 11:45               ` Florian Weimer
2024-04-02 12:02                 ` Xi Ruoyao
2024-04-02 12:34                   ` Florian Weimer
2024-04-02 12:12               ` Andreas Schwab
2024-04-02 21:18             ` Joseph Myers
2024-03-31 10:31       ` caiyinyu
2024-04-02 21:10         ` Joseph Myers
2024-04-02 14:46 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=393612ff-b4fa-6047-d203-5b23bd96d29a@loongson.cn \
    --to=caiyinyu@loongson.cn \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=josmyers@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /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).