# HG changeset patch # User nkeynes # Date 1200476267 0 # Node ID 045ba6eb6df1c650cd672b0f8d443b457bd72b73 # Parent 978ec0b3354502785ac99269a12eec28d5d5f6a2 Fix vma lookups after itlb exception --- a/src/sh4/sh4core.h Wed Jan 16 09:37:08 2008 +0000 +++ b/src/sh4/sh4core.h Wed Jan 16 09:37:47 2008 +0000 @@ -65,6 +65,12 @@ */ #define GET_ICACHE_PHYS(addr) (sh4_icache.page_ppa + ((addr)-sh4_icache.page_vma)) +/** + * Return the virtual (vma) address for the first address past the end of the + * cache entry. Assumes that there is in fact a current icache entry. + */ +#define GET_ICACHE_END() (sh4_icache.page_vma + (~sh4_icache.mask) + 1) + /* SH4 module functions */ void sh4_init( void ); void sh4_reset( void );