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/src/installers/sparc/common/expmacs.h – Rev 2

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
 
33
/*
34
			    VERSION INFORMATION
35
			    ===================
36
 
37
--------------------------------------------------------------------------
38
$Header: /u/g/release/CVSROOT/Source/src/installers/sparc/common/expmacs.h,v 1.1.1.1 1998/01/17 15:55:54 release Exp $
39
--------------------------------------------------------------------------
40
$Log: expmacs.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:55:54  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.12  1997/10/10  18:32:21  pwe
45
 * prep ANDF-DE revision
46
 *
47
 * Revision 1.11  1997/04/24  14:22:26  pwe
48
 * added constovf
49
 *
50
 * Revision 1.10  1997/03/26  13:04:16  pwe
51
 * general proc compatibility
52
 *
53
 * Revision 1.9  1997/02/18  11:47:47  pwe
54
 * NEWDIAGS for debugging optimised code
55
 *
56
 * Revision 1.8  1995/12/15  10:12:16  john
57
 * Added new properties
58
 *
59
 * Revision 1.7  1995/09/27  13:18:57  john
60
 * Fixed call_is_untidy
61
 *
62
 * Revision 1.6  1995/09/25  16:34:01  john
63
 * Fixed macros
64
 *
65
 * Revision 1.5  1995/09/15  16:14:21  john
66
 * *** empty log message ***
67
 *
68
 * Revision 1.4  1995/07/14  16:30:39  john
69
 * Changed definition of optop macro
70
 *
71
 * Revision 1.3  1995/06/30  08:28:50  john
72
 * New macro
73
 *
74
 * Revision 1.2  1995/05/26  12:57:34  john
75
 * Changes for new spec (3.1)
76
 *
77
 * Revision 1.1.1.1  1995/03/13  10:18:33  john
78
 * Entered into CVS
79
 *
80
 * Revision 1.8  1995/01/19  14:02:05  john
81
 * Changed definition of isov
82
 *
83
 * Revision 1.7  1994/12/05  11:24:31  djch
84
 * Added clearinlined, needed for reuse of inlined bit in needscan
85
 *
86
 * Revision 1.6  1994/11/18  13:49:17  djch
87
 * Changed ptst to test against zero (before it could fail when assigned to char)
88
 * Revised (set)test_number to only affect bottom 4 bits.
89
 *
90
 * Revision 1.5  1994/07/04  09:24:54  djch
91
 * Jun94 tape version
92
 *
93
 * Revision 1.4  1994/05/17  14:22:09  djch
94
 * added istoinline for jmf's inliner
95
 *
96
 * Revision 1.3  1994/05/13  12:28:36  djch
97
 * Incorporates improvements from expt version
98
 * New macros for jmf's unrolling.
99
 *
100
 * Revision 1.2  1994/05/03  15:05:08  djch
101
 * added setinlined etc macros for 3.0 common. Now also includes bitsmacs.h
102
 *
103
 * Revision 1.4  93/09/27  14:43:58  14:43:58  ra (Robert Andrews)
104
 * Put an explicit cast in optop.
105
 * 
106
 * Revision 1.3  93/08/27  11:24:57  11:24:57  ra (Robert Andrews)
107
 * Changed defintions of pset etc to make integer casts explicit.
108
 * 
109
 * Revision 1.2  93/07/08  18:19:37  18:19:37  ra (Robert Andrews)
110
 * Added setbigval etc - support for large integers.
111
 * 
112
 * Revision 1.1  93/06/24  14:58:12  14:58:12  ra (Robert Andrews)
113
 * Initial revision
114
 * 
115
--------------------------------------------------------------------------
116
*/
117
 
118
 
119
#ifndef EXPMACS_INCLUDED
120
#define EXPMACS_INCLUDED
121
 
122
#include "bitsmacs.h"
123
/*
124
    THE NIL EXPRESSION
125
*/
126
 
127
#define nilexp				null
128
 
129
 
130
/*
131
    MAIN COMPONENTS OF AN EXPRESSION
132
*/
133
 
134
#define son( x )			( ( x )->sonf.e )
135
#define bro( x )			( ( x )->brof.e )
136
#define last( x )			( ( x )->lastf )
137
#define name( x )			( ( x )->namef )
138
#define sh( x )				( ( x )->shf )
139
#define pt( x )				( ( x )->ptf.e )
140
#define props( x )			( ( x )->propsf )
141
#define no( x )				( ( x )->numf.l )
142
#define parked( x )			( ( x )->park )
143
 
144
#ifdef NEWDIAGS
145
#define dgf( x )			( ( x )->diagf)
146
#endif
147
 
148
 
149
/*
150
    ALTERNATIVE COMPONENTS OF AN EXPRESSION
151
*/
152
 
153
#define brog( x )			( ( x )->brof.glob )
154
#define nostr( x )			( ( x )->numf.str )
155
#define ptno( x )			( ( x )->ptf.l )
156
#define sonno( x )			( ( x )->sonf.l )
157
#define fno( x )			( ( x )->numf.f )
158
 
159
#ifndef NEWDIAGS
160
#define dno( x )			( ( x )->numf.d )
161
#endif
162
 
163
#define uno( x )			( ( x )->numf.ui )
164
 
165
 
166
/*
167
    MACROS FOR SETTING COMPONENTS OF AN EXPRESSION
168
*/
169
 
170
#define setbro( x, b )			bro ( x ) = ( b )
171
#define setsh( x, b )			sh ( x ) = ( b )
172
#define setson( x, b )			son ( x ) = ( b )
173
#define setpt( x, b )			pt ( x ) = ( b )
174
#define setlast( x )			last ( x ) = 1 
175
#define clearlast( x )			last ( x ) = 0 
176
#define setname( x, n )			name ( x ) = ( n )
177
#define setfather( f, s )		setbro ( s, f ) ; setlast ( s )
178
 
179
 
180
/*
181
    COMPONENTS OF SHAPES
182
*/
183
 
184
#define shape_size( x )			( ( x )->numf.l )
185
#define al2ul( x )			( ( unsigned long )\
186
					 ( ( x )->al.al_val.al ) )
187
#define align_of( x )			( ( x )->brof.ald )
188
#define shape_align( x )		al2ul ( align_of ( x ) )
189
#define al1_of( x )			( ( x )->sonf.ald )
190
#define al1( x )			al2ul ( al1_of ( x ) )
191
#define al2_of( x )			( ( x )->ptf.ald )
192
#define al2( x )			al2ul ( al2_of ( x ) )
193
#define is_signed( x )			( ( x )->lastf )
194
 
195
 
196
/*
197
    ALTERNATIVE USES OF PROPS FIELD
198
*/
199
 
200
#define test_number( x )		(props ( x ) & 0xf)
201
#define settest_number( x, t )		props ( x ) = ((props(x) & ~0xf) |\
202
						       ( t ))
203
 
204
#define round_number( x )		( props ( x ) >> 3 )
205
#define setround_number( x, r )		props ( x ) = ( props ( x ) & 0x7 ) |\
206
						      ( ( r ) << 3 )
207
#define fstack_pos_of( x )		props ( x )
208
 
209
 
210
/*
211
    MACROS FOR MANIPULATING PROPERTIES
212
*/
213
 
214
#define pset( x, m )	props ( x ) = ( prop ) ( props ( x ) | ( m ) )
215
#define pclr( x, m )	props ( x ) = ( prop ) ( props ( x ) & ~( m ) )
216
#define ptst( x, m )	(( props ( x ) & ( m ) ) != 0)
217
 
218
 
219
/*
220
    PROPERTIES OF CONSTRUCTS WITH EXCEPTIONS
221
*/
222
 
223
#define setjmp_dest( x, d )		{ setpt ( x, d ) ;\
224
					  no ( son ( d ) )++ ; }
225
#define seterr_code( x, d )		props ( x ) = ( d )
226
#define isov( x )			( props ( x ) == 0x4 )
227
 
228
#define errhandle( x )			( props ( x ) & 0x7 )
229
#define optop( x )			( ( int ) ( errhandle ( x ) <= 2 ) )
230
#define seterrhandle( x, r )		props ( x ) =\
231
					  ( props ( x ) & ~0x7 ) | ( r )
232
 
233
/*
234
    PROPERTIES OF IDENT CONSTRUCTS
235
*/
236
 
237
#define setvar( x )			pset ( x, 0x01 )
238
#define clearvar( x )			pclr ( x, 0x01 )
239
#define isvar( x )			ptst ( x, 0x01 )
240
#define setid( x )			clearvar ( x )
241
 
242
#define setvis( x )			pset ( x, 0x02 )
243
#define clearvis( x )			pclr ( x, 0x02 )
244
#define isvis( x )			ptst ( x, 0x02 )
245
 
246
#define setenvoff( x )			pset ( x, 0x04 )
247
#define clearenvoff( x )		pclr ( x, 0x04 )
248
#define isenvoff( x )			ptst ( x, 0x04 )
249
 
250
#define setcaonly( x )			pset ( x, 0x08 )
251
#define clearcaonly( x )		pclr ( x, 0x08 )
252
#define iscaonly( x )			ptst ( x, 0x08 )
253
 
254
#define setusereg( x )			pset ( x, 0x10 )
255
#define clearusereg( x )		pclr ( x, 0x10 )
256
#define isusereg( x )			ptst ( x, 0x10 )
257
 
258
#define setparam( x )			pset ( x, 0x20 )
259
#define clearparam( x )			pclr ( x, 0x20 )
260
#define isparam( x )			ptst ( x, 0x20 )
261
 
262
#define setglob( x )			pset ( x, 0x40 )
263
#define clearglob( x )			pclr ( x, 0x40 )
264
#define isglob( x )			ptst ( x, 0x40 )
265
 
266
#define setcopy( x )			pset ( x, 0x80 )
267
#define clearcopy( x )			pclr ( x, 0x80 )
268
#define copying( x )			ptst ( x, 0x80 )
269
 
270
#define set_intnl_call( x )		pset ( x, 0x80 )
271
#define has_intnl_call( x )		ptst ( x, 0x80 )
272
 
273
				/* inlined in bitmacs.h, note also used in
274
				 scan_cond() */
275
#define setinlined(x)			pset(x, inlined)
276
#define isinlined(x)			ptst(x, inlined)
277
#define clearinlined(x)			pclr(x, inlined)
278
 
279
#define setoutpar(x) props(x) |= 0x8000
280
#define isoutpar(x) ((props(x) & 0x8000) != 0)
281
#define clearoutpar(x) props(x) &= ~0x8000
282
 
283
 
284
/*
285
    PROPERTIES OF MAKE_PROC CONSTRUCTS
286
*/
287
 
288
#define set_struct_res( x )		pset ( x, 0x01 )
289
#define has_struct_res( x )		ptst ( x, 0x01 )
290
 
291
#define set_loc_address( x )		pset ( x, 0x02 )
292
#define loc_address( x )		ptst ( x, 0x02 )
293
 
294
#define set_proc_has_setjmp( x )	pset ( x, 0x04 )
295
#define proc_has_setjmp( x )		ptst ( x, 0x04 )
296
 
297
#define set_proc_has_alloca( x )	pset ( x, 0x08 )
298
#define proc_has_alloca( x )		ptst ( x, 0x08 )
299
 
300
#define set_proc_has_lv( x )		pset ( x, 0x10 )
301
#define proc_has_lv( x )		ptst ( x, 0x10 )
302
 
303
#define isrecursive( x )		ptst ( x, 0x20 )
304
#define setrecursive( x )		pset ( x, 0x20 )
305
 
306
#define set_proc_uses_crt_env( x )	pset ( x, 0x40 )
307
#define proc_uses_crt_env( x )		ptst ( x, 0x40 )
308
 
309
#define set_proc_uses_external( x )	pset ( x, 0x80 )
310
#define proc_uses_external( x )		ptst ( x, 0x80 )
311
 
312
 
313
/*
314
    PROPERTIES OF SOLVE CONSTRUCT
315
*/
316
 
317
#define setcrtsolve( x )		props ( x ) = 0x01
318
#define set_copying_solve( x )		pset ( x, 0x01 )
319
#define clear_copying_solve( x )	pclr ( x, 0x01 )
320
#define is_copying_solve( x )		ptst ( x, 0x01 )
321
 
322
 
323
/*
324
    PROPERTIES OF MOVE_SOME CONSTRUCT
325
*/
326
 
327
#define setnooverlap( x )		pset ( x, 0x01 )
328
#define isnooverlap( x )		ptst ( x, 0x01 )
329
 
330
 
331
/*
332
    PROPERTIES OF CONTENTS CONSTRUCT
333
*/
334
 
335
#define set_propagate( x )		pset ( x, 0x01 )
336
#define clear_propagate( x )		pclr ( x, 0x01 )
337
#define to_propagate( x )		ptst ( x, 0x01 )
338
 
339
 
340
/*
341
    PROPERTIES OF LABST CONSTRUCT
342
*/
343
 
344
#define set_loaded_lv( x )		pset ( x, 0x10 )
345
#define is_loaded_lv( x )		ptst ( x, 0x10 )
346
#define setunroll(x) 			pset ( x, 0x04)
347
#define clearunroll(x)  		pclr ( x, 0x04)
348
#define isunroll(x) 			ptst ( x, 0x04)
349
 
350
 
351
/*
352
    PROPERTIES OF NAME CONSTRUCT
353
*/
354
 
355
#define setlastuse( x )			pset ( x, 0x01 )
356
#define islastuse( x )			ptst ( x, 0x01 )
357
 
358
#define setloadparam( x )		pset ( x, 0x02 )
359
#define isloadparam( x )		ptst ( x, 0x02 )
360
 
361
#define setreallyass( x )		/* not used */
362
#define isreallyass( x )		( 0 )
363
 
364
#ifdef NEWDIAGS
365
#define setisdiaginfo( x )		pset ( x, 0x08 )
366
#define isdiaginfo( x )			ptst ( x, 0x08 )
367
 
368
#define setdiscarded( x )		pset ( x, 0x010 )
369
#define isdiscarded( x )		ptst ( x, 0x010 )
370
#endif
371
 
372
 
373
/*
374
    PROPERTIES OF VAL CONSTRUCT
375
*/
376
 
377
#define setbigval( x )			pset ( x, 0x01 )
378
#define clearbigval( x )		pclr ( x, 0x01 )
379
#define isbigval( x )			ptst ( x, 0x01 )
380
 
381
#define setconstovf( x )		pset ( x, 0x02 )
382
#define constovf( x )			ptst ( x, 0x02 )
383
 
384
 
385
/* properties of REP construction */
386
				/* from 80x86 */
387
 
388
#define setunrolled(x)  		pset(x, 0x01)
389
#define isunrolled(x)			ptst(x,0x01)
390
 
391
/* properties of APPLY construction */
392
#define settoinline(x)  		pset(x, 0x01)
393
#define istoinline(x) 			ptst(x, 0x01)
394
 
395
 
396
/* properties of ASM construction */
397
#define asm_string(x)			ptst(x, 0x01)
398
#define asm_in(x)			ptst(x, 0x02)
399
#define asm_out(x)			ptst(x, 0x04)
400
#define asm_ptr(x)			ptst(x, 0x08)
401
#define asm_var(x)			ptst(x, 0x0c)	/* out | ptr */
402
 
403
 
404
/*
405
    USEFUL CONSTANTS
406
*/
407
 
408
#define align1				( ( unsigned long ) 1 )
409
#define align8				( ( unsigned long ) 8 )
410
#define align16				( ( unsigned long ) 16 )
411
#define align32				( ( unsigned long ) 32 )
412
 
413
#define Z				( ( long ) 0 )
414
#define size8				( ( long ) 8 )
415
#define size16				( ( long ) 16 )
416
#define size32				( ( long ) 32 )
417
#define size64				( ( long ) 64 )
418
 
419
 
420
/*
421
    ROUNDING
422
*/
423
 
424
#define rounder( n, a ) ( ( ( ( n ) + ( a ) - 1 ) / ( a ) ) * ( a ) )
425
 
426
/* New operations for spec 3.1 */
427
#define set_callee(id)	setname(son(id), formal_callee_tag)
428
#define set_make_procprops(e, p) props(e) |= ((p)<<8)
429
#define proc_has_vcallees(e) ((props(e) & 0x200)!=0)
430
#define postlude_has_call(e) (props(e) & 1)
431
#define set_postlude_has_call(e) (props(e) |= 1)
432
#define clear_postlude_has_call(e) (props(e) &= ~1)
433
#define call_has_vcallees(e) ((props(e) & 2) != 0)
434
#define proc_has_checkstack(e) ((props(e) & 0x800)!=0)
435
#define proc_has_vcallers(e) ((props(e) & 0x100) != 0)
436
#define proc_has_nolongj(e) ((props(e) & 0x1000) !=0)
437
 
438
#ifdef GENCOMPAT
439
#define proc_may_have_callees(e) ((props(e) & 0x8000) != 0)
440
#define set_proc_may_have_callees(e) (props(e) |= 0x8000)
441
#endif
442
 
443
#define frame_al_of_ptr(e) (e)->sonf.ald->al.al_val.al_frame
444
#define frame_al1_of_offset(e) (e)->sonf.ald->al.al_val.al_frame
445
#define include_vcallees(e) (e & 16)
446
#define cees(e) (e & 24)
447
#define l_or_cees(e)	(e&25)
448
 
449
#define call_is_untidy(e) ((props(e) & 0x4) != 0)
450
 
451
#define set_checkalloc(x) props(x) |= 1
452
#define checkalloc(x) (props(x) & 1)
453
 
454
/* property of current_env */
455
#define setcallee_offset(x) (props(x) |= 1)
456
#define callee_offset(x) (props(x) & 1)
457
 
458
#endif /* EXPMACS_INCLUDED */
459
 
460
 
461
 
462
 
463