2008-02-15 Anthony Green <green@redhat.com>

* configure.ac: Bump version to 3.0.0,
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.

2008-02-15  David Daney  <ddaney@avtrex.com>

        * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
        Define (conditionally), and use it to include cachectl.h.
        (ffi_prep_closure_loc): Fix cache flushing.
        * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
This commit is contained in:
green
2008-02-15 18:43:40 +00:00
parent 7e0cc12e92
commit c3e1101ffa
7 changed files with 54 additions and 16 deletions

View File

@@ -29,6 +29,16 @@
#include <stdlib.h>
#ifdef __GNUC__
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
# define USE__BUILTIN___CLEAR_CACHE 1
# endif
#endif
#ifndef USE__BUILTIN___CLEAR_CACHE
#include <sys/cachectl.h>>
#endif
#ifdef FFI_DEBUG
# define FFI_MIPS_STOP_HERE() ffi_stop_here()
#else
@@ -616,8 +626,11 @@ ffi_prep_closure_loc (ffi_closure *closure,
closure->fun = fun;
closure->user_data = user_data;
#ifdef USE__BUILTIN___CLEAR_CACHE
__builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
#else
cacheflush (tramp, FFI_TRAMPOLINE_SIZE, ICACHE);
#endif
return FFI_OK;
}

View File

@@ -27,6 +27,19 @@
#ifndef LIBFFI_TARGET_H
#define LIBFFI_TARGET_H
#ifdef linux
#include <asm/sgidefs.h>
# ifndef _ABIN32
# define _ABIN32 _MIPS_SIM_NABI32
# endif
# ifndef _ABI64
# define _ABI64 _MIPS_SIM_ABI64
# endif
# ifndef _ABIO32
# define _ABIO32 _MIPS_SIM_ABI32
# endif
#endif
#if !defined(_MIPS_SIM)
-- something is very wrong --
#else