new file mode 100644
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+/* { dg-add-options bfloat16 } */
+/* { dg-require-effective-target bfloat16_runtime } */
+
+__bf16 bfa, bfb, bfc, bfd, bfe, bff;
+_Float16 f16a, f16b;
+float f32a, f32b;
+double da, db;
+
+int
+main (void)
+{
+ bfa = f16a;
+ f16b = bfb;
+ bfc = f32a;
+ f32b = bfd;
+ bfe = da;
+ db = bff;
+ return 0;
+}
new file mode 100644
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+/* { dg-add-options bfloat16 } */
+/* { dg-add-options __float128 } */
+/* { dg-require-effective-target bfloat16_runtime } */
+/* { dg-require-effective-target __float128 } */
+
+__bf16 bfa, bfb;
+__float128 fa, fb;
+
+int
+main (void)
+{
+ bfa = fa;
+ fb = bfb;
+ return 0;
+}
@@ -30,6 +30,7 @@ GCC_11.0 {
%inherit GCC_13.0.0 GCC_11.0.0
GCC_13.0.0 {
__extendbfsf2
+ __extendhfbf2
__floatdibf
__floattibf
__floatundibf
@@ -37,7 +38,6 @@ GCC_13.0.0 {
__truncdfbf2
__truncsfbf2
__trunctfbf2
- __trunchfbf2
}
%inherit GCC_14.0.0 GCC_13.0.0
@@ -1,7 +1,7 @@
softfp_float_modes := tf
softfp_int_modes := si di ti
-softfp_extensions := sftf dftf hftf bfsf
-softfp_truncations := tfsf tfdf tfhf tfbf dfbf sfbf hfbf
+softfp_extensions := sftf dftf hftf bfsf hfbf
+softfp_truncations := tfsf tfdf tfhf tfbf dfbf sfbf
softfp_exclude_libgcc2 := n
softfp_extras += fixhfti fixunshfti floattihf floatuntihf \
floatdibf floatundibf floattibf floatuntibf \
@@ -29,13 +29,13 @@ GCC_12.0.0 {
GCC_14.0.0 {
# Added to GCC_13.0.0 in i386/libgcc-glibc.ver.
__extendbfsf2
+ __extendhfbf2
__floattibf
__floatuntibf
__truncdfbf2
__truncsfbf2
__trunctfbf2
__truncxfbf2
- __trunchfbf2
# Added to GCC_14.0.0 in i386/libgcc-glibc.ver.
__fixxfbitint
__fixtfbitint
@@ -218,13 +218,13 @@ GCC_12.0.0 {
%inherit GCC_13.0.0 GCC_12.0.0
GCC_13.0.0 {
__extendbfsf2
+ __extendhfbf2
__floattibf
__floatuntibf
__truncdfbf2
__truncsfbf2
__trunctfbf2
__truncxfbf2
- __trunchfbf2
}
%inherit GCC_14.0.0 GCC_13.0.0
@@ -136,13 +136,13 @@ GCC_14.0.0 {
__truncxfhf2
# Added to GCC_13.0.0 in i386/libgcc-glibc.ver.
__extendbfsf2
+ __extendhfbf2
__floattibf
__floatuntibf
__truncdfbf2
__truncsfbf2
__trunctfbf2
__truncxfbf2
- __trunchfbf2
# Added to GCC_14.0.0 in i386/libgcc-glibc.ver.
__fixxfbitint
__fixtfbitint
@@ -6,9 +6,9 @@ LIB2FUNCS_EXCLUDE += $(libgcc2-hf-functions)
libgcc2-hf-extras = $(addsuffix .c, $(libgcc2-hf-functions))
LIB2ADD += $(addprefix $(srcdir)/config/i386/, $(libgcc2-hf-extras))
-softfp_extensions := hfsf hfdf hftf hfxf sfdf sftf dftf xftf bfsf
+softfp_extensions := hfsf hfdf hftf hfxf sfdf sftf dftf xftf bfsf hfbf
softfp_truncations := tfhf xfhf dfhf sfhf tfsf dfsf tfdf tfxf \
- tfbf xfbf dfbf sfbf hfbf
+ tfbf xfbf dfbf sfbf
softfp_extras += eqhf2 fixxfbitint $(foreach m,hf bf xf,floatbitint$(m))
@@ -17,6 +17,7 @@ CFLAGS-extendhfdf2.c += -msse2
CFLAGS-extendhftf2.c += -msse2
CFLAGS-extendhfxf2.c += -msse2
CFLAGS-extendbfsf2.c += -msse2
+CFLAGS-extendhfbf2.c += -msse2
CFLAGS-truncsfhf2.c += -msse2
CFLAGS-truncdfhf2.c += -msse2
@@ -26,7 +27,6 @@ CFLAGS-truncsfbf2.c += -msse2
CFLAGS-truncdfbf2.c += -msse2
CFLAGS-truncxfbf2.c += -msse2
CFLAGS-trunctfbf2.c += -msse2
-CFLAGS-trunchfbf2.c += -msse2
CFLAGS-floatbitintbf.c += -msse2
CFLAGS-floatbitinthf.c += -msse2
similarity index 94%
rename from libgcc/soft-fp/trunchfbf2.c
rename to libgcc/soft-fp/extendhfbf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
- Truncate IEEE half into bfloat16.
- Copyright (C) 2022 Free Software Foundation, Inc.
+ Extend IEEE half into bfloat16.
+ Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
truncate to BFtype. */
BFtype
-__trunchfbf2 (HFtype a)
+__extendhfbf2 (HFtype a)
{
FP_DECL_EX;
FP_DECL_H (A);