From 84fe71da96b38286899b8964222053bac87edfdc Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 5 Jul 2025 19:20:57 -0400 Subject: [PATCH] Detect target-dependant types on Aarch64 --- gcc/config/aarch64/aarch64-jit.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gcc/config/aarch64/aarch64-jit.cc b/gcc/config/aarch64/aarch64-jit.cc index c2a3e17957d42..b1cb446baa4e1 100644 --- a/gcc/config/aarch64/aarch64-jit.cc +++ b/gcc/config/aarch64/aarch64-jit.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "target.h" #include "tm.h" #include "tm_jit.h" #include @@ -52,6 +53,24 @@ aarch64_jit_register_target_info (void) jit_target_set_arch (cpu); } + if (targetm.scalar_mode_supported_p (TImode)) + { + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_UINT128_T); + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_INT128_T); + } + + if (float16_type_node != NULL && TYPE_PRECISION(float16_type_node) == 16) + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT16); + + if (float32_type_node != NULL && TYPE_PRECISION(float32_type_node) == 32) + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT32); + + if (float64_type_node != NULL && TYPE_PRECISION(float64_type_node) == 64) + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT64); + + if (float128_type_node != NULL && TYPE_PRECISION(float128_type_node) == 128) + jit_target_add_supported_target_dependent_type(GCC_JIT_TYPE_FLOAT128); + if (TARGET_AES) jit_add_target_info ("target_feature", "aes"); if (TARGET_BF16_FP)