From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42129 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJfaA-0001xm-W6 for qemu-devel@nongnu.org; Wed, 02 Jun 2010 00:29:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJfa9-0007Ok-Uc for qemu-devel@nongnu.org; Wed, 02 Jun 2010 00:29:34 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:21739) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJfa9-0007Of-OU for qemu-devel@nongnu.org; Wed, 02 Jun 2010 00:29:33 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1186509fgg.10 for ; Tue, 01 Jun 2010 21:29:32 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C057114.7000308@twiddle.net> References: <20100601200434.5908.19495.stgit@skyserv> <20100601201227.5908.12931.stgit@skyserv> <4C057114.7000308@twiddle.net> Date: Wed, 2 Jun 2010 08:29:32 +0400 Message-ID: Subject: Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking From: Igor Kovalenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Wed, Jun 2, 2010 at 12:44 AM, Richard Henderson wrote: > On 06/01/2010 01:12 PM, Igor V. Kovalenko wrote: >> + =A0 =A0if ((env->pstate & PS_AM) && is_translating_asi(asi)) { >> + =A0 =A0 =A0 =A0addr &=3D 0xffffffffULL; >> + =A0 =A0} > > I suggest that these be written instead as > > =A0if (is_translating_asi(asi)) { > =A0 =A0addr =3D address_mask(addr); > =A0} > > That should allow you to remove some of the ifdefs. All address masking is done for sparc64 target only, sparc32 does not have the notion of translating asi. I think it's better to do debug printf macro trick then but I see no real benefit at the moment. --=20 Kind regards, Igor V. Kovalenko