From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8644 invoked by alias); 17 Nov 2009 15:31:13 -0000 Received: (qmail 8630 invoked by uid 22791); 17 Nov 2009 15:31:12 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Nov 2009 15:30:07 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAHFTLcU002944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Nov 2009 10:29:22 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAHFTHB5029374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Nov 2009 10:29:21 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nAHFTHiv030562; Tue, 17 Nov 2009 16:29:17 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nAHFTC4N030561; Tue, 17 Nov 2009 16:29:12 +0100 Date: Tue, 17 Nov 2009 15:31:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [patch 3/4] Fix hw watchpoints #2: reordered / simultaneously hit Message-ID: <20091117152912.GA29979@host0.dyn.jankratochvil.net> References: <20091116034156.GD22701@host0.dyn.jankratochvil.net> <20091117001056.GE4557@adacore.com> <83k4xpn6hz.fsf@gnu.org> <20091117141139.GA5266@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091117141139.GA5266@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00386.txt.bz2 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 : 0: 0f b6 47 04 movzbl 0x4(%rdi),%eax + 4: 83 e0 01 and $0x1,%eax c3 retq 0000000000000010 : - 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