Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtIgs-0005lR-0j for qemu-devel@nongnu.org; Tue, 06 May 2008 04:38:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtIgr-0005kQ-4F for qemu-devel@nongnu.org; Tue, 06 May 2008 04:38:25 -0400 Received: from [199.232.76.173] (port=47421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtIgq-0005kF-Bb for qemu-devel@nongnu.org; Tue, 06 May 2008 04:38:24 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JtIgq-0001Bt-8V for qemu-devel@nongnu.org; Tue, 06 May 2008 04:38:24 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JtIgp-0005aa-8a for qemu-devel@nongnu.org; Tue, 06 May 2008 08:38:23 +0000 Received: from edgar_igl by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JtIgp-0005aV-20 for qemu-devel@nongnu.org; Tue, 06 May 2008 08:38:23 +0000 MIME-Version: 1.0 Errors-To: edgar_igl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "Edgar E. Iglesias" Message-Id: Date: Tue, 06 May 2008 08:38:23 +0000 Subject: [Qemu-devel] [4351] Make the paged properties of the tb-jmp-cache hash function work for TARGET_PAGE_BITS ! = 12. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4351 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4351 Author: edgar_igl Date: 2008-05-06 08:38:22 +0000 (Tue, 06 May 2008) Log Message: ----------- Make the paged properties of the tb-jmp-cache hash function work for TARGET_PAGE_BITS != 12. Modified Paths: -------------- trunk/exec-all.h Modified: trunk/exec-all.h =================================================================== --- trunk/exec-all.h 2008-05-06 08:30:15 UTC (rev 4350) +++ trunk/exec-all.h 2008-05-06 08:38:22 UTC (rev 4351) @@ -191,15 +191,15 @@ { 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; } static inline unsigned int tb_jmp_cache_hash_func(target_ulong pc) { target_ulong tmp; tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)); - return (((tmp >> TB_JMP_PAGE_BITS) & TB_JMP_PAGE_MASK) | - (tmp & TB_JMP_ADDR_MASK)); + return (((tmp >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)) & TB_JMP_PAGE_MASK) + | (tmp & TB_JMP_ADDR_MASK)); } static inline unsigned int tb_phys_hash_func(unsigned long pc)