On 10/16/2011 06:51 PM, Blue Swirl wrote: > Remove target dependencies and compile Cirrus VGA in hwlib. > > > +#define CIRRUS_PAGE_SIZE 4096 > +#define CIRRUS_PAGE_MASK (CIRRUS_PAGE_SIZE - 1)
This is inverted from TARGET_PAGE_MASK. > + > #define BLTUNSAFE(s) \ > ( \ > ( /* check dst is within bounds */ \ > @@ -618,7 +621,7 @@ static void > cirrus_invalidate_region(CirrusVGAState * s, int off_begin, > for (y = 0; y < lines; y++) { > off_cur = off_begin; > off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask; > - off_cur &= TARGET_PAGE_MASK; > + off_cur &= CIRRUS_PAGE_MASK; > memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - > off_cur); > off_begin += off_pitch; > } You can just drop this masking (and CIRRUS_PAGE_SIZE), provided that cpu_physical_memory_range_set_dirty() accepts unaligned addresses. -- error compiling committee.c: too many arguments to function