@@ -22,12 +22,6 @@ const char gcc_builtin_headers_types[] =
2222#include " compiler_headers/gcc_builtin_headers_types.inc" // IWYU pragma: keep
2323 ; // NOLINT(whitespace/semicolon)
2424
25- const char gcc_builtin_headers_types_gcc7plus[] =
26- " #line 1 \" gcc_builtin_headers_types_gcc7plus.h\"\n "
27- // NOLINTNEXTLINE(whitespace/line_length)
28- #include " compiler_headers/gcc_builtin_headers_types_gcc7plus.inc" // IWYU pragma: keep
29- ; // NOLINT(whitespace/semicolon)
30-
3125const char gcc_builtin_headers_generic[] =
3226 " #line 1 \" gcc_builtin_headers_generic.h\"\n "
3327#include " compiler_headers/gcc_builtin_headers_generic.inc" // IWYU pragma: keep
@@ -158,9 +152,7 @@ max_malloc_size(std::size_t pointer_width, std::size_t object_bits)
158152 return ((mp_integer)1 ) << (mp_integer)bits_for_positive_offset;
159153}
160154
161- void ansi_c_internal_additions (
162- std::string &code,
163- bool support_ts_18661_3_Floatn_types)
155+ void ansi_c_internal_additions (std::string &code, bool support_float16_type)
164156{
165157 // clang-format off
166158 // do the built-in types and variables
@@ -249,8 +241,15 @@ void ansi_c_internal_additions(
249241 config.ansi_c .mode == configt::ansi_ct::flavourt::ARM)
250242 {
251243 code+=gcc_builtin_headers_types;
252- if (support_ts_18661_3_Floatn_types)
253- code += gcc_builtin_headers_types_gcc7plus;
244+ if (support_float16_type)
245+ {
246+ code +=
247+ " typedef _Float16 __gcc_v8hf __attribute__((__vector_size__(16)));\n " ;
248+ code +=
249+ " typedef _Float16 __gcc_v16hf __attribute__((__vector_size__(32)));\n " ;
250+ code +=
251+ " typedef _Float16 __gcc_v32hf __attribute__((__vector_size__(64)));\n " ;
252+ }
254253
255254 // there are many more, e.g., look at
256255 // https://developer.apple.com/library/mac/#documentation/developertools/gcc-4.0.1/gcc/Target-Builtins.html
0 commit comments