aboutsummaryrefslogtreecommitdiff
path: root/softmmu_template.h
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu_template.h')
-rw-r--r--softmmu_template.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/softmmu_template.h b/softmmu_template.h
index 726744c814..f105d0d594 100644
--- a/softmmu_template.h
+++ b/softmmu_template.h
@@ -22,6 +22,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu-timer.h"
+#include "memory.h"
#define DATA_SIZE (1 << SHIFT)
@@ -65,8 +66,9 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
index = (physaddr >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1);
physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
env->mem_io_pc = (unsigned long)retaddr;
- if (index != IO_MEM_RAM && index != IO_MEM_ROM
- && index != IO_MEM_UNASSIGNED && index != IO_MEM_NOTDIRTY
+ if (index != io_mem_ram.ram_addr && index != io_mem_rom.ram_addr
+ && index != io_mem_unassigned.ram_addr
+ && index != io_mem_notdirty.ram_addr
&& !can_do_io(env)) {
cpu_io_recompile(env, retaddr);
}
@@ -208,8 +210,9 @@ static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
int index;
index = (physaddr >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1);
physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
- if (index != IO_MEM_RAM && index != IO_MEM_ROM
- && index != IO_MEM_UNASSIGNED && index != IO_MEM_NOTDIRTY
+ if (index != io_mem_ram.ram_addr && index != io_mem_rom.ram_addr
+ && index != io_mem_unassigned.ram_addr
+ && index != io_mem_notdirty.ram_addr
&& !can_do_io(env)) {
cpu_io_recompile(env, retaddr);
}