diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2009-10-11 21:58:13 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2009-10-11 14:58:13 -0700 |
commit | 2c93399fdf1b74d0f7e65f7c7ca88ec69708082d (patch) | |
tree | 4dadbbe8cdf7c3d21562455fd9c29eff84d5e382 | |
parent | bfb597465a43e175e3d16e7941118c56ec7d29b8 (diff) | |
download | gcc-2c93399fdf1b74d0f7e65f7c7ca88ec69708082d.zip gcc-2c93399fdf1b74d0f7e65f7c7ca88ec69708082d.tar.gz gcc-2c93399fdf1b74d0f7e65f7c7ca88ec69708082d.tar.bz2 |
spu.c (TARGET_BUILTIN_DECL): Define.
2009-10-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.c (TARGET_BUILTIN_DECL): Define.
(spu_builtin_decl): New function.
From-SVN: r152651
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7f8749..80b721b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-11 Andrew Pinski <andrew_pinski@playstation.sony.com> + + * config/spu/spu.c (TARGET_BUILTIN_DECL): Define. + (spu_builtin_decl): New function. + 2009-10-12 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.md (SWIM): New mode iterator. diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 316cc73..a05e1d8 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) { |