public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] soft-fp: Rename trunchfbf2.c to extendhfbf2.c
@ 2024-05-01 17:44 H.J. Lu
  2024-05-01 17:57 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2024-05-01 17:44 UTC (permalink / raw)
  To: libc-alpha

Since bfloat16 has the same range as float32, bfloat16 to _Float16
conversion is an extension, not a truncation.  Rename trunchfbf2.c
to extendhfbf2.c to provide __extendhfbf2, instead of __trunchfbf2.
This fixes BZ #31690.
---
 soft-fp/{trunchfbf2.c => extendhfbf2.c} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename soft-fp/{trunchfbf2.c => extendhfbf2.c} (96%)

diff --git a/soft-fp/trunchfbf2.c b/soft-fp/extendhfbf2.c
similarity index 96%
rename from soft-fp/trunchfbf2.c
rename to soft-fp/extendhfbf2.c
index ad5fbbd654..3443948da3 100644
--- a/soft-fp/trunchfbf2.c
+++ b/soft-fp/extendhfbf2.c
@@ -1,5 +1,5 @@
 /* Software floating-point emulation.
-   Truncate IEEE half into bfloat16.
+   Extend IEEE half into bfloat16.
    Copyright (C) 2022-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -36,7 +36,7 @@
    truncate to BFtype.  */
 
 BFtype
-__trunchfbf2 (HFtype a)
+__extendhfbf2 (HFtype a)
 {
   FP_DECL_EX;
   FP_DECL_H (A);
-- 
2.44.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] soft-fp: Rename trunchfbf2.c to extendhfbf2.c
  2024-05-01 17:44 [PATCH] soft-fp: Rename trunchfbf2.c to extendhfbf2.c H.J. Lu
@ 2024-05-01 17:57 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2024-05-01 17:57 UTC (permalink / raw)
  To: libc-alpha

On Wed, May 1, 2024 at 10:44 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Since bfloat16 has the same range as float32, bfloat16 to _Float16
                                                                  This
should be _Float16 to bfloat16

Fixed in the v2 patch:

https://patchwork.sourceware.org/project/glibc/list/?series=33346

> conversion is an extension, not a truncation.  Rename trunchfbf2.c
> to extendhfbf2.c to provide __extendhfbf2, instead of __trunchfbf2.
> This fixes BZ #31690.
> ---
>  soft-fp/{trunchfbf2.c => extendhfbf2.c} | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>  rename soft-fp/{trunchfbf2.c => extendhfbf2.c} (96%)
>
> diff --git a/soft-fp/trunchfbf2.c b/soft-fp/extendhfbf2.c
> similarity index 96%
> rename from soft-fp/trunchfbf2.c
> rename to soft-fp/extendhfbf2.c
> index ad5fbbd654..3443948da3 100644
> --- a/soft-fp/trunchfbf2.c
> +++ b/soft-fp/extendhfbf2.c
> @@ -1,5 +1,5 @@
>  /* Software floating-point emulation.
> -   Truncate IEEE half into bfloat16.
> +   Extend IEEE half into bfloat16.
>     Copyright (C) 2022-2024 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>
> @@ -36,7 +36,7 @@
>     truncate to BFtype.  */
>
>  BFtype
> -__trunchfbf2 (HFtype a)
> +__extendhfbf2 (HFtype a)
>  {
>    FP_DECL_EX;
>    FP_DECL_H (A);
> --
> 2.44.0
>


-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-01 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 17:44 [PATCH] soft-fp: Rename trunchfbf2.c to extendhfbf2.c H.J. Lu
2024-05-01 17:57 ` H.J. Lu

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).