Skip to content

Commit 0b25aa6

Browse files
committed
Move target-dependent type detection to gcc/jit/jit-target.cc
1 parent f131771 commit 0b25aa6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

gcc/jit/jit-target.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ jit_target_init ()
4343
last, so that the OS and CPU handlers can override. */
4444
targetjitm.jit_register_cpu_target_info ();
4545
targetjitm.jit_register_os_target_info ();
46+
47+
if (targetm.scalar_mode_supported_p (TImode))
48+
{
49+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
50+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
51+
}
52+
53+
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
54+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
55+
56+
if (float32_type_node != NULL && TYPE_PRECISION(float32_type_node) == 32)
57+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT32);
58+
59+
if (float64_type_node != NULL && TYPE_PRECISION(float64_type_node) == 64)
60+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT64);
61+
62+
if (float128_type_node != NULL && TYPE_PRECISION(float128_type_node) == 128)
63+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT128);
64+
4665
}
4766

4867
/* Add all target info in HANDLERS to JIT_TARGET_INFO for use by

0 commit comments

Comments
 (0)