Skip to content

Commit 84fe71d

Browse files
committed
Detect target-dependant types on Aarch64
1 parent 0c4bc7d commit 84fe71d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

gcc/config/aarch64/aarch64-jit.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
2020
#include "config.h"
2121
#include "system.h"
2222
#include "coretypes.h"
23+
#include "target.h"
2324
#include "tm.h"
2425
#include "tm_jit.h"
2526
#include <sys/auxv.h>
@@ -52,6 +53,24 @@ aarch64_jit_register_target_info (void)
5253
jit_target_set_arch (cpu);
5354
}
5455

56+
if (targetm.scalar_mode_supported_p (TImode))
57+
{
58+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T);
59+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T);
60+
}
61+
62+
if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16)
63+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16);
64+
65+
if (float32_type_node != NULL && TYPE_PRECISION(float32_type_node) == 32)
66+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT32);
67+
68+
if (float64_type_node != NULL && TYPE_PRECISION(float64_type_node) == 64)
69+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT64);
70+
71+
if (float128_type_node != NULL && TYPE_PRECISION(float128_type_node) == 128)
72+
jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT128);
73+
5574
if (TARGET_AES)
5675
jit_add_target_info ("target_feature", "aes");
5776
if (TARGET_BF16_FP)

0 commit comments

Comments
 (0)