aboutsummaryrefslogtreecommitdiff
path: root/exec-all.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-01-01 21:15:42 +0200
committerAvi Kivity <avi@redhat.com>2012-01-04 13:34:49 +0200
commit1d393fa2d1c16021c840e5d37f7ff74341b7c884 (patch)
tree2209ca1ed0e7db577731df5d6390b22a53dfe524 /exec-all.h
parent2774c6d0ae20d32d75f77e7ed063ddbb854ca4c5 (diff)
Avoid range comparisons on io index types
The code sometimes uses range comparisons on io indexes (e.g. index =< IO_MEM_ROM). Avoid these as they make moving to objects harder. Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'exec-all.h')
-rw-r--r--exec-all.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec-all.h b/exec-all.h
index 23c4598263..7db22fbc9e 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -354,7 +354,7 @@ static inline tb_page_addr_t get_page_addr_code(CPUState *env1, target_ulong add
ldub_code(addr);
}
pd = env1->tlb_table[mmu_idx][page_index].addr_code & ~TARGET_PAGE_MASK;
- if (pd > IO_MEM_ROM && !(pd & IO_MEM_ROMD)) {
+ if (pd != IO_MEM_RAM && pd != IO_MEM_ROM && !(pd & IO_MEM_ROMD)) {
#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SPARC)
cpu_unassigned_access(env1, addr, 0, 1, 0, 4);
#else