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: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 4/4] slice: display the source's size, like for unops
Date: Fri, 26 Feb 2021 00:39:08 +0100	[thread overview]
Message-ID: <20210225233908.97275-5-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20210225233908.97275-1-luc.vanoostenryck@gmail.com>

When displaying an OP_SLICE, the width is shown but the size
of the source pseudo is useful to. So display the it, like
done for unops.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 linearize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linearize.c b/linearize.c
index 7ab69d3ac968..b06c062599ee 100644
--- a/linearize.c
+++ b/linearize.c
@@ -470,7 +470,7 @@ const char *show_instruction(struct instruction *insn)
 		break;
 
 	case OP_SLICE:
-		buf += sprintf(buf, "%s <- %s, %d", show_pseudo(insn->target), show_pseudo(insn->src), insn->from);
+		buf += sprintf(buf, "%s <- (%d) %s, %d", show_pseudo(insn->target), type_size(insn->orig_type), show_pseudo(insn->src), insn->from);
 		break;
 
 	case OP_NOT: case OP_NEG:
-- 
2.30.0


  parent reply	other threads:[~2021-02-25 23:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 23:39 [PATCH 0/4] small reorganization of OP_SLICE Luc Van Oostenryck
2021-02-25 23:39 ` [PATCH 1/4] slice: remove unneeded len from OP_SLICE Luc Van Oostenryck
2021-02-26 23:46   ` Ramsay Jones
2021-02-25 23:39 ` [PATCH 2/4] slice: remove unneeded nr_nrbits from EXPR_SLICE Luc Van Oostenryck
2021-02-25 23:39 ` [PATCH 3/4] slice: OP_SLICE needs the source's type: make it a kind of unop Luc Van Oostenryck
2021-02-26 23:56   ` Ramsay Jones
2021-02-28 21:40     ` Luc Van Oostenryck
2021-02-25 23:39 ` Luc Van Oostenryck [this message]
2021-02-27  0:04   ` [PATCH 4/4] slice: display the source's size, like for unops Ramsay Jones

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=20210225233908.97275-5-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).