[Patch] 3/3 FFI: Use __builtin_flush_icache() to flush MIPS i-cache.

David Daney ddaney@avtrex.com
Thu Jul 5 07:43:00 GMT 2007


David Daney wrote:
> This is the third and final part of the __builtin_flush_icache patch.
> It replaces the hard coded library call to cacheflush() in the MIPS
> ffi_prep_closure_loc with a call to __builtin_flush_icache();
>
> For targets that support user-space i-cache flushing (mips32r2), this
> will eliminate a system call from the ffi closure preparation path.
> On all other targets the generated code is the same as before.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu all default
> languages with no regressions.
>
> Also tested on:
> x86_64 cross to mipsel-linux --with-arch=mips32
> i686   cross to mipsel-linux --with-arch=mips32r2
>
> with no regressions.
A new version of the patch.  All that changed is the name of the 
builtin.  It is now __builtin___clear_cache().

Tested as before.

OK to commit:

2007-07-04  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().

-------------- next part --------------
A non-text attachment was scrubbed...
Name: flush-cache3.diff
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070705/02680c15/attachment.bin>


More information about the Java-patches mailing list