new copyright; att/bsd/shared
[unix-history] / usr / src / usr.bin / pascal / src / tmps.h
CommitLineData
0fc6e47b
KB
1/*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
252367af 6 *
0fc6e47b 7 * @(#)tmps.h 5.3 (Berkeley) %G%
252367af 8 */
3ee769d9
PK
9
10/*
11 * The following structure is used
12 * to keep track of the amount of variable
13 * storage required by each block.
14 * "Max" is the high water mark, "off"
15 * the current need. Temporaries for "for"
16 * loops and "with" statements are allocated
17 * in the local variable area and these
18 * numbers are thereby changed if necessary.
19 *
20 * for the compiler,
21 * low_water is the lowest number register allocated of its type
22 * next_avail is the next available register of its type
23 */
24
25#ifdef PC
26#ifdef vax
27 /*
28 * the number of register types.
29 * the details of how many of each kind of register there is
30 * (and what they are for) is known in tmps.c
31 */
32#define NUMREGTYPES 1
33#define REG_GENERAL 0
34#endif vax
35
fe8ff1f7
KM
36#ifdef tahoe
37 /*
38 * the number of register types.
39 * the details of how many of each kind of register there is
40 * (and what they are for) is known in tmps.c
41 */
42#define NUMREGTYPES 1
43#define REG_GENERAL 0
44#endif tahoe
45
3ee769d9
PK
46#ifdef mc68000
47 /*
48 * the number of register types.
49 * the details of how many of each kind of register there is
50 * (and what they are for) is known in tmps.c
51 */
52#define NUMREGTYPES 2
53#define REG_DATA 0
54#define REG_ADDR 1
55#endif mc68000
56#endif PC
57
58struct om {
59 long om_max;
60#ifdef PC
61 long low_water[NUMREGTYPES];
62#endif PC
63 struct tmps {
64 long om_off;
65#ifdef PC
66 long next_avail[NUMREGTYPES];
67#endif PC
68 } curtmps;
69} sizes[DSPLYSZ];
70
71 /*
72 * an enumeration for whether a temporary can be a register. cf. tmps.c
73 */
74#define NOREG 0
75#define REGOK 1