Commit b516f85ca80008bedc3169e22652dcd710008125
1 parent
1e4fe7ce
simpler second page physical address test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@553 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
2 deletions
cpu-exec.c
... | ... | @@ -295,8 +295,9 @@ int cpu_exec(CPUState *env1) |
295 | 295 | tb->cs_base == (unsigned long)cs_base && |
296 | 296 | tb->flags == flags) { |
297 | 297 | /* check next page if needed */ |
298 | - virt_page2 = ((unsigned long)pc + tb->size - 1) & TARGET_PAGE_MASK; | |
299 | - if (((unsigned long)pc & TARGET_PAGE_MASK) != virt_page2) { | |
298 | + if (tb->page_addr[1] != -1) { | |
299 | + virt_page2 = ((unsigned long)pc & TARGET_PAGE_MASK) + | |
300 | + TARGET_PAGE_SIZE; | |
300 | 301 | phys_page2 = get_phys_addr_code(env, virt_page2); |
301 | 302 | if (tb->page_addr[1] == phys_page2) |
302 | 303 | goto found; | ... | ... |