From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8499531847216142620==" MIME-Version: 1.0 From: Jan Kratochvil 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 Message-ID: <20140910192241.GA14014@host2.jankratochvil.net> In-Reply-To: 1410375408.27502.25.camel@bordewijk.wildebeest.org --===============8499531847216142620== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 cha= r' 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 h= ave 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 --===============8499531847216142620== Content-Type: message/rfc822 MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.mht" WzxlbWFpbC5tZXNzYWdlLk1lc3NhZ2UgaW5zdGFuY2UgYXQgMHgyYjZkODc4Pl0= --===============8499531847216142620==--