diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-02-10 22:00:27 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-02-10 22:00:27 +0000 |
commit | 0a962c0276f668a5c06948b83a8def0b8d596985 (patch) | |
tree | a9fdab16812cbb80733711d33b4481941a3a2457 /cpu-all.h | |
parent | d993e0260bf7a200df348a2fb0c5a6efa885987d (diff) |
dirty flag changes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1281 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-all.h')
-rw-r--r-- | cpu-all.h | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -109,9 +109,11 @@ static inline void tswap64s(uint64_t *s) #if TARGET_LONG_SIZE == 4 #define tswapl(s) tswap32(s) #define tswapls(s) tswap32s((uint32_t *)(s)) +#define bswaptls(s) bswap32s(s) #else #define tswapl(s) tswap64(s) #define tswapls(s) tswap64s((uint64_t *)(s)) +#define bswaptls(s) bswap64s(s) #endif /* NOTE: arm FPA is horrible as double 32 bit words are stored in big @@ -733,18 +735,27 @@ void stl_phys(target_phys_addr_t addr, uint32_t val); int cpu_memory_rw_debug(CPUState *env, target_ulong addr, uint8_t *buf, int len, int is_write); +#define VGA_DIRTY_FLAG 0x01 + /* read dirty bit (return 0 or 1) */ static inline int cpu_physical_memory_is_dirty(target_ulong addr) { - return phys_ram_dirty[addr >> TARGET_PAGE_BITS]; + return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; +} + +static inline int cpu_physical_memory_get_dirty(target_ulong addr, + int dirty_flags) +{ + return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; } static inline void cpu_physical_memory_set_dirty(target_ulong addr) { - phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 1; + phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; } -void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end); +void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end, + int dirty_flags); void dump_exec_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); |