This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: [patch 3/4] Fix hw watchpoints #2: reordered / simultaneously hit


On Tue, 17 Nov 2009 15:11:39 +0100, Joel Brobecker wrote:
> > ??? Why?  What's wrong with bitfields that we should avoid them?
> 
> It makes access to the field more difficult and require more instructions.

While true...

 0000000000000000 <get>:
    0:  0f b6 47 04             movzbl 0x4(%rdi),%eax
+   4:  83 e0 01                and    $0x1,%eax
        c3                      retq   
 
 0000000000000010 <set>:
-  10:  c6 47 04 01             movb   $0x1,0x4(%rdi)
+  10:  80 4f 04 01             orb    $0x1,0x4(%rdi)

... one may miss turning it to a flag for sharing the byte for other flags in
future possibly creating the struct needlessly larger.

But OK.


Regards,
Jan


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