This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS Patch and testresults.


Jakub Jelinek wrote:
On Fri, Feb 15, 2008 at 10:25:58AM -0800, David Daney wrote:
Please consider the attached patch.

How could: #ifndef USE__BUILTIN___CLEAR_CACHE #include <sys/cachectl.h>> #endif

compile? Note >> instead of > .


Indeed, it is an interesting question. The answer is:


src/mips/ffi.c:39:26: warning: extra tokens at end of #include directive

So it works, but issues a warning that I somehow missed.


The attached test fixes all warnings in src/mips/ffi.c


Tested on mipsel-linux.

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

	* src/mips/ffi.c: Remove extra '>' from include directive.
	(ffi_prep_closure_loc):  Use clear_location instead of tramp.
diff -rup libffi-3.0.0/src/mips/ffi.c libffi-3.0.0.DD/src/mips/ffi.c
--- libffi-3.0.0/src/mips/ffi.c	2008-02-15 10:33:13.000000000 -0800
+++ libffi-3.0.0.DD/src/mips/ffi.c	2008-02-15 13:17:39.000000000 -0800
@@ -36,7 +36,7 @@
 #endif
 
 #ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>>
+#include <sys/cachectl.h>
 #endif
 
 #ifdef FFI_DEBUG
@@ -629,7 +629,7 @@ ffi_prep_closure_loc (ffi_closure *closu
 #ifdef USE__BUILTIN___CLEAR_CACHE
   __builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
 #else
-  cacheflush (tramp, FFI_TRAMPOLINE_SIZE, ICACHE);
+  cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
 #endif
   return FFI_OK;
 }
Only in libffi-3.0.0.DD/src/mips: ffi.c~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]