Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra5-amd64/src/installers/680x0/common/expmacs.h – Rev 5

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) 1996
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
			    VERSION INFORMATION
31
			    ===================
32
 
33
--------------------------------------------------------------------------
34
$Header: /u/g/release/CVSROOT/Source/src/installers/680x0/common/expmacs.h,v 1.1.1.1 1998/01/17 15:55:49 release Exp $
35
--------------------------------------------------------------------------
36
$Log: expmacs.h,v $
37
 * Revision 1.1.1.1  1998/01/17  15:55:49  release
38
 * First version to be checked into rolling release.
39
 *
40
Revision 1.1.1.1  1997/10/13 12:42:50  ma
41
First version.
42
 
43
Revision 1.5  1997/10/13 08:49:26  ma
44
Made all pl_tests for general proc & exception handling pass.
45
 
46
Revision 1.4  1997/09/25 06:45:01  ma
47
All general_proc tests passed
48
 
49
Revision 1.3  1997/06/18 12:04:52  ma
50
Merged with Input Baseline changes.
51
 
52
Revision 1.2  1997/06/18 10:09:29  ma
53
Checking in before merging with Input Baseline changes.
54
 
55
Revision 1.1.1.1  1997/03/14 07:50:12  ma
56
Imported from DRA
57
 
58
 * Revision 1.1.1.1  1996/09/20  10:56:53  john
59
 *
60
 * Revision 1.2  1996/07/05  14:20:32  john
61
 * Changes for spec 3.1
62
 *
63
 * Revision 1.1.1.1  1996/03/26  15:45:11  john
64
 *
65
 * Revision 1.6  94/11/08  11:23:07  11:23:07  ra (Robert Andrews)
66
 * Added a couple of missing clear macros.
67
 * 
68
 * Revision 1.5  94/06/29  14:21:38  14:21:38  ra (Robert Andrews)
69
 * Added new flags for inlining and unrolling optimisations.
70
 * 
71
 * Revision 1.4  94/02/21  15:58:31  15:58:31  ra (Robert Andrews)
72
 * Added unrolled property.
73
 * 
74
 * Revision 1.3  93/11/19  16:20:08  16:20:08  ra (Robert Andrews)
75
 * Added support macros for big values.
76
 * 
77
 * Revision 1.2  93/04/19  13:33:09  13:33:09  ra (Robert Andrews)
78
 * Representation of alignments has changed.
79
 * 
80
 * Revision 1.1  93/02/22  17:15:37  17:15:37  ra (Robert Andrews)
81
 * Initial revision
82
 * 
83
--------------------------------------------------------------------------
84
*/
85
 
86
 
87
#ifndef EXPMACS_INCLUDED
88
#define EXPMACS_INCLUDED
89
 
90
 
91
/*
92
    THE NULL EXPRESSION
93
*/
94
 
95
#define  nilexp			( ( exp ) null )
96
 
97
 
98
/*
99
    THE MAIN CONSTITUENTS OF AN EXPRESSION
100
*/
101
 
102
#define  name( X )		( ( X )->namef )
103
#define  son( X )		( ( X )->sonf.expr )
104
#define  bro( X )		( ( X )->brof.expr )
105
#define  pt( X )		( ( X )->ptf.expr )
106
#define  no( X )		( ( X )->numf.l )
107
#define  sh( X )		( ( X )->shf )
108
#define  last( X )		( ( X )->lastf )
109
#define  props( X )		( ( X )->propsf )
110
#define  parked( X )		( ( X )->park )
111
 
112
 
113
/*
114
    ALTERNATIVE CONSTITUENTS OF AN EXPRESSION
115
*/
116
 
117
#define  sonno( X )		( ( X )->sonf.l )
118
#define  brog( X )		( ( X )->brof.glob )
119
#define  ptno( X )		( ( X )->ptf.l )
120
#define  nostr( X )		( ( X )->numf.str )
121
#define  fno( X )		( ( X )->numf.fp )
122
#define  dno( X )		( ( X )->numf.d )
123
#define  uno( X )		( ( X )->numf.ui )
124
 
125
 
126
/*
127
    CONSTITUENTS OF AN EXPRESSION FOR NTESTS
128
*/
129
 
130
#define  test_number( X )	( ( int ) props ( X ) )
131
#define  settest_number( X, Y )	props ( X ) = ( Y )
132
#define  setntest( X, Y )	props ( X ) = ( Y )
133
 
134
 
135
/*
136
    CONSTITUENTS OF AN EXPRESSION FOR ROUNDING MODES
137
*/
138
 
139
#define  round_number( X )	( props ( X ) >> 3 )
140
#define  setround_number( X, Y )\
141
	    props ( X ) = ( ( props ( X ) & 7 ) | ( ( Y ) << 3 ) )
142
 
143
 
144
/*
145
    MACROS FOR SETTING CONSTITUENTS OF EXPRESSIONS
146
*/
147
 
148
#define  setname( X, Y )	name ( X ) = ( Y )
149
#define  setson( X, Y )		son ( X ) = ( Y )
150
#define  setbro( X, Y )		bro ( X ) = ( Y )
151
#define  setpt( X, Y )		pt ( X ) = ( Y )
152
#define  setno( X, Y )		no ( X ) = ( Y )
153
#define  setsh( X, Y )		sh ( X ) = ( Y )
154
#define  setlast( X )		last ( X ) = 1
155
#define  clearlast( X )		last ( X ) = 0
156
#define  setfather( X, Y )	bro ( Y ) = ( X ) ; last ( Y ) = 1
157
 
158
 
159
/*
160
    CONSTITUENTS OF SHAPES
161
*/
162
 
163
#define  is_signed( X )		( ( X )->lastf )
164
#define  shape_size( X )	( ( X )->numf.l )
165
#define  al2ul( X )		( ( unsigned long ) ( ( X )->al.al_val.al ) )
166
#define  align_of( X )		( ( X )->brof.ald )
167
#define  shape_align( X )	al2ul ( align_of ( X ) )
168
#define  al1_of( X )		( ( X )->sonf.ald )
169
#define  al1( X )		al2ul ( al1_of ( X ) )
170
#define  al2_of( X )		( ( X )->ptf.ald )
171
#define  al2( X )		al2ul ( al2_of ( X ) )
172
 
173
#ifndef tdf3
174
#define frame_al_of_ptr(x) (x)->sonf.ald->al.al_val.al_frame
175
#define frame_al1_of_offset(x) (x)->sonf.ald->al.al_val.al_frame
176
#define al_includes_vcallees 16
177
#define al_includes_caller_args 6
178
#endif
179
 
180
/*
181
    PROPERTIES OF CONSTRUCTS WITH ERROR TREATMENTS
182
*/
183
 
184
#define  isov( X )		( props ( X ) == 0x4 )
185
#define  seterr_code( X, Y )	props ( X ) = ( Y )
186
#define  setjmp_dest( X, Y )	\
187
		{ pt ( X ) = ( Y ) ; no ( son ( Y ) )++ ; }
188
 
189
 
190
 
191
/*
192
    MACROS FOR ERROR HANDLING
193
*/
194
 
195
#define  errhandle( X )		( props ( X ) & 0x7 )
196
#define  optop( X )		( errhandle ( X ) <= 2 )
197
#define  seterrhandle( X, Y )	\
198
	    props ( X ) = ( ( props ( X ) & 0xfff8 ) | ( Y ) )
199
 
200
 
201
/*
202
    PROPERTIES OF IDENTITY DECLARATIONS
203
*/
204
 
205
#define  setvar( X )		props ( X ) |= 0x01
206
#define  clearvar( X )		props ( X ) &= ~0x01
207
#define  setid( X )		props ( X ) &= ~0x01
208
#define  isvar( X )		( props ( X ) & 0x01 )
209
 
210
#define  setvis( X )		props ( X ) |= 0x02
211
#define  clearvis( X )		props ( X ) &= ~0x02
212
#define  isvis( X )		( props ( X ) & 0x02 )
213
 
214
#define  setenvoff( X )		props ( X ) |= 0x04
215
#define  clearenvoff( X )	props ( X ) &= ~0x04
216
#define  isenvoff( X )		( props ( X ) & 0x04 )
217
 
218
#define  setcaonly( X )		props ( X ) |= 0x08
219
#define  clearcaonly( X )	props ( X ) &= ~0x08
220
#define  iscaonly( X )		( props ( X ) & 0x08 )
221
 
222
#define  setusereg( X )		props ( X ) |= 0x10
223
#define  clearusereg( X )	props ( X ) &= ~0x10
224
#define  isusereg( X )		( props ( X ) & 0x10 )
225
 
226
#define  setparam( X )		props ( X ) |= 0x20
227
#define  clearparam( X )	props ( X ) &= ~0x20
228
#define  isparam( X )		( props ( X ) & 0x20 )
229
 
230
#define  setglob( X )		props ( X ) |= 0x40
231
#define  clearglob( X )		props ( X ) &= ~0x40
232
#define  isglob( X )		( props ( X ) & 0x40 )
233
 
234
#define  setcopy( X )		props ( X ) |= 0x80
235
#define  clearcopy( X )		props ( X ) &= ~0x80
236
#define  copying( X )		( props ( X ) & 0x80 )
237
 
238
#define  set_intnl_call( X )	props ( X ) |= 0x80
239
#define  has_intnl_call( X )	( props ( X ) & 0x80 )
240
 
241
#define  setinlined( X )	props ( X ) |= 0x200
242
#define  clearinlined( X )	props ( X ) &= ~0x200
243
#define  isinlined( X )		( props ( X ) & 0x200 )
244
 
245
#define  setismarked( X )       props ( X ) |= 0x100
246
#define  ismarked( X )		( props ( X ) & 0x100 )
247
 
248
/*
249
    PROPERTIES OF MAKE_PROC CONSTRUCTS
250
*/
251
 
252
#define  set_struct_res( X )		props ( X ) |= 0x1
253
#define  has_struct_res( X )		( props ( X ) & 0x1 )
254
 
255
#define  set_loc_address( X )		props ( X ) |= 0x2
256
#define  loc_address( X )		( props ( X ) & 0x2 )
257
 
258
#define  set_proc_has_setjmp( X )	 props ( X ) |= 0x4
259
#define  proc_has_setjmp( X )		( props ( X ) & 0x4 )
260
 
261
#define  set_proc_has_alloca( X )	 props ( X ) |= 0x8
262
#define  proc_has_alloca( X )		( props ( X ) & 0x8 )
263
 
264
#define  set_proc_has_lv( X )		props ( X ) |= 0x10
265
#define  proc_has_lv( X )		( props ( X ) & 0x10 )
266
 
267
#define  isrecursive( X )		( props ( X ) & 0x20 )
268
#define  setrecursive( X )		props ( X ) |= 0x20
269
 
270
#define  set_proc_uses_crt_env( X )	props ( X ) |= 0x40
271
#define  proc_uses_crt_env( X )		( props ( X ) & 0x40 )
272
 
273
#define  set_proc_uses_external( X )	props ( X ) |= 0x80
274
#define  proc_uses_external( X )	( props ( X ) & 0x80 )
275
 
276
 
277
/*
278
    PROPERTIES OF SOLVE CONSTRUCTS
279
*/
280
 
281
#define  setcrtsolve( X )		props ( X ) = 1
282
#define  set_copying_solve( X )		props ( X ) |= 1
283
#define  clear_copying_solve( X )	props ( X ) &= ~0x01
284
 
285
 
286
/*
287
    PROPERTIES OF MOVE_SOME CONSTRUCT
288
*/
289
 
290
#define  setnooverlap( X )		props ( X ) |= 0x01
291
 
292
 
293
/*
294
    PROPERTIES OF CONTENTS CONSTRUCT
295
*/
296
 
297
#define  set_propagate( X )		props ( X ) |= 0x1
298
#define  to_propagate( X )		( props ( X ) & 0x1 )
299
#define  clear_propagate( X )		props ( X ) &= ~0x01
300
 
301
 
302
/*
303
    PROPERTIES OF LABST CONSTRUCT
304
*/
305
 
306
#define  set_loaded_lv( X )		props ( X ) |= 0x10
307
#define  is_loaded_lv( X )		( props ( X ) & 0x10 )
308
#define  setunroll( X )			props ( X ) |= 0x20
309
#define  clearunroll( X )		props ( X ) &= ~0x20
310
#define  isunroll( X )			( props ( X ) & 0x20 )
311
 
312
 
313
/*
314
    PROPERTIES OF NAME CONSTRUCT
315
*/
316
 
317
#define  setlastuse( X )		props ( X ) |= 0x01
318
#define  islastuse( X )			( props ( X ) & 0x01 )
319
#define  setloadparam( X )		props ( X ) |= 0x02
320
#define  isloadparam( X )		( props ( X ) & 0x02 )
321
#define  setreallyass( X )		/* props ( X ) |= 0x04 */
322
#define  isreallyass( X )		( props ( X ) & 0x04 )
323
 
324
 
325
/*
326
    PROPERTIES OF VAL CONSTRUCT
327
*/
328
 
329
#define  setbigval( X )			props ( X ) |= 0x01
330
#define  clearbigval( X )		props ( X ) &= ~0x01
331
#define  isbigval( X )			( props ( X ) & 0x01 )
332
#define  setconstovf( X )               props(X) |= 0x02
333
#define  constovf( X )                  ( props(X) & 0x02 )
334
/*
335
    PROPERTIES OF REPEAT CONSTRUCT
336
*/
337
 
338
#define  setunrolled( X )		props ( X ) |= 0x01
339
#define  isunrolled( X )		( props ( X ) & 0x01 )
340
 
341
 
342
/*
343
    PROPERTIES OF APPLY CONSTRUCT
344
*/
345
 
346
#define  settoinline( X )		props ( X ) |= 0x01
347
#define  istoinline( X )		( props ( X ) & 0x01 )
348
 
349
 
350
/*
351
    ROUNDING FOR ALIGNMENT
352
*/
353
 
354
#define  rounder( X, Y )		\
355
	    ( ( ( ( X ) + ( Y ) - 1 ) / ( Y ) ) * ( Y ) )
356
 
357
 
358
/*
359
    BASIC ALIGNMENTS
360
*/
361
 
362
#define  align32			( ( unsigned long ) 32 )
363
#define  align16			( ( unsigned long ) 16 )
364
#define  align8				( ( unsigned long ) 8 )
365
#define  align1				( ( unsigned long ) 1 )
366
 
367
#define  size64				( ( long ) 64 )
368
#define  size32				( ( long ) 32 )
369
#define  size16				( ( long ) 16 )
370
#define  size8				( ( long ) 8 )
371
#define  Z				( long ) 0
372
 
373
 
374
#define set_checkalloc(x) props(x) |= 1
375
#define checkalloc(x) (props(x) & 1)
376
 
377
#define set_callee(id)  setname(son(id), formal_callee_tag)
378
#define set_make_procprops(e, p) props(e) |= ((p)<<8)
379
 
380
#ifndef tdf3
381
/* parameter used for output (needs to be in memory for 68k) */
382
#define setoutpar(x) setvis(x)
383
#define isoutpar(x) isvis(x)
384
#define clearoutpar(x)
385
#else
386
#define setoutpar(x) props(x) |= 0x8000
387
#define isoutpar(x) ((props(x) & 0x8000) != 0)
388
#define clearoutpar(x) props(x) &= ~0x8000
389
#endif
390
 
391
#ifndef tdf3
392
 
393
/* from trans386 */
394
 
395
#define set_callee(id)  setname(son(id), formal_callee_tag)
396
#define set_make_procprops(e, p) props(e) |= ((p)<<8)
397
#define proc_has_vcallees(e) (props(e) & 0x200)
398
#define postlude_has_call(e) (props(e) & 1)
399
#define call_has_vcallees(e) (props(e) & 2)
400
#define proc_has_checkstack(e) (props(e) & 0x800)
401
#define proc_has_vcallers(e) (props(e) & 0x100)
402
#define proc_has_nolongj(e) (props(e) & 0x1000)
403
 
404
#define set_proc_needs_envsize(x) props(x) = (prop)(props(x) | 0x8000)
405
#define proc_needs_envsize(x) (props(x) & 0x8000)
406
 
407
#define call_is_untidy(e) (props(bro(son(e))) & 4)
408
#define call_has_checkstack(e) (props(bro(son(e))) & 8)
409
 
410
#endif
411
 
412
 
413
#endif