linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Christopher Li <sparse@chrisli.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH v2 0/3] builtins expansion
Date: Sun, 12 Feb 2017 16:10:57 +0100	[thread overview]
Message-ID: <20170212151100.15868-1-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170212150332.33xlxmzohgb7hrpp@macpro.local>

This serie solves the problem of the expansion of some builtins
like __builtin_bswap16() which gcc consider as an integer constant
expression when the arg is itself an integer constant.
Such builtins are used as such in the kernel and their non-expansion
create undesirable warnings from sparse.

This serie needs to be applied on top of Johannes Berg's patch
concerning the same problem and the tests depend on the testsuite
extensions posted previously.

Change since v1:
- simpler and more generic way to share the eval/expand ops
  thanks to Christopher Li
- small changes in the log messages
- change the variable name in the bswap expansion method.
- small reorganization of the test files

Luc Van Oostenryck (3):
  move evaluation & expansion of builtins in a separate file
  let identical symbols share their evaluate/expand methods
  expand __builtin_bswap*() with constant args

 Makefile                                           |   1 +
 builtin.c                                          | 240 +++++++++++++++++++++
 expand.c                                           |  24 +--
 expand.h                                           |  34 +++
 lib.c                                              |  35 +--
 lib.h                                              |   5 +
 parse.c                                            |   4 +-
 symbol.c                                           | 160 +-------------
 symbol.h                                           |   3 +-
 validation/builtin-args-checking.c                 |  45 ++++
 ...in-constant-eval.c => builtin-bswap-constant.c} |   2 +-
 validation/builtin-bswap-variable.c                |  32 +++
 12 files changed, 367 insertions(+), 218 deletions(-)
 create mode 100644 builtin.c
 create mode 100644 expand.h
 create mode 100644 validation/builtin-args-checking.c
 rename validation/{builtin-constant-eval.c => builtin-bswap-constant.c} (93%)
 create mode 100644 validation/builtin-bswap-variable.c

-- 
2.11.0


  reply	other threads:[~2017-02-12 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 21:37 [PATCH 0/3] builtins expansion Luc Van Oostenryck
2017-01-23 21:37 ` [PATCH 1/3] move evaluation & expansion of builtins in a separate file Luc Van Oostenryck
2017-01-23 21:37 ` [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods Luc Van Oostenryck
2017-02-07 19:49   ` Chris Li
2017-02-07 20:12     ` Luc Van Oostenryck
2017-02-07 20:26       ` Chris Li
2017-02-07 20:32       ` Christopher Li
2017-02-07 21:34         ` Luc Van Oostenryck
2017-02-07 22:19           ` Christopher Li
2017-02-12 15:03     ` Luc Van Oostenryck
2017-02-12 15:10       ` Luc Van Oostenryck [this message]
2017-02-12 15:10         ` [PATCH v2 1/3] move evaluation & expansion of builtins in a separate file Luc Van Oostenryck
2017-02-12 15:10         ` [PATCH v2 2/3] let identical symbols share their evaluate/expand methods Luc Van Oostenryck
2017-02-12 15:11         ` [PATCH v2 3/3] expand __builtin_bswap*() with constant args Luc Van Oostenryck
2017-02-13  1:54         ` [PATCH v2 0/3] builtins expansion Christopher Li
2017-02-12 23:35       ` [PATCH 2/3] allow builtins to have prototype and evaluate/expand methods Chris Li
2017-01-23 21:37 ` [PATCH 3/3] expand __builtin_bswap*() with constant args Luc Van Oostenryck

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=20170212151100.15868-1-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=johannes@sipsolutions.net \
    --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).