aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-06 20:09:48 -0400
committerChristopher Li <sparse@chrisli.org>2010-10-08 15:25:01 -0700
commit9e73187d69d14f670c88520bc664c6cb47c17e89 (patch)
treed9ec7c5f70cc23047f0bd68be29801b7c19c683b
parentFixup and cleanup modifier_string() function. (diff)
downloadsparse-9e73187d69d14f670c88520bc664c6cb47c17e89.tar.gz
sparse-9e73187d69d14f670c88520bc664c6cb47c17e89.tar.bz2
sparse-9e73187d69d14f670c88520bc664c6cb47c17e89.zip
parser: add Blackfin gcc info
The Blackfin port uses some custom attributes to control memory placement, and it has some custom builtins. So add the ones that the kernel actually utilizes to avoid massive build errors with sparse. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--lib.c9
-rw-r--r--parse.c6
2 files changed, 15 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index d6e8b0e..c4a6f87 100644
--- a/lib.c
+++ b/lib.c
@@ -718,6 +718,15 @@ void declare_builtin_functions(void)
add_pre_buffer("extern long __builtin_labs(long);\n");
add_pre_buffer("extern double __builtin_fabs(double);\n");
+ /* Add Blackfin-specific stuff */
+ add_pre_buffer(
+ "#ifdef __bfin__\n"
+ "extern void __builtin_bfin_csync(void);\n"
+ "extern void __builtin_bfin_ssync(void);\n"
+ "extern int __builtin_bfin_norm_fr1x32(int);\n"
+ "#endif\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");
diff --git a/parse.c b/parse.c
index 7f1ee27..537055f 100644
--- a/parse.c
+++ b/parse.c
@@ -515,6 +515,12 @@ const char *ignored_attributes[] = {
"__format_arg__",
"hot",
"__hot__",
+ "l1_text",
+ "__l1_text__",
+ "l1_data",
+ "__l1_data__",
+ "l2",
+ "__l2__",
"may_alias",
"__may_alias__",
"malloc",