From patchwork Tue May 31 11:22:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 832122 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4VBJOal024764 for ; Tue, 31 May 2011 11:22:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187Ab1EaLWj (ORCPT ); Tue, 31 May 2011 07:22:39 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:41566 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290Ab1EaLWj convert rfc822-to-8bit (ORCPT ); Tue, 31 May 2011 07:22:39 -0400 Received: by wwa36 with SMTP id 36so4754295wwa.1 for ; Tue, 31 May 2011 04:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=uufGeDO7s6PBBvwRkSX1hUBQPkwGzqUDoIx7X9JeRy0=; b=U1DCe900VCmJGDCOKTYXyVSleJa8f1ClGLNZGsN5bGEe9UEXYN3WiW2Ptnt+yd6gZa 7mjXBkrjNvooTEsW8hWdUWAPqEluRwmXUtOwhVkK2nFcNuTe9rTMS0vA25LeXJvhQapi /8r4jicjSmPWbSn0Wnuoae1ryo/ee4amGU4Es= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=LBD4IQ+uCkeQbswomNp/wsTIc9cjVWjW3r+2JO+uAWLptJAuNYjcwWlU/X7EDothaZ 66SD9RiFw1gt2pALG/j+w4jBnupyYp7jFB4xGQb0Snx5CwkdlvZcf3sSQW4NcfuR5FQQ EWenobscqi3NkxBmqKBnLgQ/X8zQKfBccZzl0= MIME-Version: 1.0 Received: by 10.216.236.208 with SMTP id w58mr3387004weq.62.1306840957999; Tue, 31 May 2011 04:22:37 -0700 (PDT) Received: by 10.217.5.132 with HTTP; Tue, 31 May 2011 04:22:37 -0700 (PDT) In-Reply-To: <4DE273B0.7000800@redhat.com> References: <20110529085726.c0234647.rdunlap@xenotime.net> <4DE273B0.7000800@redhat.com> Date: Tue, 31 May 2011 04:22:37 -0700 X-Google-Sender-Auth: is-uLYsKH4PRY4WZcc5h2BI5Ou8 Message-ID: Subject: Re: vector_size attribute? From: Christopher Li To: Avi Kivity Cc: Randy Dunlap , linux-sparse@vger.kernel.org Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 11:22:40 +0000 (UTC) On Sun, May 29, 2011 at 9:26 AM, Avi Kivity 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 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 --- 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 --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 + */ +