From: Randy Dunlap <rdunlap@xenotime.net>
To: Christopher Li <sparse@chrisli.org>
Cc: Avi Kivity <avi@redhat.com>, linux-sparse@vger.kernel.org
Subject: Re: vector_size attribute?
Date: Tue, 31 May 2011 11:31:28 -0700 [thread overview]
Message-ID: <20110531113128.12fbabee.rdunlap@xenotime.net> (raw)
In-Reply-To: <BANLkTi=dxxdSBtBYWD_1Cm8NKnL2chY4rA@mail.gmail.com>
On Tue, 31 May 2011 04:22:37 -0700 Christopher Li wrote:
> 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.
Works on kernel source tree also (of course). Thanks.
> 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>
>
> 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
> + */
> +
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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
prev parent reply other threads:[~2011-05-31 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-29 15:57 vector_size attribute? Randy Dunlap
2011-05-29 16:26 ` Avi Kivity
2011-05-31 11:22 ` Christopher Li
2011-05-31 18:31 ` Randy Dunlap [this message]
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=20110531113128.12fbabee.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=avi@redhat.com \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.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;
as well as URLs for NNTP newsgroup(s).