aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 21:50:04 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 21:50:04 +0000
commitb516f85ca80008bedc3169e22652dcd710008125 (patch)
treea1cc7df15359b6bbf2e24420c3e66c80a9c1d6d4 /cpu-exec.c
parent1e4fe7cee25d12d1ecbf9bc2790246b90fede0b1 (diff)
simpler second page physical address test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@553 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 817200823d..f0fa722cab 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -295,8 +295,9 @@ int cpu_exec(CPUState *env1)
tb->cs_base == (unsigned long)cs_base &&
tb->flags == flags) {
/* check next page if needed */
- virt_page2 = ((unsigned long)pc + tb->size - 1) & TARGET_PAGE_MASK;
- if (((unsigned long)pc & TARGET_PAGE_MASK) != virt_page2) {
+ if (tb->page_addr[1] != -1) {
+ virt_page2 = ((unsigned long)pc & TARGET_PAGE_MASK) +
+ TARGET_PAGE_SIZE;
phys_page2 = get_phys_addr_code(env, virt_page2);
if (tb->page_addr[1] == phys_page2)
goto found;