dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/support clflush.c,1.1,1.2


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/support clflush.c,1.1,1.2
Date: Thu, 01 May 2003 00:01:41 -0400

Update of /cvsroot/dotgnu-pnet/pnet/support
In directory subversions:/tmp/cvs-serv31545/support

Modified Files:
        clflush.c 
Log Message:


Implement the "ILCacheFlush" function for ARM-based GNU/Linux machines,
which have a special system call for performing cache flushes.


Index: clflush.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/support/clflush.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** clflush.c   27 May 2002 10:13:24 -0000      1.1
--- clflush.c   1 May 2003 04:01:39 -0000       1.2
***************
*** 73,76 ****
--- 73,91 ----
        __asm__ __volatile__ ("nop; nop; nop; nop; nop");
  
+ #elif (defined(__arm__) || defined(__arm)) && defined(linux)
+ 
+       /* ARM Linux has a "cacheflush" system call */
+       /* R0 = start of range, R1 = end of range, R3 = flags */
+       /* flags = 0 indicates data cache, flags = 1 indicates both caches */
+       __asm __volatile ("mov r0, %0\n"
+                         "mov r1, %1\n"
+                                         "mov r2, %2\n"
+                                         "swi 0x9f0002       @ sys_cacheflush"
+                                         : /* no outputs */
+                                         : "r" (buf),
+                                           "r" (((int)buf) + (int)length),
+                                               "r" (0)
+                                         : "r0", "r1", "r3" );
+ 
  #endif
  #endif /* IL_HAVE_CACHE_FLUSH */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]