+2007-07-11 David Daney <ddaney@avtrex.com>
+
+ * src/mips/ffi.c: Don't include sys/cachectl.h.
+ (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of
+ cacheflush().
+
2007-05-18 Aurelien Jarno <aurelien@aurel32.net>
* src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
#include <ffi_common.h>
#include <stdlib.h>
-#include <sys/cachectl.h>
#if _MIPS_SIM == _ABIN32
#define FIX_ARGP \
unsigned int *tramp = (unsigned int *) &closure->tramp[0];
unsigned int fn;
unsigned int ctx = (unsigned int) codeloc;
+ char *clear_location = (char *) codeloc;
#if defined(FFI_MIPS_O32)
FFI_ASSERT(cif->abi == FFI_O32 || cif->abi == FFI_O32_SOFT_FLOAT);
closure->fun = fun;
closure->user_data = user_data;
- /* XXX this is available on Linux, but anything else? */
- cacheflush (codeloc, FFI_TRAMPOLINE_SIZE, ICACHE);
+ __builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
return FFI_OK;
}