diff mbox

vector_size attribute?

Message ID BANLkTi=dxxdSBtBYWD_1Cm8NKnL2chY4rA@mail.gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Christopher Li May 31, 2011, 11:22 a.m. UTC
On Sun, May 29, 2011 at 9:26 AM, Avi Kivity <avi@redhat.com> wrote:
> On 05/29/2011 06:57 PM, Randy Dunlap wrote:
>> typedef u32 __attribute__((vector_size(16))) sse128_t;
>
> I guess sparse should be taught about it.  It's needed so that gcc asm
> constraints are aware of what memory is touched when running an sse
> instruction.
>
> (probably ignoring it for now should be sufficient)

I just submit a change to ignore that attribute. Works fine with
the trivial test case.

Chris

commit d8b20ec2324b09b164b298fbab6b4265b6886929
Author: Christopher Li <sparse@chrisli.org>
Date:   Tue May 31 04:05:37 2011 -0700

    Ignore attribute vector_size

    Report by Randy Dunlap, attribute vector_size is causing
    error. Ignore it for now.

    Signed-off-by: Christopher Li <sparse@chrisli.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/parse.c b/parse.c
index 9e79ef0..57f369b 100644
--- a/parse.c
+++ b/parse.c
@@ -563,6 +563,7 @@  const char *ignored_attributes[] = {
        "__unused__",
        "used",
        "__used__",
+       "vector_size",
        "visibility",
        "__visibility__",
        "warn_unused_result",
diff --git a/validation/attr_vector_size.c b/validation/attr_vector_size.c
new file mode 100644
index 0000000..6982922
--- /dev/null
+++ b/validation/attr_vector_size.c
@@ -0,0 +1,7 @@ 
+typedef unsigned int u32;
+typedef u32 __attribute__((vector_size(16))) sse128_t;
+
+/*
+ * check-name: attribute vector_size
+ */
+