From: daney Date: Thu, 12 Jul 2007 02:19:41 +0000 (+0000) Subject: * src/mips/ffi.c: Don't include sys/cachectl.h. X-Git-Tag: upstream/4.9.2~47510 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e96a69da628a7956ae23ccb5f91c6f4eb4d1ad8b;p=platform%2Fupstream%2Flinaro-gcc.git * src/mips/ffi.c: Don't include sys/cachectl.h. (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of cacheflush(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126567 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 7cb0036..2776084 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2007-07-11 David Daney + + * 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 * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted diff --git a/libffi/src/mips/ffi.c b/libffi/src/mips/ffi.c index e544680..12b8b62 100644 --- a/libffi/src/mips/ffi.c +++ b/libffi/src/mips/ffi.c @@ -27,7 +27,6 @@ #include #include -#include #if _MIPS_SIM == _ABIN32 #define FIX_ARGP \ @@ -506,6 +505,7 @@ ffi_prep_closure_loc (ffi_closure *closure, 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); @@ -525,8 +525,7 @@ ffi_prep_closure_loc (ffi_closure *closure, 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; }