Annotation of gforth/arch/generic/machine.h, revision 1.27
1.1 jwilke 1: /*
2: This is a generic file for 32-bit machines with IEEE FP arithmetic (no VMS).
3: It only supports indirect threading.
4:
1.20 anton 5: Copyright (C) 1995,1998,1999,2003 Free Software Foundation, Inc.
1.1 jwilke 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 2
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, write to the Free Software
1.12 anton 21: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.1 jwilke 22: */
23:
1.2 pazsan 24: /* define SYSCALL */
25:
26: #ifndef SYSCALL
27: #define SYSCALL
28: #endif
29:
1.6 pazsan 30: #ifndef SYSSIGNALS
31: #define SYSSIGNALS
32: #endif
33:
1.1 jwilke 34: #ifndef USE_FTOS
35: #ifndef USE_NO_FTOS
36: /* keep top of FP stack in register. Since most processors have FP
37: registers and they are hardly used in gforth, this is usually a
38: good idea. The 88100 has no separate FP regs, but many general
39: purpose regs, so it should be ok */
40: #define USE_FTOS
41: #endif
42: #endif
1.23 anton 43:
44: #ifndef USE_TOS
45: #ifndef USE_NO_TOS
46: /* keep top of data stack in register. Usually a good idea unless registers are very scarce */
47: #define USE_TOS
48: #endif
49: #endif
1.1 jwilke 50:
1.17 anton 51: #ifndef INDIRECT_THREADED
52: #ifndef DIRECT_THREADED
53: #define DIRECT_THREADED
54: #endif
1.1 jwilke 55: #endif
1.3 pazsan 56:
57: /* Types: these types are used as Forth's internal types */
58:
59: /* define this if IEEE singles and doubles are available as C data types */
60: #define IEEE_FP
61:
62: /* the IEEE types are used only for loading and storing */
63: /* the IEEE double precision type */
64: typedef double DFloat;
65: /* the IEEE single precision type */
66: typedef float SFloat;
67:
68: typedef CELL_TYPE Cell;
69: typedef unsigned CELL_TYPE UCell;
70: typedef Cell Bool;
71: typedef unsigned char Char;
72: typedef double Float;
73: typedef Char *Address;
74:
75: #if defined(DOUBLY_INDIRECT)
76: typedef void **Label;
77: #else /* !defined(DOUBLY_INDIRECT) */
78: typedef void *Label;
79: #endif /* !defined(DOUBLY_INDIRECT) */
1.1 jwilke 80:
1.15 jwilke 81: /* feature defines, these setting should be identical to the ones in machpc.fs */
1.4 pazsan 82:
1.24 pazsan 83: #ifndef STANDALONE
84: #warning hosted system
1.4 pazsan 85: #define HAS_FILE
86: #define HAS_FLOATING
87: #define HAS_OS
1.10 pazsan 88: #define HAS_DEBUG
1.25 pazsan 89: #define HAS_GLOCALS
90: #define HAS_HASH
1.16 jwilke 91: #ifndef HAS_PEEPHOLE
1.15 jwilke 92: #define HAS_PEEPHOLE
1.16 jwilke 93: #endif
1.24 pazsan 94: #else
95: #warning standalone system
96: #undef HAS_FILE
97: #undef HAS_FLOATING
98: #undef HAS_OS
99: #undef HAS_DEBUG
1.25 pazsan 100: #undef HAS_GLOCALS
101: #undef HAS_HASH
1.26 pazsan 102: #define HAS_F83HEADERSTRING
1.25 pazsan 103: #ifndef PUTC
1.27 ! pazsan 104: # define PUTC(x) emit_char(x)
1.25 pazsan 105: #endif
106: #ifndef TYPE
1.27 ! pazsan 107: # define TYPE(x, l) type_chars(x, l)
1.25 pazsan 108: #endif
1.24 pazsan 109: #endif
110: #define HAS_DCOMPS
111: #define HAS_XCONDS
112: #define HAS_STANDARDTHREADING
1.6 pazsan 113:
114: #define RELINFOBITS 8
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>