diff options
-rw-r--r-- | include/ChangeLog | 8 | ||||
-rw-r--r-- | include/floatformat.h | 3 | ||||
-rw-r--r-- | libiberty/ChangeLog | 8 | ||||
-rw-r--r-- | libiberty/floatformat.c | 19 |
4 files changed, 37 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index c9d2749..c8a90cf 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2020-09-11 Felix Willgerodt <felix.willgerodt@intel.com> + + Sync with GCC + 2020-09-08 Felix Willgerodt <felix.willgerodt@intel.com> + + * floatformat.h (floatformat_bfloat16_big): New. + (floatformat_bfloat16_little): New. + 2020-09-12 Cooper Qu <cooper.qu@linux.alibaba.com> * opcode/csky.h (CSKYV1_ISA_E1): Convert to bfd_uint64_t type. diff --git a/include/floatformat.h b/include/floatformat.h index ce8d6d4..630fade 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 6b46642..e6280d5 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,11 @@ +2020-09-11 Felix Willgerodt <felix.willgerodt@intel.com> + + Sync with GCC + 2020-09-08 Felix Willgerodt <felix.willgerodt@intel.com> + + * floatformat.c (floatformat_bfloat16_big): New. + (floatformat_bfloat16_little): New. + 2020-09-08 Alan Modra <amodra@gmail.com> * configure: Regenerate. diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c index 2fd5e68..6b9b032 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)) |