}
static void
-arm_init_neon_builtins (void)
+arm_init_neon_builtins_internal (void)
{
unsigned int i, fcode = ARM_BUILTIN_NEON_PATTERN_START;
NULL, NULL_TREE);
arm_builtin_decls[fcode] = fndecl;
}
+}
- if (TARGET_CRYPTO && TARGET_HARD_FLOAT)
- {
- tree V16UQI_type_node = arm_simd_builtin_type (V16QImode,
- true,
- false);
+static void
+arm_init_crypto_builtins_internal (void)
+{
+ tree V16UQI_type_node
+ = arm_simd_builtin_type (V16QImode, true, false);
- tree V4USI_type_node = arm_simd_builtin_type (V4SImode,
- true,
- false);
+ tree V4USI_type_node
+ = arm_simd_builtin_type (V4SImode, true, false);
- tree v16uqi_ftype_v16uqi
- = build_function_type_list (V16UQI_type_node, V16UQI_type_node,
- NULL_TREE);
+ tree v16uqi_ftype_v16uqi
+ = build_function_type_list (V16UQI_type_node, V16UQI_type_node,
+ NULL_TREE);
- tree v16uqi_ftype_v16uqi_v16uqi
+ tree v16uqi_ftype_v16uqi_v16uqi
= build_function_type_list (V16UQI_type_node, V16UQI_type_node,
V16UQI_type_node, NULL_TREE);
- tree v4usi_ftype_v4usi
- = build_function_type_list (V4USI_type_node, V4USI_type_node,
- NULL_TREE);
-
- tree v4usi_ftype_v4usi_v4usi
- = build_function_type_list (V4USI_type_node, V4USI_type_node,
- V4USI_type_node, NULL_TREE);
-
- tree v4usi_ftype_v4usi_v4usi_v4usi
- = build_function_type_list (V4USI_type_node, V4USI_type_node,
- V4USI_type_node, V4USI_type_node,
- NULL_TREE);
-
- tree uti_ftype_udi_udi
- = build_function_type_list (unsigned_intTI_type_node,
- unsigned_intDI_type_node,
- unsigned_intDI_type_node,
- NULL_TREE);
-
- #undef CRYPTO1
- #undef CRYPTO2
- #undef CRYPTO3
- #undef C
- #undef N
- #undef CF
- #undef FT1
- #undef FT2
- #undef FT3
-
- #define C(U) \
- ARM_BUILTIN_CRYPTO_##U
- #define N(L) \
- "__builtin_arm_crypto_"#L
- #define FT1(R, A) \
- R##_ftype_##A
- #define FT2(R, A1, A2) \
- R##_ftype_##A1##_##A2
- #define FT3(R, A1, A2, A3) \
- R##_ftype_##A1##_##A2##_##A3
- #define CRYPTO1(L, U, R, A) \
- arm_builtin_decls[C (U)] \
- = add_builtin_function (N (L), FT1 (R, A), \
- C (U), BUILT_IN_MD, NULL, NULL_TREE);
- #define CRYPTO2(L, U, R, A1, A2) \
- arm_builtin_decls[C (U)] \
- = add_builtin_function (N (L), FT2 (R, A1, A2), \
- C (U), BUILT_IN_MD, NULL, NULL_TREE);
+ tree v4usi_ftype_v4usi
+ = build_function_type_list (V4USI_type_node, V4USI_type_node,
+ NULL_TREE);
+
+ tree v4usi_ftype_v4usi_v4usi
+ = build_function_type_list (V4USI_type_node, V4USI_type_node,
+ V4USI_type_node, NULL_TREE);
+
+ tree v4usi_ftype_v4usi_v4usi_v4usi
+ = build_function_type_list (V4USI_type_node, V4USI_type_node,
+ V4USI_type_node, V4USI_type_node,
+ NULL_TREE);
- #define CRYPTO3(L, U, R, A1, A2, A3) \
- arm_builtin_decls[C (U)] \
- = add_builtin_function (N (L), FT3 (R, A1, A2, A3), \
+ tree uti_ftype_udi_udi
+ = build_function_type_list (unsigned_intTI_type_node,
+ unsigned_intDI_type_node,
+ unsigned_intDI_type_node,
+ NULL_TREE);
+
+ #undef CRYPTO1
+ #undef CRYPTO2
+ #undef CRYPTO3
+ #undef C
+ #undef N
+ #undef CF
+ #undef FT1
+ #undef FT2
+ #undef FT3
+
+ #define C(U) \
+ ARM_BUILTIN_CRYPTO_##U
+ #define N(L) \
+ "__builtin_arm_crypto_"#L
+ #define FT1(R, A) \
+ R##_ftype_##A
+ #define FT2(R, A1, A2) \
+ R##_ftype_##A1##_##A2
+ #define FT3(R, A1, A2, A3) \
+ R##_ftype_##A1##_##A2##_##A3
+ #define CRYPTO1(L, U, R, A) \
+ arm_builtin_decls[C (U)] \
+ = add_builtin_function (N (L), FT1 (R, A), \
+ C (U), BUILT_IN_MD, NULL, NULL_TREE);
+ #define CRYPTO2(L, U, R, A1, A2) \
+ arm_builtin_decls[C (U)] \
+ = add_builtin_function (N (L), FT2 (R, A1, A2), \
+ C (U), BUILT_IN_MD, NULL, NULL_TREE);
+
+ #define CRYPTO3(L, U, R, A1, A2, A3) \
+ arm_builtin_decls[C (U)] \
+ = add_builtin_function (N (L), FT3 (R, A1, A2, A3), \
C (U), BUILT_IN_MD, NULL, NULL_TREE);
- #include "crypto.def"
-
- #undef CRYPTO1
- #undef CRYPTO2
- #undef CRYPTO3
- #undef C
- #undef N
- #undef FT1
- #undef FT2
- #undef FT3
+ #include "crypto.def"
+
+ #undef CRYPTO1
+ #undef CRYPTO2
+ #undef CRYPTO3
+ #undef C
+ #undef N
+ #undef FT1
+ #undef FT2
+ #undef FT3
+}
+
+static bool neon_set_p = false;
+static bool neon_crypto_set_p = false;
+
+void
+arm_init_neon_builtins (void)
+{
+ if (! neon_set_p)
+ {
+ neon_set_p = true;
+ arm_init_neon_builtins_internal ();
+ }
+
+ if (!neon_crypto_set_p && TARGET_CRYPTO && TARGET_HARD_FLOAT)
+ {
+ neon_crypto_set_p = true;
+ arm_init_crypto_builtins_internal ();
}
}