summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2007-07-12 02:19:41 +0000
committerDavid Daney <daney@gcc.gnu.org>2007-07-12 02:19:41 +0000
commit433e6a8cf26e3d3164250884b088dd396c131b9f (patch)
treedb31f1418b9522bff0c48d76e6e88d3055e3ff43 /libffi
parent66a82a79ea15ecc42f8b82fc8e99e6fd57ab497e (diff)
ffi.c: Don't include sys/cachectl.h.
* src/mips/ffi.c: Don't include sys/cachectl.h. (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of cacheflush(). From-SVN: r126567
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog6
-rw-r--r--libffi/src/mips/ffi.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 7cb003670a7..27760849cf0 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/libffi/src/mips/ffi.c b/libffi/src/mips/ffi.c
index e5446807c09..12b8b62bab9 100644
--- a/libffi/src/mips/ffi.c
+++ b/libffi/src/mips/ffi.c
@@ -27,7 +27,6 @@
#include <ffi_common.h>
#include <stdlib.h>
-#include <sys/cachectl.h>
#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;
}