sim: arm/bfin/rx: undefine page size from system headers

Some targets (like cygwin) will export page size defines that clash
with our local usage here.  Undefine the system one to fix building
for these targets.
This commit is contained in:
Mike Frysinger 2021-11-06 20:40:20 -04:00
parent b44c5d6e21
commit fd0975b96b
3 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,7 @@
#endif
#undef PAGESIZE /* Cleanup system headers. */
#define NUMPAGES 64 * 1024
#define PAGESIZE 64 * 1024
#define PAGEBITS 16

View File

@ -21,6 +21,8 @@
#ifndef DV_BFIN_MMU_H
#define DV_BFIN_MMU_H
#undef PAGE_SIZE /* Cleanup system headers. */
void mmu_check_addr (SIM_CPU *, bu32 addr, bool write, bool inst, int size);
void mmu_check_cache_addr (SIM_CPU *, bu32 addr, bool write, bool inst);
void mmu_process_fault (SIM_CPU *, bu32 addr, bool write, bool inst, bool unaligned, bool miss);

View File

@ -37,6 +37,8 @@ void init_mem (void);
void mem_usage_stats (void);
unsigned long mem_usage_cycles (void);
#undef PAGE_SIZE /* Cleanup system headers. */
/* rx_mem_ptr returns a pointer which is valid as long as the address
requested remains within the same page. */
#define PAGE_BITS 12