File:  [gforth] / gforth / Attic / cache.c
Revision 1.2: download - view: text, annotated - select for diffs
Thu Oct 12 20:43:24 1995 UTC (28 years, 5 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Fixed problems with hppa.h
Made engine.c compile  without warning
rewrote cache.c for hppa.h with true asm template.

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

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

  for(i=1-linewidth; i<size; i+=linewidth)
    asm volatile("fdc (%0)\n\t"
		 "sync\n\t"
		 "fic,m %1(%0)\n\t"
		 "sync" : : "r" (address), "r" (linewidth) : "memory" );
}

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