From: Jeff Law <law@redhat.com>
To: Martin Sebor <msebor@gmail.com>, Michael Matz <matz@suse.de>
Cc: Segher Boessenkool <segher@kernel.crashing.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] final: Improve output for -dp and -fverbose-asm
Date: Fri, 01 Dec 2017 00:32:00 -0000 [thread overview]
Message-ID: <c7cb1089-fa8f-775e-fc9c-aecf9e263123@redhat.com> (raw)
In-Reply-To: <bcdc096b-4120-a132-0aaa-a14bfddb602b@gmail.com>
On 11/30/2017 10:55 AM, Martin Sebor wrote:
> On 11/30/2017 10:02 AM, Michael Matz wrote:
>> Hi,
>>
>> On Thu, 30 Nov 2017, Martin Sebor wrote:
>>
>>>> Â Â Â Â Â Â Â addic 4,9,-1Â Â Â Â # 70Â Â [c=4 l=4]Â *adddi3_imm_carry_m1
>>>> Â Â Â Â Â Â Â subfe 4,4,9Â Â Â Â Â # 71Â Â [c=4 l=4]Â *subfdi3_carry_in_internal
>>>> Â Â Â Â Â Â Â b .L5Â Â Â Â Â Â Â Â Â Â Â # 81Â Â [c=4 l=4]Â jump
>>>
>>> Not everyone who reads the verbose assembly is familiar with
>>> GCC internals. Users read it to help debug problems in their
>>> code. They shouldn't have to also study GCC source code to
>>> understand what the contents mean.
>>
>> Um, I think that's a bit overactive. How would you know what
>> adddi3_imm_carry_m1 really means without knowing the particular GCC
>> backend? Or what the above magic number after # means?
>
> adddi3_imm_carry_m1 seems (mostly) self-explanatory since it's
> built up of common assembly mnemonics. I confess I don't know
> what the number after # means, either on powerpc64 or on any
> other target. I'd say that just shows that not even full time
> GCC developers are (or can be expected to be) familiar with all
> GCC internals, and we shouldn't need to study the back end code
> to interpret basic things like # 7 in the output.
FTR the number the instruction is the insn's UID :-)
Also note that whether or not an instruction has a human readable
mnemonic is dependent on the target -- many don't have names for the
bulk of their insns or the names are fairly cryptic.
Ultimately fully understanding that data will always require a fairly
good understanding of GCC and the target.
>
>> Or, for that matter, what "length" means? Could be byte-length, sure.
>> But OTOH, for a RISC target it's always four, so why print it? The GCC
>> developers surely meant cycle-length with that, nothing else makes sense.
>
> Heh. I thought it meant the length of the instruction in bytes,
> and it made perfect sense to me. Sounds like I misinterpreted it.
> Which suggests that it should be mentioned in the manual (whatever
> label it ends up with). With it documented (and the position on
> the line made clear), the length= or l= part could even be skipped
> altogether to save a few more bytes if that's important (I don't
> think it is in this case).
It's *supposed* to be bytes. However, some targets may not have made
the conversion from instructions to bytes.
Jeff
next prev parent reply other threads:[~2017-12-01 0:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 23:37 Segher Boessenkool
2017-11-30 7:52 ` Martin Sebor
2017-11-30 11:54 ` Segher Boessenkool
2017-11-30 16:06 ` Michael Matz
2017-11-30 16:36 ` Martin Sebor
2017-11-30 16:50 ` Segher Boessenkool
2017-11-30 17:02 ` Martin Sebor
2017-11-30 17:14 ` Michael Matz
2017-11-30 17:55 ` David Malcolm
2017-12-04 15:49 ` Michael Matz
2017-11-30 17:55 ` Martin Sebor
2017-12-01 0:32 ` Jeff Law [this message]
2017-12-01 22:52 ` Segher Boessenkool
2017-12-04 12:39 ` Michael Matz
2017-11-30 17:15 ` Segher Boessenkool
2017-11-30 22:59 ` Martin Sebor
2017-12-01 0:26 ` Jeff Law
2017-12-01 0:49 ` Jeff Law
2017-12-01 23:45 ` Segher Boessenkool
2017-11-30 16:44 ` Kyrill Tkachov
2017-11-30 16:54 ` Michael Matz
2017-11-30 16:55 ` Kyrill Tkachov
2017-11-30 17:07 ` Michael Matz
2017-12-01 0:22 ` Jeff Law
2017-12-01 0:25 ` Jeff Law
2017-12-01 1:17 ` Jeff Law
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=c7cb1089-fa8f-775e-fc9c-aecf9e263123@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=matz@suse.de \
--cc=msebor@gmail.com \
--cc=segher@kernel.crashing.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 read-only IMAP folder(s) and NNTP newsgroup(s).