soft-fp: Rename trunchfbf2.c to extendhfbf2.c
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
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%)
Comments
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
>
similarity index 96%
rename from soft-fp/trunchfbf2.c
rename to 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);