diff options
author | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-06 08:38:22 +0000 |
---|---|---|
committer | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-06 08:38:22 +0000 |
commit | b5e19d4ce7a1af127ee3c84bd724594904f0f173 (patch) | |
tree | 2eac67f0dd08aae100a5ca835790fbcd4cb4b1c5 /exec-all.h | |
parent | 17ac975463baf6cd70538dcb741549262bdab590 (diff) |
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
Diffstat (limited to 'exec-all.h')
-rw-r--r-- | exec-all.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exec-all.h b/exec-all.h index d98b91d3f3..d4dea1dc86 100644 --- a/exec-all.h +++ b/exec-all.h @@ -191,15 +191,15 @@ static inline unsigned int tb_jmp_cache_hash_page(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; + 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) |