diff options
author | DJ Delorie <dj@redhat.com> | 2013-10-30 20:29:49 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2013-10-30 20:29:49 -0400 |
commit | 4bbd2ea80fb4952a0127b5ac386ab1803f27f788 (patch) | |
tree | b2277ce6d0b1997563d87fd95848b009b2090303 /gcc/config | |
parent | d36ff35b337ce24b5bd4635a12ff8be2c97c1856 (diff) | |
download | gcc-4bbd2ea80fb4952a0127b5ac386ab1803f27f788.zip gcc-4bbd2ea80fb4952a0127b5ac386ab1803f27f788.tar.gz gcc-4bbd2ea80fb4952a0127b5ac386ab1803f27f788.tar.bz2 |
rx.c (ADD_RX_BUILTIN0): New macro, used for builtins that take no arguments.
* config/rx/rx.c (ADD_RX_BUILTIN0): New macro, used for builtins
that take no arguments.
From-SVN: r204239
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rx/rx.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 93b5de6..756cd06 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -2273,6 +2273,14 @@ static GTY(()) tree rx_builtins[(int) RX_BUILTIN_max]; static void rx_init_builtins (void) { +#define ADD_RX_BUILTIN0(UC_NAME, LC_NAME, RET_TYPE) \ + rx_builtins[RX_BUILTIN_##UC_NAME] = \ + add_builtin_function ("__builtin_rx_" LC_NAME, \ + build_function_type_list (RET_TYPE##_type_node, \ + NULL_TREE), \ + RX_BUILTIN_##UC_NAME, \ + BUILT_IN_MD, NULL, NULL_TREE) + #define ADD_RX_BUILTIN1(UC_NAME, LC_NAME, RET_TYPE, ARG_TYPE) \ rx_builtins[RX_BUILTIN_##UC_NAME] = \ add_builtin_function ("__builtin_rx_" LC_NAME, \ @@ -2303,7 +2311,7 @@ rx_init_builtins (void) RX_BUILTIN_##UC_NAME, \ BUILT_IN_MD, NULL, NULL_TREE) - ADD_RX_BUILTIN1 (BRK, "brk", void, void); + ADD_RX_BUILTIN0 (BRK, "brk", void); ADD_RX_BUILTIN1 (CLRPSW, "clrpsw", void, integer); ADD_RX_BUILTIN1 (SETPSW, "setpsw", void, integer); ADD_RX_BUILTIN1 (INT, "int", void, integer); @@ -2311,18 +2319,18 @@ rx_init_builtins (void) ADD_RX_BUILTIN2 (MACLO, "maclo", void, intSI, intSI); ADD_RX_BUILTIN2 (MULHI, "mulhi", void, intSI, intSI); ADD_RX_BUILTIN2 (MULLO, "mullo", void, intSI, intSI); - ADD_RX_BUILTIN1 (MVFACHI, "mvfachi", intSI, void); - ADD_RX_BUILTIN1 (MVFACMI, "mvfacmi", intSI, void); + ADD_RX_BUILTIN0 (MVFACHI, "mvfachi", intSI); + ADD_RX_BUILTIN0 (MVFACMI, "mvfacmi", intSI); ADD_RX_BUILTIN1 (MVTACHI, "mvtachi", void, intSI); ADD_RX_BUILTIN1 (MVTACLO, "mvtaclo", void, intSI); - ADD_RX_BUILTIN1 (RMPA, "rmpa", void, void); + ADD_RX_BUILTIN0 (RMPA, "rmpa", void); ADD_RX_BUILTIN1 (MVFC, "mvfc", intSI, integer); ADD_RX_BUILTIN2 (MVTC, "mvtc", void, integer, integer); ADD_RX_BUILTIN1 (MVTIPL, "mvtipl", void, integer); ADD_RX_BUILTIN1 (RACW, "racw", void, integer); ADD_RX_BUILTIN1 (ROUND, "round", intSI, float); ADD_RX_BUILTIN1 (REVW, "revw", intSI, intSI); - ADD_RX_BUILTIN1 (WAIT, "wait", void, void); + ADD_RX_BUILTIN0 (WAIT, "wait", void); } /* Return the RX builtin for CODE. */ |