From: Felix Willgerodt Date: Thu, 10 Sep 2020 12:29:51 +0000 (+0200) Subject: Sync include, libiberty with GCC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dae7c5a44424e8a2ff136085b07a852fc578e24e;p=binutils-gdb.git 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. --- diff --git a/include/ChangeLog b/include/ChangeLog index c9d2749d346..c8a90cfa36b 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 ce8d6d4add8..630fade0449 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 6b46642fd35..e6280d576bf 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 2fd5e688ec4..6b9b03288e2 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))