aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/avr-c.c
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2013-01-25 09:28:09 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2013-01-25 09:28:09 +0000
commit556f9906c548af7332f7f274f9e05cacfaeb64a6 (patch)
tree918c673cf4287a1ff60b0fbe521ff2d09b487c88 /gcc/config/avr/avr-c.c
parent1f546bbbc4dcc9cf044310cf0eafb091415df614 (diff)
downloadgcc-556f9906c548af7332f7f274f9e05cacfaeb64a6.zip
gcc-556f9906c548af7332f7f274f9e05cacfaeb64a6.tar.gz
gcc-556f9906c548af7332f7f274f9e05cacfaeb64a6.tar.bz2
re PR target/54222 ([avr] Implement fixed-point support)
gcc/ PR target/54222 * config/avr/builtins.def (DEF_BUILTIN): Add LIBNAME argument. Add NULL LIBNAME argument to existing definitions. (ABSHR, ABSR, ABSLR, ABSLLR, ABSHK, ABSK, ABSLK, ABSLLK): New. * config/avr/avr-c.c (DEF_BUILTIN): Add LIBNAME argument. * config/avr/avr.c (DEF_BUILTIN): Same. (avr_init_builtins): Pass down LIBNAME to add_builtin_function. (avr_expand_builtin): Expand to a vanilla call if a libgcc implementation is available (DECL_ASSEMBLER_NAME is set). (avr_fold_absfx): New static function. (avr_fold_builtin): Use it to handle: AVR_BUILTIN_ABSHR, AVR_BUILTIN_ABSR, AVR_BUILTIN_ABSLR, AVR_BUILTIN_ABSLLR, AVR_BUILTIN_ABSHK, AVR_BUILTIN_ABSK, AVR_BUILTIN_ABSLK, AVR_BUILTIN_ABSLLK. * config/avr/stdfix.h (abshr, absr, abslr, absllr) (abshk, absk, abslk, absllk): Provide as static inline functions. gcc/testsuite/ PR target/54222 * gcc.target/avr/torture/builtins-3-absfx.c: New test. From-SVN: r195464
Diffstat (limited to 'gcc/config/avr/avr-c.c')
-rw-r--r--gcc/config/avr/avr-c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c
index 075d9ef..ddcab54 100644
--- a/gcc/config/avr/avr-c.c
+++ b/gcc/config/avr/avr-c.c
@@ -168,7 +168,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
/* Define builtin macros so that the user can easily query whether or
not a specific builtin is available. */
-#define DEF_BUILTIN(NAME, N_ARGS, TYPE, CODE) \
+#define DEF_BUILTIN(NAME, N_ARGS, TYPE, CODE, LIBNAME) \
cpp_define (pfile, "__BUILTIN_AVR_" #NAME);
#include "builtins.def"
#undef DEF_BUILTIN