Add bfloat16 support for AVX512 register view.
This adds support for the bfloat16 datatype, which can be seen as a short version of FP32, skipping the least significant 16 bits of the mantissa. Since the datatype is currently only supported by the AVX512 registers, the printing of bfloat16 values is only supported for xmm, ymm and zmm registers. gdb/ChangeLog: 2020-09-11 Moritz Riesterer <moritz.riesterer@intel.com> Felix Willgerodt <Felix.Willgerodt@intel.com> * gdbarch.sh: Added bfloat16 type. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * gdbtypes.c (floatformats_bfloat16): New struct. (gdbtypes_post_init): Add builtin_bfloat16. * gdbtypes.h (struct builtin_type) <builtin_bfloat16>: New member. (floatformats_bfloat16): New struct. * i386-tdep.c (i386_zmm_type): Add field "v32_bfloat16" (i386_ymm_type): Add field "v16_bfloat16" (i386_gdbarch_init): Add set_gdbarch_bfloat16_format. * target-descriptions.c (make_gdb_type): Add case TDESC_TYPE_BFLOAT16. * gdbsupport/tdesc.cc (tdesc_predefined_types): New member bfloat16. * gdbsupport/tdesc.h (tdesc_type_kind): New member TDESC_TYPE_BFLOAT16. * features/i386/64bit-avx512.xml: Add bfloat16 type. * features/i386/64bit-avx512.c: Regenerated. * features/i386/64bit-sse.xml: Add bfloat16 type. * features/i386/64bit-sse.c: Regenerated. gdb/testsuite/ChangeLog: 2020-09-11 Moritz Riesterer <moritz.riesterer@intel.com> Felix Willgerodt <Felix.Willgerodt@intel.com> * x86-avx512bf16.c: New file. * x86-avx512bf16.exp: Likewise. * lib/gdb.exp (skip_avx512bf16_tests): New function.
This commit is contained in:
parent
1347d11109
commit
2a67f09db1
18 changed files with 413 additions and 5 deletions
|
@ -1847,6 +1847,7 @@ struct builtin_type
|
|||
struct type *builtin_unsigned_short;
|
||||
struct type *builtin_unsigned_int;
|
||||
struct type *builtin_unsigned_long;
|
||||
struct type *builtin_bfloat16;
|
||||
struct type *builtin_half;
|
||||
struct type *builtin_float;
|
||||
struct type *builtin_double;
|
||||
|
@ -1981,7 +1982,7 @@ extern const struct floatformat *floatformats_ia64_quad[BFD_ENDIAN_UNKNOWN];
|
|||
extern const struct floatformat *floatformats_vax_f[BFD_ENDIAN_UNKNOWN];
|
||||
extern const struct floatformat *floatformats_vax_d[BFD_ENDIAN_UNKNOWN];
|
||||
extern const struct floatformat *floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN];
|
||||
|
||||
extern const struct floatformat *floatformats_bfloat16[BFD_ENDIAN_UNKNOWN];
|
||||
|
||||
/* Allocate space for storing data associated with a particular
|
||||
type. We ensure that the space is allocated using the same
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue