[patch] libffi EABI sys_cacheflush

Steven Newbury s_j_newbury@yahoo.co.uk
Sun Aug 5 12:35:00 GMT 2007


--- David Daney <ddaney@avtrex.com> wrote:

> Steven Newbury wrote:
> > The existing code in FFI_INIT_TRAMPOLINE calls sys_cacheflush using only
> the
> > OABI syscall interface ie. the syscall number is encoded in the swi
> > instruction.
> >
> > This patch passes the syscall number in r7 and calls "swi 0" as is needed
> by
> > the EABI Linux syscall ABI.
> >
> > 2007-08-03  Steven Newbury  <s_j_newbury@yahoo.co.uk>
> >
> > 	* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use EABI syscall ABI for 
> >           sys_cacheflush.
> >   
> An alternative would be to call the __clear_cache() function provided by 
> libgcc, or even better implement __builtin___clear_cache for arm and use 
> that.
 
Now that I've tested it, I've discovered that the patch I sent doesn't actually
work; #ifdef's inside macros are not a good idea..

As David suggested:

Use __clear_cache from libgcc for cache flushing.  This function uses the
appropriate EABI/OABI ABI for the cache flush operation.

2007-08-05  Steven Newbury  <s_j_newbury@yahoo.co.uk>
 	* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of 
          directly using the sys_cacheflush syscall.


Steve


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libffi-cacheflush.patch
Type: text/x-patch
Size: 717 bytes
Desc: 1899991570-libffi-cacheflush.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070805/7271fbc6/attachment.bin>


More information about the Java-patches mailing list