diff options
author | Felix Willgerodt <felix.willgerodt@intel.com> | 2020-08-17 13:36:49 +0200 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2020-09-08 17:38:12 +0000 |
commit | 87603e565615db055f7f60db0c9888f71d233826 (patch) | |
tree | e192a2eebf77e81a0245d5f82755ac42946bf041 /libiberty | |
parent | 34d926dba097c4965917d09a3eedec11242c5457 (diff) | |
download | gcc-87603e565615db055f7f60db0c9888f71d233826.zip gcc-87603e565615db055f7f60db0c9888f71d233826.tar.gz gcc-87603e565615db055f7f60db0c9888f71d233826.tar.bz2 |
floatformat.h: Add bfloat16 support.
This change is motivated by a patchset that adds bfloat16 debugging
support for new avx512 instructions to GDB. The gdb thread can be found
here: https://sourceware.org/pipermail/gdb-patches/2020-July/170820.html
include:
2020-08-17 Felix Willgerodt <felix.willgerodt@intel.com>
* floatformat.h (floatformat_bfloat16_big): New.
(floatformat_bfloat16_little): New.
libiberty:
2020-08-17 Felix Willgerodt <felix.willgerodt@intel.com>
* floatformat.c (floatformat_bfloat16_big): New.
(floatformat_bfloat16_little): New.
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/floatformat.c | 19 |
1 files changed, 18 insertions, 1 deletions
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)) |