Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
7 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
7 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
7 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
/**********************************************************************
62
$Author: release $
63
$Date: 1998/01/17 15:55:47 $
64
$Revision: 1.1.1.1 $
65
$Log: installtypes.h,v $
66
 * Revision 1.1.1.1  1998/01/17  15:55:47  release
67
 * First version to be checked into rolling release.
68
 *
69
 * Revision 1.7  1996/11/12  10:42:24  currie
70
 * unsigned cases
71
 *
72
 * Revision 1.6  1996/01/08  11:49:26  currie
73
 * ishppa
74
 *
75
 * Revision 1.5  1995/10/06  14:42:00  currie
76
 * Env-offset alignments + new div with ET
77
 *
78
 * Revision 1.4  1995/09/19  16:06:52  currie
79
 * isAlpha!!
80
 *
81
 * Revision 1.3  1995/09/11  15:35:37  currie
82
 * caller params -ve
83
 *
84
 * Revision 1.2  1995/05/05  08:10:54  currie
85
 * initial_value + signtures
86
 *
87
 * Revision 1.1  1995/04/06  10:44:05  currie
88
 * Initial revision
89
 *
90
***********************************************************************/
91
#ifndef installtypes_key
92
#define installtypes_key 1
93
 
94
typedef exp otagexp;
95
 
7 7u83 96
typedef struct otagexp_list_t {
97
	exp start;
98
	exp end;
99
	exp id;
100
	int number;
101
} otagexp_list;
102
 
2 7u83 103
typedef int procprops;
104
 
105
typedef int procprops_option;
106
typedef exp callees;
107
typedef int error_code;
108
typedef int error_code_list;
109
 
110
typedef tdfstring string;
111
 
7 7u83 112
union signed_nat_u {
113
	int small_s_nat;
114
	flpt big_s_nat;
115
};
2 7u83 116
 
7 7u83 117
struct signed_nat_t {
118
	union signed_nat_u signed_nat_val;
119
	char issmall;		/* 1 if small_s_nat 0 big */
120
	char negative;};	/* 1 for neg, 0 for pos */
2 7u83 121
typedef struct signed_nat_t signed_nat;
122
 
7 7u83 123
typedef struct nat_option_t {
124
	int present;	/* 1 if val is present, 0 otherwise */
125
	nat val;
126
} nat_option;
2 7u83 127
 
7 7u83 128
typedef struct exp_option_t {
129
	int present;	/* 1 if val is present, 0 otherwise */
130
	exp val;
131
} exp_option;
2 7u83 132
 
133
 
7 7u83 134
/* dummy definitions */
2 7u83 135
typedef int access;
136
typedef int access_option;
137
 
138
typedef int transfer_mode;
139
 
140
 
141
typedef struct alignment_t {
7 7u83 142
	int al_n;	/* code describing the state
143
			   1 - defined in al_val.al
144
			   2 - the join of al_val.al_join.a and b
145
			   3 - in al_val.al_join.a
146
			 */
147
	int sh_hd;
148
	struct alignment_u {
149
		int al;
150
		int al_frame;
151
		struct join_t {
152
			struct aldef_t *a;
153
			struct aldef_t *b;
154
		} al_join;
155
	} al_val;
2 7u83 156
} alignment_cell;
157
 
158
typedef struct aldef_t {
7 7u83 159
	struct aldef_t *next_aldef;	/* keeps a list of all aldefs */
160
	alignment_cell al;
161
} aldef;
2 7u83 162
 
7 7u83 163
typedef aldef *alignment;
2 7u83 164
 
165
 
7 7u83 166
struct bfvar_t {
167
	int bits;	/* number of bits in bitfield */
168
	int has_sign;	/* 1 if signed */
169
};
2 7u83 170
typedef struct bfvar_t bitfield_variety;
171
 
172
typedef char bool;
173
 
174
typedef exp shape;
175
 
7 7u83 176
typedef exp *label;
2 7u83 177
 
7 7u83 178
struct caselim_t {
179
	label lab;	/* label to jump if control between low and high */
180
	signed_nat low;
181
	signed_nat high;
182
};	/* caselim during reading */
2 7u83 183
 
184
typedef struct caselim_t caselim;
185
 
7 7u83 186
typedef struct error_treatment_t {
187
	int err_code;	/* code for treatment */
188
	label jmp_dest;
189
} error_treatment;	/* error treatment during reading */
2 7u83 190
 
191
 /* structure which describes a declaration */
192
struct dec_t {
7 7u83 193
	struct dec_t *def_next;
194
	/* if this is a global declaration this field holds next global
195
	   declaration which needs processing. If there is none, it is nilexp */
196
	union ut {
197
		struct dec_v {
198
			char *dec_id;
199
			/* identifier to be used */
200
			shape dec_shape;
201
			/* shape of the value */
202
			exp dec_exp;
203
			/* definition or nilexp */
204
			int unit_number;
205
			diag_global *diag_info;
206
			access acc;
207
			int index;
208
			/* used in inl_norm to hold procedure index number */
2 7u83 209
 
210
#if ismips || issparc || ispower || isAlpha || ishppa
7 7u83 211
			int sym_number;
2 7u83 212
#endif
213
 
7 7u83 214
			/* bitfields only after this */
215
			unsigned int extnamed :1;
216
			/* external */
217
			unsigned int dec_var :1;
218
			/* this is a variable */
219
			unsigned int dec_outermost :1;
220
			/* this is global */
221
			unsigned int have_def :1;
222
			/* we have a definition */
223
			unsigned int processed :1;
224
			/* this exp has been output */
225
			unsigned int isweak :1;
226
			/* definition is weak */
227
			unsigned int is_common :1;
228
			/* declaration is common */
229
			unsigned int has_signature : 1;
230
			/* declaration has signature */
231
		} dec_val;
232
	} dec_u;
2 7u83 233
};
234
 
7 7u83 235
typedef struct dec_t dec;
2 7u83 236
 
7 7u83 237
typedef dec *tag;
238
typedef aldef *al_tag;
2 7u83 239
 
240
typedef int floating_variety;
241
typedef unsigned char ntest;
242
typedef unsigned char rounding_mode;
243
 
7 7u83 244
typedef struct shape_list_t {
245
	shape *elems;
246
	int number;
247
} shape_list;	/* number shapes */
2 7u83 248
 
249
typedef shape variety;
250
 
7 7u83 251
typedef struct tag_option_t {
252
	bool present;
2 7u83 253
	/* 1 if val is present, 0 otherwise */
7 7u83 254
	tag val;
255
} tag_option;
2 7u83 256
 
257
typedef struct string_option_t {
258
	bool present;
259
	string val;
260
} string_option;
261
 
7 7u83 262
typedef struct tagsh_t {
263
	shape sha;
264
	access visible;
265
	tag tg;
266
} tagshacc;
2 7u83 267
 
7 7u83 268
typedef struct tagsh_list_t {
269
	exp id;
270
	exp last_def;
271
	exp last_id;
272
	exp proc_def;
273
	int size;
274
	int number;
275
} tagshacc_list;
2 7u83 276
 
277
typedef struct tagacc_t {
7 7u83 278
	tag tg;
279
	access visible;
280
} tagacc;
2 7u83 281
 
282
typedef struct tagacc_option_t {
283
	bool present;	/* 1 if val is present, 0 otherwise */
284
	tagacc val;
285
} tagacc_option;
286
 
7 7u83 287
typedef  struct labtag_t {
288
	label place_label;
289
} labtag;
2 7u83 290
 
291
 
7 7u83 292
typedef struct exp_list_t {
293
	exp start;	/* the first element of a list chained through bro */
294
	exp end;	/* the last element of a list chained through bro */
295
	int number;	/* the number of elements in the list */
296
} exp_list;
2 7u83 297
 
298
typedef exp caselim_list;
299
 
300
 
7 7u83 301
struct labtag_list_t {
302
	label *elems;
303
	int number;	/* number labels */
304
};
2 7u83 305
typedef struct labtag_list_t label_list;
306
 
7 7u83 307
typedef struct tagshacc_option_t {
308
	int present;	/* 1 if val is present, 0 otherwise */
309
	tagshacc val;
310
} tagshacc_option;
2 7u83 311
 
312
typedef struct proc_props_t {
7 7u83 313
	struct proc_props_t *pushed;
2 7u83 314
	exp proc_struct_result;
315
	int proc_label_count;
316
	float default_freq;
317
	alignment frame_alignment;
318
	int has_alloca;
319
	int proc_is_recursive;
320
	int uses_crt_env;
321
	int has_setjmp;
322
	int uses_loc_address;
323
	int proc_struct_res;
324
	int proc_externs;
325
	int in_proc_def;
7 7u83 326
	int rep_make_proc;
2 7u83 327
	int in_initial_value;
7 7u83 328
} proc_props;
329
/* holds properties of a procedure while an internally defined procedure is
330
 * being read */
2 7u83 331
 
332
typedef struct version_t {
333
	int major_version;
334
	int minor_version;
335
} version;
336
 
337
typedef int version_props;
338
typedef int version_list;
339
 
7 7u83 340
#endif /* installtypes_key */