From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33031 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJYK4-0000iv-4g for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJYK2-00034y-MS for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:44:27 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:64493) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJYK2-00034r-Ii for qemu-devel@nongnu.org; Tue, 01 Jun 2010 16:44:26 -0400 Received: by vws15 with SMTP id 15so1450532vws.4 for ; Tue, 01 Jun 2010 13:44:25 -0700 (PDT) Sender: Richard Henderson Message-ID: <4C057114.7000308@twiddle.net> Date: Tue, 01 Jun 2010 13:44:04 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking References: <20100601200434.5908.19495.stgit@skyserv> <20100601201227.5908.12931.stgit@skyserv> In-Reply-To: <20100601201227.5908.12931.stgit@skyserv> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Igor V. Kovalenko" Cc: qemu-devel@nongnu.org On 06/01/2010 01:12 PM, Igor V. Kovalenko wrote: > + if ((env->pstate & PS_AM) && is_translating_asi(asi)) { > + addr &= 0xffffffffULL; > + } I suggest that these be written instead as if (is_translating_asi(asi)) { addr = address_mask(addr); } That should allow you to remove some of the ifdefs. r~