diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-03 20:12:37 +0000 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2009-08-03 20:12:37 +0000 |
commit | 2feeb3562a547397da9a17c926f3b388bf186f02 (patch) | |
tree | 6b3e8cbb77b683af9b2639dbe330874852d313fd | |
parent | Ignore attribute __bounded__, used by OpenBSD headers. (diff) | |
download | sparse-2feeb3562a547397da9a17c926f3b388bf186f02.tar.gz sparse-2feeb3562a547397da9a17c926f3b388bf186f02.tar.bz2 sparse-2feeb3562a547397da9a17c926f3b388bf186f02.zip |
Add c{l,t}z{,l,ll}, ffsl{,l}, popcountll and floating point comparison builtins.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r-- | lib.c | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -685,15 +685,26 @@ void declare_builtin_functions(void) add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n"); add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n"); + /* And bitwise operations.. */ + add_pre_buffer("extern int __builtin_clz(int);\n"); + add_pre_buffer("extern int __builtin_clzl(long);\n"); + add_pre_buffer("extern int __builtin_clzll(long long);\n"); + add_pre_buffer("extern int __builtin_ctz(int);\n"); + add_pre_buffer("extern int __builtin_ctzl(long);\n"); + add_pre_buffer("extern int __builtin_ctzll(long long);\n"); + add_pre_buffer("extern int __builtin_ffs(int);\n"); + add_pre_buffer("extern int __builtin_ffsl(long);\n"); + add_pre_buffer("extern int __builtin_ffsll(long long);\n"); + add_pre_buffer("extern int __builtin_popcount(unsigned int);\n"); + add_pre_buffer("extern int __builtin_popcountl(unsigned long);\n"); + add_pre_buffer("extern int __builtin_popcountll(unsigned long long);\n"); + /* And some random ones.. */ add_pre_buffer("extern void *__builtin_return_address(unsigned int);\n"); add_pre_buffer("extern void *__builtin_extract_return_addr(void *);\n"); add_pre_buffer("extern void *__builtin_frame_address(unsigned int);\n"); add_pre_buffer("extern void __builtin_trap(void);\n"); - add_pre_buffer("extern int __builtin_ffs(int);\n"); add_pre_buffer("extern void *__builtin_alloca(__SIZE_TYPE__);\n"); - add_pre_buffer("extern int __builtin_popcount(unsigned int);\n"); - add_pre_buffer("extern int __builtin_popcountl(unsigned long);\n"); add_pre_buffer("extern void __builtin_prefetch (const void *, ...);\n"); add_pre_buffer("extern long __builtin_alpha_extbl(long, long);\n"); add_pre_buffer("extern long __builtin_alpha_extwl(long, long);\n"); @@ -704,6 +715,14 @@ void declare_builtin_functions(void) add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n"); add_pre_buffer("extern long __builtin_labs(long);\n"); + /* And some floating point stuff.. */ + add_pre_buffer("extern int __builtin_isgreater(float, float);\n"); + add_pre_buffer("extern int __builtin_isgreaterequal(float, float);\n"); + add_pre_buffer("extern int __builtin_isless(float, float);\n"); + add_pre_buffer("extern int __builtin_islessequal(float, float);\n"); + add_pre_buffer("extern int __builtin_islessgreater(float, float);\n"); + add_pre_buffer("extern int __builtin_isunordered(float, float);\n"); + /* And some __FORTIFY_SOURCE ones.. */ add_pre_buffer ("extern __SIZE_TYPE__ __builtin_object_size(void *, int);\n"); add_pre_buffer ("extern void * __builtin___memcpy_chk(void *, const void *, __SIZE_TYPE__, __SIZE_TYPE__);\n"); |