PatchSet 4521 
Date: 2004/03/15 17:37:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixes for m68k

2004-03-15  Dalibor Topic <[EMAIL PROTECTED]>

        * config/m68k/clear-cache.h:
        Removed.

        * config/m68k/jit.h:
        Reverted patch since it breaks things on non-linux platforms.

        Reported by: Tony Wyatt <[EMAIL PROTECTED]>

        * config/m68k/linux/jit-md.h:
        Added linux specific cache clearing code.

        *  config/m68k/linux/clear-cache.h:
        New file. Fixed #define.

        Reported by: Riccardo Mottola <[EMAIL PROTECTED]>

Members: 
        ChangeLog:1.2099->1.2100 
        config/m68k/clear-cache.h:1.1->1.2(DEAD) 
        config/m68k/jit.h:1.12->1.13 
        config/m68k/linux/clear-cache.h:INITIAL->1.1 
        config/m68k/linux/jit-md.h:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2099 kaffe/ChangeLog:1.2100
--- kaffe/ChangeLog:1.2099      Mon Mar 15 17:22:27 2004
+++ kaffe/ChangeLog     Mon Mar 15 17:37:02 2004
@@ -1,5 +1,23 @@
 2004-03-15  Dalibor Topic <[EMAIL PROTECTED]>
 
+       * config/m68k/clear-cache.h:
+       Removed.
+
+       * config/m68k/jit.h:
+       Reverted patch since it breaks things on non-linux platforms.
+
+       Reported by: Tony Wyatt <[EMAIL PROTECTED]>
+
+       * config/m68k/linux/jit-md.h:
+       Added linux specific cache clearing code.
+
+       *  config/m68k/linux/clear-cache.h:
+       New file. Fixed #define.
+
+       Reported by: Riccardo Mottola <[EMAIL PROTECTED]>
+
+2004-03-15  Dalibor Topic <[EMAIL PROTECTED]>
+
        * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
        Import limits.h instead of linux specific bits/local_lim.h.
 
===================================================================
Checking out kaffe/config/m68k/clear-cache.h
RCS:  /home/cvs/kaffe/kaffe/config/m68k/Attic/clear-cache.h,v
VERS: 1.1
***************
--- kaffe/config/m68k/clear-cache.h     Mon Mar 15 17:40:16 2004
+++ /dev/null   Sun Aug  4 19:57:58 2002
@@ -1,53 +0,0 @@
-/* Definitions for Motorola 68k running Linux-based GNU systems with
-   ELF format.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#if !defined(CLEAR_CACHE_H)
-#define (CLEAR_CACHE_H)
-
-/* Clear the instruction cache from `beg' to `end'.  This makes an
-   inline system call to SYS_cacheflush.  The arguments are as
-   follows:
-
-       cacheflush (addr, scope, cache, len)
-
-   addr          - the start address for the flush
-   scope  - the scope of the flush (see the cpush insn)
-   cache  - which cache to flush (see the cpush insn)
-   len    - a factor relating to the number of flushes to perform:
-           len/16 lines, or len/4096 pages.  */
-
-#define CLEAR_INSN_CACHE(BEG, END)                                     \
-{                                                                      \
-  register unsigned long _beg __asm ("%d1") = (unsigned long) (BEG);   \
-  unsigned long _end = (unsigned long) (END);                          \
-  register unsigned long _len __asm ("%d4") = (_end - _beg + 32);      \
-  __asm __volatile                                                     \
-    ("move%.l #123, %/d0\n\t"  /* system call nr */                    \
-     "move%.l #1, %/d2\n\t"    /* clear lines */                       \
-     "move%.l #3, %/d3\n\t"    /* insn+data caches */                  \
-     "trap #0"                                                         \
-     : /* no outputs */                                                        \
-     : "d" (_beg), "d" (_len)                                          \
-     : "%d0", "%d2", "%d3");                                           \
-}
-
-#endif /* !defined(CLEAR_CACHE_H) */
Index: kaffe/config/m68k/jit.h
diff -u kaffe/config/m68k/jit.h:1.12 kaffe/config/m68k/jit.h:1.13
--- kaffe/config/m68k/jit.h:1.12        Sat Mar 13 17:41:58 2004
+++ kaffe/config/m68k/jit.h     Mon Mar 15 17:37:04 2004
@@ -18,8 +18,6 @@
 #ifndef __m68k_jit_h
 #define __m68k_jit_h
 
-#include "clear-cache.h"
-
 /**/
 /* Exception handling information. */
 /**/
@@ -193,8 +191,7 @@
 
    For those with 020's and 030's, this is effectively a no-op.  */
 
-/* For now, let's try to use gcc's own macro */
-#define FLUSH_DCACHE(beg,end)  CLEAR_INSN_CACHE((beg),(end))
+#define FLUSH_DCACHE(beg,end)  __clear_cache((beg), (end))
 
 
 #endif
===================================================================
Checking out kaffe/config/m68k/linux/clear-cache.h
RCS:  /home/cvs/kaffe/kaffe/config/m68k/linux/clear-cache.h,v
VERS: 1.1
***************
--- /dev/null   Sun Aug  4 19:57:58 2002
+++ kaffe/config/m68k/linux/clear-cache.h       Mon Mar 15 17:40:16 2004
@@ -0,0 +1,53 @@
+/* Definitions for Motorola 68k running Linux-based GNU systems with
+   ELF format.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#if !defined(CLEAR_CACHE_H)
+#define CLEAR_CACHE_H
+
+/* Clear the instruction cache from `beg' to `end'.  This makes an
+   inline system call to SYS_cacheflush.  The arguments are as
+   follows:
+
+       cacheflush (addr, scope, cache, len)
+
+   addr          - the start address for the flush
+   scope  - the scope of the flush (see the cpush insn)
+   cache  - which cache to flush (see the cpush insn)
+   len    - a factor relating to the number of flushes to perform:
+           len/16 lines, or len/4096 pages.  */
+
+#define CLEAR_INSN_CACHE(BEG, END)                                     \
+{                                                                      \
+  register unsigned long _beg __asm ("%d1") = (unsigned long) (BEG);   \
+  unsigned long _end = (unsigned long) (END);                          \
+  register unsigned long _len __asm ("%d4") = (_end - _beg + 32);      \
+  __asm __volatile                                                     \
+    ("move%.l #123, %/d0\n\t"  /* system call nr */                    \
+     "move%.l #1, %/d2\n\t"    /* clear lines */                       \
+     "move%.l #3, %/d3\n\t"    /* insn+data caches */                  \
+     "trap #0"                                                         \
+     : /* no outputs */                                                        \
+     : "d" (_beg), "d" (_len)                                          \
+     : "%d0", "%d2", "%d3");                                           \
+}
+
+#endif /* !defined(CLEAR_CACHE_H) */
Index: kaffe/config/m68k/linux/jit-md.h
diff -u kaffe/config/m68k/linux/jit-md.h:1.3 kaffe/config/m68k/linux/jit-md.h:1.4
--- kaffe/config/m68k/linux/jit-md.h:1.3        Wed Aug 27 09:35:07 2003
+++ kaffe/config/m68k/linux/jit-md.h    Mon Mar 15 17:37:04 2004
@@ -14,6 +14,8 @@
 #ifndef __m68k_linux_jit_md_h
 #define __m68k_linux_jit_md_h
 
+#include "clear-cache.h"
+
 /**/
 /* Include common information. */
 /**/
@@ -39,4 +41,10 @@
                (f).retpc = (uintp)(c)->sc_pc;                          \
        } while (0)
 
-#endif
+/*
+ * Flush the cache on linux.
+ */
+#undef  FLUSH_DCACHE
+#define FLUSH_DCACHE(beg,end)   CLEAR_INSN_CACHE((beg),(end))
+
+#endif /* __m68k_linux_jit_md_h */

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to