File:  [gforth] / gforth / arch / generic / machine.h
Revision 1.31: download - view: text, annotated - select for diffs
Sat Nov 1 22:19:30 2008 UTC (13 years, 9 months ago) by anton
Branches: MAIN
CVS tags: v0-7-0, HEAD
updated copyright years

    1: /*
    2:   This is a generic file for 32-bit machines with IEEE FP arithmetic (no VMS).
    3:   It only supports indirect threading.
    4: 
    5:   Copyright (C) 1995,1998,1999,2003,2007,2008 Free Software Foundation, Inc.
    6: 
    7:   This file is part of Gforth.
    8: 
    9:   Gforth is free software; you can redistribute it and/or
   10:   modify it under the terms of the GNU General Public License
   11:   as published by the Free Software Foundation, either version 3
   12:   of the License, or (at your option) any later version.
   13: 
   14:   This program is distributed in the hope that it will be useful,
   15:   but WITHOUT ANY WARRANTY; without even the implied warranty of
   16:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17:   GNU General Public License for more details.
   18: 
   19:   You should have received a copy of the GNU General Public License
   20:   along with this program; if not, see http://www.gnu.org/licenses/.
   21: */
   22: 
   23: /* define SYSCALL */
   24: 
   25: #ifndef SYSCALL
   26: #define SYSCALL
   27: #endif
   28: 
   29: #ifndef SYSSIGNALS
   30: #define SYSSIGNALS
   31: #endif
   32: 
   33: #ifndef USE_FTOS
   34: #ifndef USE_NO_FTOS
   35: /* keep top of FP stack in register. Since most processors have FP
   36:    registers and they are hardly used in gforth, this is usually a
   37:    good idea.  The 88100 has no separate FP regs, but many general
   38:    purpose regs, so it should be ok */
   39: #define USE_FTOS
   40: #endif
   41: #endif
   42: 
   43: #ifndef USE_TOS
   44: #ifndef USE_NO_TOS
   45: /* keep top of data stack in register.  Usually a good idea unless registers are very scarce */
   46: #define USE_TOS
   47: #endif
   48: #endif
   49: 
   50: #ifndef INDIRECT_THREADED
   51: #ifndef DIRECT_THREADED
   52: #define DIRECT_THREADED
   53: #endif
   54: #endif
   55: 
   56: /* Types: these types are used as Forth's internal types */
   57: 
   58: /* define this if IEEE singles and doubles are available as C data types */
   59: #define IEEE_FP
   60: 
   61: /* the IEEE types are used only for loading and storing */
   62: /* the IEEE double precision type */
   63: typedef double DFloat;
   64: /* the IEEE single precision type */
   65: typedef float SFloat;
   66: 
   67: typedef CELL_TYPE Cell;
   68: typedef unsigned CELL_TYPE UCell;
   69: typedef Cell Bool;
   70: typedef unsigned char Char;
   71: typedef double Float;
   72: typedef Char *Address;
   73: 
   74: #if defined(DOUBLY_INDIRECT)
   75: typedef void **Label;
   76: #else /* !defined(DOUBLY_INDIRECT) */
   77: typedef void *Label;
   78: #endif /* !defined(DOUBLY_INDIRECT) */
   79: 
   80: /* feature defines, these setting should be identical to the ones in machpc.fs */
   81: 
   82: #ifndef STANDALONE
   83: /* #warning hosted system */
   84: #define HAS_FILE
   85: #define HAS_FLOATING
   86: #define HAS_OS
   87: #define HAS_DEBUG
   88: #define HAS_GLOCALS
   89: #define HAS_HASH
   90: #ifndef HAS_PEEPHOLE
   91: #define HAS_PEEPHOLE
   92: #endif
   93: #else
   94: #warning standalone system
   95: #undef HAS_FILE
   96: #undef HAS_FLOATING
   97: #undef HAS_OS
   98: #undef HAS_DEBUG
   99: #undef HAS_GLOCALS
  100: #undef HAS_HASH
  101: #define HAS_F83HEADERSTRING
  102: #ifndef PUTC
  103: # define PUTC(x) emit_char(x)
  104: #endif
  105: #ifndef TYPE
  106: # define TYPE(x, l) type_chars(x, l)
  107: #endif
  108: #endif
  109: #define HAS_DCOMPS
  110: #define HAS_XCONDS
  111: #define HAS_STANDARDTHREADING
  112: 
  113: #define RELINFOBITS	8

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