Skip to content

Commit e026346

Browse files
committed
Add jit_target_dependent_types_init function to jit-target.cc
1 parent 28b84db commit e026346

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

gcc/jit/jit-target.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,35 @@ along with GCC; see the file COPYING3. If not see
3636

3737
/* Initialize all variables of the Target structure. */
3838

39+
void
40+
jit_target_dependent_types_init()
41+
{
42+
if (targetm.scalar_mode_supported_p (TImode))
43+
{
44+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
45+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
46+
}
47+
48+
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
49+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
50+
51+
if (float32_type_node != NULL && TYPE_PRECISION(float32_type_node) == 32)
52+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT32);
53+
54+
if (float64_type_node != NULL && TYPE_PRECISION(float64_type_node) == 64)
55+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT64);
56+
57+
if (float128_type_node != NULL && TYPE_PRECISION(float128_type_node) == 128)
58+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT128);
59+
}
60+
3961
void
4062
jit_target_init ()
4163
{
4264
/* Initialize target info tables, the keys required by the language are added
4365
last, so that the CPU handler can override. */
4466
targetjitm.jit_register_cpu_target_info ();
67+
jit_target_dependent_types_init();
4568
}
4669

4770
/* Add a target info key:value to JIT_TARGET_INFO for use by

0 commit comments

Comments
 (0)