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 CLOBBER_TOS_WORKAROUND_START
51 #define CLOBBER_TOS_WORKAROUND_START
52 #define CLOBBER_TOS_WORKAROUND_END
53 #endif
54 
55 #ifndef INDIRECT_THREADED
56 #ifndef DIRECT_THREADED
57 #define DIRECT_THREADED
58 #endif
59 #endif
60 
61 /* Types: these types are used as Forth's internal types */
62 
63 /* define this if IEEE singles and doubles are available as C data types */
64 #define IEEE_FP
65 
66 /* the IEEE types are used only for loading and storing */
67 /* the IEEE double precision type */
68 typedef double DFloat;
69 /* the IEEE single precision type */
70 typedef float SFloat;
71 
72 typedef CELL_TYPE Cell;
73 typedef unsigned CELL_TYPE UCell;
74 typedef Cell Bool;
75 typedef unsigned char Char;
76 typedef double Float;
77 typedef Char *Address;
78 
79 #if defined(DOUBLY_INDIRECT)
80 typedef void **Label;
81 #else /* !defined(DOUBLY_INDIRECT) */
82 typedef void *Label;
83 #endif /* !defined(DOUBLY_INDIRECT) */
84 
85 /* feature defines, these setting should be identical to the ones in machpc.fs */
86 
87 #ifndef STANDALONE
88 /* #warning hosted system */
89 #define HAS_FILE
90 #define HAS_FLOATING
91 #define HAS_OS
92 #define HAS_DEBUG
93 #define HAS_GLOCALS
94 #define HAS_HASH
95 #ifndef HAS_PEEPHOLE
96 #define HAS_PEEPHOLE
97 #endif
98 #else
99 #warning standalone system
100 #undef HAS_FILE
101 #undef HAS_FLOATING
102 #undef HAS_OS
103 #undef HAS_DEBUG
104 #undef HAS_GLOCALS
105 #undef HAS_HASH
106 #define HAS_F83HEADERSTRING
107 #ifndef PUTC
108 # define PUTC(x) emit_char(x)
109 #endif
110 #ifndef TYPE
111 # define TYPE(x, l) type_chars(x, l)
112 #endif
113 #endif
114 #define HAS_DCOMPS
115 #define HAS_XCONDS
116 #define HAS_STANDARDTHREADING
117 
118 #define RELINFOBITS	8
119