I have been writing a program involving run-time code generation on an
R4000 Indigo. I use the cacheflush system call but my program dies and
leaves a core if I use cacheflush( address, length, ICACHE ) whereas it
runs fine if either DCACHE | BCACHE is specified. Am I supposed to flush the
Instruction cache and only the Instruction cache alone? My program sorta
works like this.
unsigned foo[1024]; /* aligned to VM page boundary */
typedef (*func)();
.
.
gencode( foo ); /* generate codes and store them in foo */
cacheflush( foo, 4096, ICACHE );
((func)foo)();
Any info/answer/hint would be appreciated.
-Doug