Annotation of gforth/arch/m68k/machine.h, revision 1.16

1.1       anton       1: /* This is the machine-specific part for the 68000 and family
                      2: 
1.16    ! anton       3:   Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
1.1       anton       4: 
                      5:   This file is part of Gforth.
                      6: 
                      7:   Gforth is free software; you can redistribute it and/or
                      8:   modify it under the terms of the GNU General Public License
                      9:   as published by the Free Software Foundation; either version 2
                     10:   of the License, or (at your option) any later version.
                     11: 
                     12:   This program is distributed in the hope that it will be useful,
                     13:   but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15:   GNU General Public License for more details.
                     16: 
                     17:   You should have received a copy of the GNU General Public License
                     18:   along with this program; if not, write to the Free Software
1.11      anton      19:   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.1       anton      20: */
                     21: 
1.7       anton      22: #ifndef THREADING_SCHEME
                     23: #define THREADING_SCHEME 3
                     24: #endif
                     25: 
1.2       anton      26: /* define this if the processor cannot exploit instruction-level
                     27:    parallelism (no pipelining or too few registers) */
                     28: #define CISC_NEXT
                     29: 
                     30: #if !defined USE_NO_TOS && !defined USE_TOS
                     31: #define USE_TOS
                     32: #endif
                     33: 
1.3       jwilke     34: #include "../generic/machine.h"
1.8       anton      35: #include <sys/types.h>
1.1       anton      36: 
                     37: /* Clearing the whole cache is a bit drastic, but this is the only
                     38:  *    cache control available on the apollo and NeXT
                     39:  */
                     40: #if defined(apollo)
                     41: #  define FLUSH_ICACHE(addr,size)    cache_$clear()
                     42: #elif defined(NeXT)
                     43: #  define FLUSH_ICACHE(addr,size)     asm("trap #2");
                     44: #elif defined(hpux)
                     45: #  include <sys/cache.h>
                     46: #  define FLUSH_ICACHE(addr,size) cachectl(CC_IPURGE,(addr),(size))
1.2       anton      47: #elif defined(linux)
                     48: #include <asm/cachectl.h>
                     49: extern int cacheflush(void *, int, int, size_t);
                     50: #define FLUSH_ICACHE(addr,size) \
                     51:   cacheflush(addr, FLUSH_SCOPE_LINE, FLUSH_CACHE_INSN, (size_t)(size) + 15)
1.4       anton      52: #elif defined(amigaos)
                     53: #  define FLUSH_ICACHE(addr,size) \
                     54:   asm(" move.l a6,-(sp); \
                     55:         move.l _SysBase,a6; \
                     56:         jsr -636(a6); \
                     57:         move.l (sp)+,a6; \
                     58:   ")
1.1       anton      59: #else
1.13      anton      60: #  warning no FLUSH_ICACHE defined.  Dynamic native code generation disabled.
                     61: #  warning CODE words will not work.
1.1       anton      62: #endif
                     63: 
1.2       anton      64: #ifdef FORCE_REG /* highly recommended */
1.4       anton      65: #if defined(amigaos)
1.5       pazsan     66: #  define IPREG asm("%a6")
1.4       anton      67: #else
1.5       pazsan     68: #  define IPREG asm("%a5")
1.4       anton      69: #endif
1.2       anton      70: #define SPREG asm("%a4")
                     71: #define RPREG asm("%a3")
                     72: #define CFAREG asm("%a2")
                     73: #define TOSREG asm("%d3")
                     74: #define LPREG asm("%d2")
                     75: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>