diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-02-10 10:21:12 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-02-10 10:21:12 +0100 |
commit | cbb1ab104083d2fda4b7eee3b8c1a383ff5ced4e (patch) | |
tree | adf80efb3b5c83bfd91ae5987fd3e83459dd7815 /gcc/builtins.c | |
parent | f25a2b52ab58ffa3d9c5ba773181d0a9515f9e09 (diff) | |
download | gcc-cbb1ab104083d2fda4b7eee3b8c1a383ff5ced4e.zip gcc-cbb1ab104083d2fda4b7eee3b8c1a383ff5ced4e.tar.gz gcc-cbb1ab104083d2fda4b7eee3b8c1a383ff5ced4e.tar.bz2 |
builtins.c (set_builtin_user_assembler_name): Also handle ffs if int is smaller than word.
* builtins.c (set_builtin_user_assembler_name): Also handle
ffs if int is smaller than word.
* gcc.dg/builtin-ffs-1.c: New test.
From-SVN: r156646
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index b6fd1ea..bfff2d5 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -13594,6 +13594,14 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec) case BUILT_IN_ABORT: abort_libfunc = set_user_assembler_libfunc ("abort", asmspec); break; + case BUILT_IN_FFS: + if (INT_TYPE_SIZE < BITS_PER_WORD) + { + set_user_assembler_libfunc ("ffs", asmspec); + set_optab_libfunc (ffs_optab, mode_for_size (INT_TYPE_SIZE, + MODE_INT, 0), "ffs"); + } + break; default: break; } |