Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: linux-sparse@vger.kernel.org
Subject: [PATCH v2] parser: add Blackfin gcc info
Date: Wed,  6 Oct 2010 20:09:48 -0400	[thread overview]
Message-ID: <1286410188-6074-1-git-send-email-vapier@gentoo.org> (raw)

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>
---
v2
	- put Blackin builtins behind __bfin__

 lib.c   |    9 +++++++++
 parse.c |    6 ++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib.c b/lib.c
index ae6a20c..e33d3a5 100644
--- a/lib.c
+++ b/lib.c
@@ -717,6 +717,15 @@ 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");
 
+	/* 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 9074b1d..32d2d0a 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__",
 	"malloc",
 	"__malloc__",
 	"may_alias",
-- 
1.7.3.1


             reply	other threads:[~2010-10-07  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  0:09 Mike Frysinger [this message]
2010-10-07  2:24 ` [PATCH v2] parser: add Blackfin gcc info Christopher Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286410188-6074-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox