summaryrefslogtreecommitdiff
path: root/gcc/config/spu
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-11 21:58:13 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-11 21:58:13 +0000
commite69250424485a6a1f7d70dac83cbb937d65afcc4 (patch)
tree4dadbbe8cdf7c3d21562455fd9c29eff84d5e382 /gcc/config/spu
parent47bfa1e7723164639add04d1ea4501097ee7c74f (diff)
downloadgcc-e69250424485a6a1f7d70dac83cbb937d65afcc4.tar.gz
2009-10-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.c (TARGET_BUILTIN_DECL): Define. (spu_builtin_decl): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/spu')
-rw-r--r--gcc/config/spu/spu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 316cc73d777..a05e1d804d7 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -150,6 +150,7 @@ char regs_ever_allocated[FIRST_PSEUDO_REGISTER];
/* Prototypes and external defs. */
static void spu_init_builtins (void);
+static tree spu_builtin_decl (unsigned, bool);
static unsigned char spu_scalar_mode_supported_p (enum machine_mode mode);
static unsigned char spu_vector_mode_supported_p (enum machine_mode mode);
static bool spu_legitimate_address_p (enum machine_mode, rtx, bool);
@@ -283,6 +284,8 @@ static const struct attribute_spec spu_attribute_table[] =
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS spu_init_builtins
+#undef TARGET_BUILTIN_DECL
+#define TARGET_BUILTIN_DECL spu_builtin_decl
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN spu_expand_builtin
@@ -5285,6 +5288,18 @@ struct spu_builtin_description spu_builtins[] = {
#undef DEF_BUILTIN
};
+/* Returns the rs6000 builtin decl for CODE. */
+
+static tree
+spu_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
+{
+ if (code >= NUM_SPU_BUILTINS)
+ return error_mark_node;
+
+ return spu_builtins[code].fndecl;
+}
+
+
static void
spu_init_builtins (void)
{