From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id A90B33858414 for ; Tue, 2 Apr 2024 03:40:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A90B33858414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A90B33858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712029212; cv=none; b=EoqxCStouJRJQvgUBhHdPx+YUXp+lh2e6oTvMs+jW+QVlm5f5Dk8MkZ2vvgtILkeTrtAbVRrW1Fxiqy/JeX5wx3A0pPolLHwe1dW4iMnadPjcLLYaRshOeH/cZrsxTnW+LhJ68tbNfV8IYGAUFBhV/QWjvO2LbK4p9/tcUP8RoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712029212; c=relaxed/simple; bh=IURNinBd5B15SwVhUuoZMP7KixtxQwBANjPJNZk47O8=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=pjNIDzWnBjTrnC0/s2JzVzswglNtUb3modmb6wWoPwct0UWPM0JwfA39OQSHBcgYedtKW/SjDsXuvh3+Qma7VgkrCuvL8wZIrt04LMN+hN0+GR9KOMU4+I0QwCGalzWA1XeK8RC+xyibTjSIMXZ9KGCop3wtE/IySJgkQFukSfw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.20.4.90]) by gateway (Coremail) with SMTP id _____8DxqegSfgtmNjEiAA--.59290S3; Tue, 02 Apr 2024 11:40:02 +0800 (CST) Received: from [10.20.4.90] (unknown [10.20.4.90]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx3xMQfgtmCmVxAA--.7659S2; Tue, 02 Apr 2024 11:40:01 +0800 (CST) Subject: Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations. To: Florian Weimer Cc: josmyers@redhat.com, libc-alpha@sourceware.org, adhemerval.zanella@linaro.org, xry111@xry111.site References: <20240331101400.474159-1-caiyinyu@loongson.cn> <87le5x1ar2.fsf@oldenburg3.str.redhat.com> From: caiyinyu Message-ID: <393612ff-b4fa-6047-d203-5b23bd96d29a@loongson.cn> Date: Tue, 2 Apr 2024 11:40:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87le5x1ar2.fsf@oldenburg3.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8Bx3xMQfgtmCmVxAA--.7659S2 X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoWxCF1kury5tFWDKr45Zr4xAFc_yoWrKw1xpr yxCr15JFyUGryxJr13Cw1UXFy5Xr4xJw17Xry3tFy8Ar17Jr10qr1IqryjgF1UJ3yfJw1j vr1rJryUu3WUArgCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUv2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02 F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw 1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7Cj xVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r 1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8cz VUUUUUU== X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,BODY_8BITS,GIT_PATCH_0,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 在 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 [1] commit 930993921f2f381b545ea1b1f2d9c534b2b72b08 Author: caiyinyu 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