public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: [PATCHv2 1/2] Add is_executable to Dwfl_Module.
Date: Wed, 10 Sep 2014 21:22:41 +0200	[thread overview]
Message-ID: <20140910192241.GA14014@host2.jankratochvil.net> (raw)
In-Reply-To: 1410375408.27502.25.camel@bordewijk.wildebeest.org

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

On Wed, 10 Sep 2014 20:56:48 +0200, Mark Wielaard wrote:
> I don't think it is very helpful or productive to refuse to have a
> technical opinion on a fair question about a code change you are
> proposing.

By ": 1" I give a promise to compiler I will use only its single bit.
Smart compiler with -fwhole-program, -flto etc. could make it 'unsigned char'
when the struct is not externally visible and therefore ABI-constrained.

But I see in real world the -O2 x86_64 'bool:1' code is much more horrible
compared to plain 'bool' than I expected, so when we already discuss it I have
changed it to 'bool'.
  400406:       88 44 24 e9             mov    %dl,-0x17(%rsp)
vs.
  400400:       0f b6 44 24 e8          movzbl -0x18(%rsp),%eax
  40040b:       c1 e2 03                shl    $0x3,%edx
  40040e:       83 e0 f7                and    $0xfffffff7,%eax
  400411:       09 d0                   or     %edx,%eax
  400413:       88 44 24 e8             mov    %al,-0x18(%rsp)


Thanks,
Jan

[-- Attachment #2: attachment.mht --]
[-- Type: message/rfc822, Size: 47 bytes --]


WzxlbWFpbC5tZXNzYWdlLk1lc3NhZ2UgaW5zdGFuY2UgYXQgMHgyYjZkODc4Pl0=

             reply	other threads:[~2014-09-10 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 19:22 Jan Kratochvil [this message]
2014-09-10 20:33 Mark Wielaard

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=20140910192241.GA14014@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.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).