From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNPFv-0003MQ-Je for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:42:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNPFm-0006Pi-It for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:42:31 -0400 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:51169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNPFm-0006Pa-FJ for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:42:22 -0400 Received: by mail-qg0-f52.google.com with SMTP id z60so2463078qgd.25 for ; Fri, 29 Aug 2014 09:42:21 -0700 (PDT) Sender: Richard Henderson Message-ID: <5400AD69.5040706@twiddle.net> Date: Fri, 29 Aug 2014 09:42:17 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1409311292-18860-1-git-send-email-peter.maydell@linaro.org> <1409311292-18860-6-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1409311292-18860-6-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/10] target-arm: Implement setting of watchpoints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?ISO-8859-1?Q?Andreas_F=E4rber?= , patches@linaro.org On 08/29/2014 04:21 AM, Peter Maydell wrote: > + /* Watchpoint covers an aligned area up to 2GB in size */ > + len = 1ULL << mask; > + /* If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE > + * whether the watchpoint fires when the unmasked bits match; we opt > + * to generate the exceptions. > + */ > + wvr &= (len - 1); This looks funny... address being clipped to length? Surely it's ~(len - 1)... r~