From dae7c5a44424e8a2ff136085b07a852fc578e24e Mon Sep 17 00:00:00 2001 From: Felix Willgerodt Date: Thu, 10 Sep 2020 14:29:51 +0200 Subject: [PATCH] Sync include, libiberty with GCC. include: 2020-09-10 Felix Willgerodt Sync with GCC 2020-08-17 Felix Willgerodt * floatformat.h (floatformat_bfloat16_big): New. (floatformat_bfloat16_little): New. libiberty: 2020-09-10 Felix Willgerodt Sync with GCC 2020-08-17 Felix Willgerodt * floatformat.c (floatformat_bfloat16_big): New. (floatformat_bfloat16_little): New. --- include/ChangeLog | 8 ++++++++ include/floatformat.h | 3 +++ libiberty/ChangeLog | 8 ++++++++ libiberty/floatformat.c | 19 ++++++++++++++++++- 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/include/ChangeLog b/include/ChangeLog index c9d2749d34..c8a90cfa36 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2020-09-11 Felix Willgerodt + + Sync with GCC + 2020-09-08 Felix Willgerodt + + * floatformat.h (floatformat_bfloat16_big): New. + (floatformat_bfloat16_little): New. + 2020-09-12 Cooper Qu * opcode/csky.h (CSKYV1_ISA_E1): Convert to bfd_uint64_t type. diff --git a/include/floatformat.h b/include/floatformat.h index ce8d6d4add..630fade044 100644 --- a/include/floatformat.h +++ b/include/floatformat.h @@ -133,6 +133,9 @@ extern const struct floatformat floatformat_ia64_quad_little; /* IBM long double (double+double). */ extern const struct floatformat floatformat_ibm_long_double_big; extern const struct floatformat floatformat_ibm_long_double_little; +/* bfloat16. */ +extern const struct floatformat floatformat_bfloat16_big; +extern const struct floatformat floatformat_bfloat16_little; /* Convert from FMT to a double. FROM is the address of the extended float. diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 6b46642fd3..e6280d576b 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,11 @@ +2020-09-11 Felix Willgerodt + + Sync with GCC + 2020-09-08 Felix Willgerodt + + * floatformat.c (floatformat_bfloat16_big): New. + (floatformat_bfloat16_little): New. + 2020-09-08 Alan Modra * configure: Regenerate. diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c index 2fd5e688ec..6b9b03288e 100644 --- a/libiberty/floatformat.c +++ b/libiberty/floatformat.c @@ -389,7 +389,24 @@ const struct floatformat floatformat_ibm_long_double_little = floatformat_ibm_long_double_is_valid, &floatformat_ieee_double_little }; - + +const struct floatformat floatformat_bfloat16_big = +{ + floatformat_big, 16, 0, 1, 8, 127, 255, 9, 7, + floatformat_intbit_no, + "floatformat_bfloat16_big", + floatformat_always_valid, + NULL +}; + +const struct floatformat floatformat_bfloat16_little = +{ + floatformat_little, 16, 0, 1, 8, 127, 255, 9, 7, + floatformat_intbit_no, + "floatformat_bfloat16_little", + floatformat_always_valid, + NULL +}; #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) -- 2.34.1