Commit b5e19d4ce7a1af127ee3c84bd724594904f0f173

Authored by edgar_igl
1 parent 17ac9754

Make the paged properties of the tb-jmp-cache hash function work for TARGET_PAGE_BITS != 12.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4351 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
exec-all.h
@@ -191,15 +191,15 @@ static inline unsigned int tb_jmp_cache_hash_page(target_ulong pc) @@ -191,15 +191,15 @@ static inline unsigned int tb_jmp_cache_hash_page(target_ulong pc)
191 { 191 {
192 target_ulong tmp; 192 target_ulong tmp;
193 tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)); 193 tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS));
194 - return (tmp >> TB_JMP_PAGE_BITS) & TB_JMP_PAGE_MASK; 194 + return (tmp >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)) & TB_JMP_PAGE_MASK;
195 } 195 }
196 196
197 static inline unsigned int tb_jmp_cache_hash_func(target_ulong pc) 197 static inline unsigned int tb_jmp_cache_hash_func(target_ulong pc)
198 { 198 {
199 target_ulong tmp; 199 target_ulong tmp;
200 tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)); 200 tmp = pc ^ (pc >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS));
201 - return (((tmp >> TB_JMP_PAGE_BITS) & TB_JMP_PAGE_MASK) |  
202 - (tmp & TB_JMP_ADDR_MASK)); 201 + return (((tmp >> (TARGET_PAGE_BITS - TB_JMP_PAGE_BITS)) & TB_JMP_PAGE_MASK)
  202 + | (tmp & TB_JMP_ADDR_MASK));
203 } 203 }
204 204
205 static inline unsigned int tb_phys_hash_func(unsigned long pc) 205 static inline unsigned int tb_phys_hash_func(unsigned long pc)