From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtNlH-00038w-3L for qemu-devel@nongnu.org; Tue, 06 May 2008 10:03:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtNlD-000347-AU for qemu-devel@nongnu.org; Tue, 06 May 2008 10:03:18 -0400 Received: from [199.232.76.173] (port=35116 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtNlC-00033c-U5 for qemu-devel@nongnu.org; Tue, 06 May 2008 10:03:14 -0400 Received: from miranda.se.axis.com ([193.13.178.8]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JtNlB-0007ib-NH for qemu-devel@nongnu.org; Tue, 06 May 2008 10:03:14 -0400 Received: from axis.com (edgar.se.axis.com [10.93.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m46E3AjX026278 for ; Tue, 6 May 2008 16:03:10 +0200 Date: Tue, 6 May 2008 16:03:10 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [4351] Make the paged properties of the tb-jmp-cache hash function work for TARGET_PAGE_BITS ! = 12. Message-ID: <20080506140310.GG26816@edgar.se.axis.com> References: <200805061331.03281.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805061331.03281.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: "Edgar E. Iglesias" , qemu-devel@nongnu.org On Tue, May 06, 2008 at 01:31:02PM +0100, Paul Brook wrote: > > { > > target_ulong tmp; > > tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)); > > - return (tmp >> TB_JMP_PAGE_BITS) & TB_JMP_PAGE_MASK; > > + return (tmp >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)) & > > TB_JMP_PAGE_MASK; } > > > I'm not sure what you're trying to achieve here, but this is definitely wrong. > TARGET_PAGE_BITS may be less than TB_JMP_PAGE_BITS. Hi Paul, Thanks for the comment. I didn't find any page bits under 10 in the tree. Please note that the constant beeing used is not TB_JMP_CACHE_BITS but TB_JMP_PAGE_BITS. Also that same right shift constant was already used in the initial shift of pc in that same routine. Before committing I ran tests with target page bits 10, 11, 12, and 13 and the modified hash function behaved ok here. Are there more setups I should test ? Best regards -- Edgar E. Iglesias Axis Communications AB