![]() x86_64/i686 has for a few months working std::bfloat16_t support, __bf16 there is no longer a storage only type, but can be used for arithmetics and is supported in libgcc and libstdc++. The following patch adds similar support for AArch64. Unlike the x86 changes, this one keeps the old __bf16 mangling of u6__bf16 rather than DF16b (so an exception from Itanium ABI), but otherwise __bf16 and decltype (0.0bf16) are the same type and both in C++ act as extended floating-point type. 2023-03-13 Jakub Jelinek <jakub@redhat.com> gcc/ * config/aarch64/aarch64.h (aarch64_bf16_type_node): Remove. (aarch64_bf16_ptr_type_node): Adjust comment. * config/aarch64/aarch64.cc (aarch64_gimplify_va_arg_expr): Use bfloat16_type_node rather than aarch64_bf16_type_node. (aarch64_libgcc_floating_mode_supported_p, aarch64_scalar_mode_supported_p): Also support BFmode. (aarch64_invalid_conversion, aarch64_invalid_unary_op): Remove. (aarch64_invalid_binary_op): Remove BFmode related rejections. (TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP): Don't redefine. * config/aarch64/aarch64-builtins.cc (aarch64_bf16_type_node): Remove. (aarch64_int_or_fp_type): Use bfloat16_type_node rather than aarch64_bf16_type_node. (aarch64_init_simd_builtin_types): Likewise. (aarch64_init_bf16_types): Likewise. Don't create bfloat16_type_node, which is created in tree.cc already. * config/aarch64/aarch64-sve-builtins.def (svbfloat16_t): Likewise. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_opt_n_1.c: Don't expect one __bf16 related error. * gcc.target/aarch64/bfloat16_vector_typecheck_1.c: Adjust or remove dg-error directives for __bf16 being an extended arithmetic type. * gcc.target/aarch64/bfloat16_vector_typecheck_2.c: Likewise. * gcc.target/aarch64/bfloat16_scalar_typecheck.c: Likewise. * g++.target/aarch64/bfloat_cpp_typecheck.C: Don't expect two __bf16 related errors. libgcc/ * config/aarch64/t-softfp (softfp_extensions): Add bfsf. (softfp_truncations): Add tfbf dfbf sfbf hfbf. (softfp_extras): Add floatdibf floatundibf floattibf floatuntibf. * config/aarch64/libgcc-softfp.ver (GCC_13.0.0): Export __extendbfsf2 and __trunc{s,d,t,h}fbf2. * config/aarch64/sfp-machine.h (_FP_NANFRAC_B, _FP_NANSIGN_B): Define. * soft-fp/floatundibf.c: New file. * soft-fp/floatdibf.c: New file. libstdc++-v3/ * config/abi/pre/gnu.ver (CXXABI_1.3.14): Also export __bf16 tinfos if it isn't mangled as DF16b but u6__bf16. |
||
---|---|---|
.. | ||
adddf3.c | ||
addsf3.c | ||
addtf3.c | ||
brain.h | ||
divdf3.c | ||
divsf3.c | ||
divtf3.c | ||
double.h | ||
eqdf2.c | ||
eqhf2.c | ||
eqsf2.c | ||
eqtf2.c | ||
extendbfsf2.c | ||
extenddftf2.c | ||
extended.h | ||
extendhfdf2.c | ||
extendhfsf2.c | ||
extendhftf2.c | ||
extendhfxf2.c | ||
extendsfdf2.c | ||
extendsftf2.c | ||
extendxftf2.c | ||
fixdfdi.c | ||
fixdfsi.c | ||
fixdfti.c | ||
fixhfdi.c | ||
fixhfsi.c | ||
fixhfti.c | ||
fixsfdi.c | ||
fixsfsi.c | ||
fixsfti.c | ||
fixtfdi.c | ||
fixtfsi.c | ||
fixtfti.c | ||
fixunsdfdi.c | ||
fixunsdfsi.c | ||
fixunsdfti.c | ||
fixunshfdi.c | ||
fixunshfsi.c | ||
fixunshfti.c | ||
fixunssfdi.c | ||
fixunssfsi.c | ||
fixunssfti.c | ||
fixunstfdi.c | ||
fixunstfsi.c | ||
fixunstfti.c | ||
floatdibf.c | ||
floatdidf.c | ||
floatdihf.c | ||
floatdisf.c | ||
floatditf.c | ||
floatsidf.c | ||
floatsihf.c | ||
floatsisf.c | ||
floatsitf.c | ||
floattibf.c | ||
floattidf.c | ||
floattihf.c | ||
floattisf.c | ||
floattitf.c | ||
floatundibf.c | ||
floatundidf.c | ||
floatundihf.c | ||
floatundisf.c | ||
floatunditf.c | ||
floatunsidf.c | ||
floatunsihf.c | ||
floatunsisf.c | ||
floatunsitf.c | ||
floatuntibf.c | ||
floatuntidf.c | ||
floatuntihf.c | ||
floatuntisf.c | ||
floatuntitf.c | ||
gedf2.c | ||
gesf2.c | ||
getf2.c | ||
half.h | ||
ledf2.c | ||
lesf2.c | ||
letf2.c | ||
muldf3.c | ||
mulsf3.c | ||
multf3.c | ||
negdf2.c | ||
negsf2.c | ||
negtf2.c | ||
op-1.h | ||
op-2.h | ||
op-4.h | ||
op-8.h | ||
op-common.h | ||
quad.h | ||
README | ||
single.h | ||
soft-fp.h | ||
subdf3.c | ||
subsf3.c | ||
subtf3.c | ||
truncbfhf2.c | ||
truncdfbf2.c | ||
truncdfhf2.c | ||
truncdfsf2.c | ||
trunchfbf2.c | ||
truncsfbf2.c | ||
truncsfhf2.c | ||
trunctfbf2.c | ||
trunctfdf2.c | ||
trunctfhf2.c | ||
trunctfsf2.c | ||
trunctfxf2.c | ||
truncxfbf2.c | ||
truncxfhf2.c | ||
unorddf2.c | ||
unordsf2.c | ||
unordtf2.c |
The files in this directory are part of the GNU C Library, not part of GCC. As described at <http://gcc.gnu.org/codingconventions.html>, changes should be made to the GNU C Library and the changed files then imported into GCC.