File:  [gforth] / gforth / Attic / cache.c
Revision 1.1: download - view: text, annotated - select for diffs
Tue Oct 4 17:50:00 1994 UTC (24 years, 9 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Cache flush for PA-RISC (HPUX doesn't provide)

void *cacheflush(void * address, int size, int linewidth)
{
	int i;

	address=(void *)((int)address & (-linewidth));

	for(i=4-linewidth; i<size; i+=linewidth)
		asm("\
		fdc (%r28)\n\
		sync\n\
		fic,m %r24(%r28)\n\
		sync");

	return address;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>