This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 3/4] Fix hw watchpoints #2: reordered / simultaneously hit
> Date: Tue, 17 Nov 2009 16:29:12 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
>
> 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)
This is what I remembered, at least for x86. A single additional
instruction can hardly cause any visible slowdown, at least not with
access patterns typical for such flags.
Any other reasons not to use bitfields?