This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCHv2 1/2] Add is_executable to Dwfl_Module.

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)
  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)

--- Begin Message ---
[<email.message.Message instance at 0x2b6d878>]

--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]