Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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