Flushing the d-cache (was Re: BFD relocations)

Andreas Schwab schwab@suse.de
Fri Jun 14 13:10:00 GMT 2002


Camm Maguire <camm@enhanced.com> writes:

|> m68k:
|> #include <asm/cachectl.h>
|> #define CLEAR_CACHE do {\
|> 	void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \
|> 	for (;v<ve;v+=16)   \
|> 		sys_cacheflush(v,FLUSH_SCOPE_LINE,FLUSH_CACHE_DATA,16);\
|> 	} while(0)

The comment from Philip applies here as well: no need for the loop.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list