+2012-11-26 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64-builtins.c (aarch64_builtin_decls): New.
+ (aarch64_init_simd_builtins): Store declaration after builtin
+ initialisation.
+ (aarch64_builtin_decl): New.
+ * config/aarch64/aarch64-protos.h (aarch64_builtin_decl): New.
+ * config/aarch64/aarch64.c (TARGET_BUILTIN_DECL): Define.
+
2012-11-26 Steven Bosscher <steven@gcc.gnu.org>
* doc/invoke.texi: Remove -dv documentation. Fix up graph dump related
#undef VAR10
#undef VAR11
+static GTY(()) tree aarch64_builtin_decls[AARCH64_BUILTIN_MAX];
+
#define NUM_DREG_TYPES 6
#define NUM_QREG_TYPES 6
};
char namebuf[60];
tree ftype = NULL;
+ tree fndecl = NULL;
int is_load = 0;
int is_store = 0;
snprintf (namebuf, sizeof (namebuf), "__builtin_aarch64_%s%s",
d->name, modenames[d->mode]);
- add_builtin_function (namebuf, ftype, fcode, BUILT_IN_MD, NULL,
- NULL_TREE);
+ fndecl = add_builtin_function (namebuf, ftype, fcode, BUILT_IN_MD,
+ NULL, NULL_TREE);
+ aarch64_builtin_decls[fcode] = fndecl;
}
}
aarch64_init_simd_builtins ();
}
+tree
+aarch64_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
+{
+ if (code >= AARCH64_BUILTIN_MAX)
+ return error_mark_node;
+
+ return aarch64_builtin_decls[code];
+}
+
typedef enum
{
SIMD_ARG_COPY_TO_REG,
rtx subtarget ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
int ignore ATTRIBUTE_UNUSED);
+tree aarch64_builtin_decl (unsigned, bool ATTRIBUTE_UNUSED);
#endif /* GCC_AARCH64_PROTOS_H */
#undef TARGET_CLASS_MAX_NREGS
#define TARGET_CLASS_MAX_NREGS aarch64_class_max_nregs
+#undef TARGET_BUILTIN_DECL
+#define TARGET_BUILTIN_DECL aarch64_builtin_decl
+
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN aarch64_expand_builtin