ack/util/ego/share/global.h

53 lines
1.2 KiB
C
Raw Permalink Normal View History

1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-03-09 19:15:41 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1984-11-26 15:04:22 +00:00
/* G L O B A L V A R I A B L E S */
/* sizes of TARGET machine */
extern int ps; /* pointer size */
extern int ws; /* word size */
/* sizes of SOURCE machine (i.e. machine on which
* the optimizer runs)
*/
/* number of bits in a byte */
#define BYTELENGTH 8
#if BYTELENGTH==8
#define DIVBL(a) ((a) >> 3)
#define MODBL(a) ((a) & (int)07)
1984-11-26 15:04:22 +00:00
#else
#define DIVBL(a) (a/BYTELENGTH)
#define MODBL(a) (a%BYTELENGTH)
#endif
#define WORDLENGTH (sizeof(int)*BYTELENGTH)
#define DIVWL(a) (WORDLENGTH==16 ? \
((a)>>4) : \
(WORDLENGTH==32 ? \
((a)>>5) : \
((a)/(8*(int)sizeof(int)))))
#define MODWL(a) (WORDLENGTH==16 ? \
((a)&(int)017) : \
(WORDLENGTH==32 ? \
((a)&(int)037) : \
((a)%(8*(int)sizeof(int)))))
1984-11-26 15:04:22 +00:00
#define UNKNOWN_SIZE (-1)
2018-02-05 21:09:30 +00:00
extern proc_p curproc; /* current procedure */
1984-11-26 15:04:22 +00:00
2018-02-05 21:09:30 +00:00
extern char *filename; /* name of current input file */
1984-11-26 15:04:22 +00:00
extern lset mesregs; /* set of MES ms_reg pseudos */
2018-02-05 21:09:30 +00:00
extern short time_space_ratio; /* 0 if optimizing for space only,
1984-11-26 15:04:22 +00:00
* 100 if optimizing for time only,
* else something 'in between'.
*/