1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-26 05:00:28 +02:00

ia64: Implement cache flush.

* lib/jit_ia64.c: Implement inline assembly cache flush,
	required on multiprocessor systems.
This commit is contained in:
Paulo Andrade 2015-05-10 16:22:26 -03:00
parent a5ab4c7718
commit f48e07b58b
2 changed files with 12 additions and 0 deletions

View file

@ -1494,7 +1494,14 @@ jit_flush(void *fptr, void *tptr)
s = sysconf(_SC_PAGE_SIZE);
f = (jit_word_t)fptr & -s;
t = (((jit_word_t)tptr) + s - 1) & -s;
# if 0
__clear_cache((void *)f, (void *)t);
# else
/* __clear_cache is a noop in (old?) gcc, but cache flush is
* required on a multi processor Linux system. */
for (s = f; s < t; s += 32)
asm volatile("fc %0" :: "r"(s) : "memory");
# endif
#endif
}