30 lines
849 B
Plaintext
30 lines
849 B
Plaintext
$NetBSD: patch-aj,v 1.4 2012/09/14 23:45:27 asau Exp $
|
|
|
|
--- src/m68k/ffi.c.orig 2012-04-12 02:46:06.000000000 +0000
|
|
+++ src/m68k/ffi.c
|
|
@@ -9,8 +9,11 @@
|
|
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
-#ifdef __rtems__
|
|
+#if defined(__rtems__)
|
|
void rtems_cache_flush_multiple_data_lines( const void *, size_t );
|
|
+#elif defined(__NetBSD__)
|
|
+#include <sys/types.h>
|
|
+#include <m68k/sync_icache.h>
|
|
#else
|
|
#include <sys/syscall.h>
|
|
#ifdef __MINT__
|
|
@@ -335,8 +338,10 @@ ffi_prep_closure_loc (ffi_closure* closu
|
|
else
|
|
*(void **)(closure->tramp + 8) = ffi_closure_SYSV;
|
|
|
|
-#ifdef __rtems__
|
|
+#if defined(__rtems__)
|
|
rtems_cache_flush_multiple_data_lines( codeloc, FFI_TRAMPOLINE_SIZE );
|
|
+#elif defined(__NetBSD__)
|
|
+ m68k_sync_icache(codeloc, FFI_TRAMPOLINE_SIZE);
|
|
#elif defined(__MINT__)
|
|
Ssystem(S_FLUSHCACHE, codeloc, FFI_TRAMPOLINE_SIZE);
|
|
#else
|