[PATCHv2 1/2] Add is_executable to Dwfl_Module.
Jan Kratochvil
jan.kratochvil at redhat.com
Wed Sep 10 19:22:41 UTC 2014
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
-------------- next part --------------
An embedded message was scrubbed...
From: Jan Kratochvil <jan.kratochvil at redhat.com>
Subject: [PATCH] Add is_executable to Dwfl_Module.
Date: Tue, 9 Sep 2014 22:58:26 +0200
Size: 3701
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20140910/b4517ef3/attachment.mht>
More information about the elfutils-devel
mailing list