1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 /* static char sccsid[] = "@(#)pc.h 1.5 02/02/82"; */ 4 5 /* 6 * random constants for pc 7 */ 8 9 /* 10 * the name of the display. 11 */ 12 #define DISPLAYNAME "__disply" 13 14 /* 15 * the structure below describes the locals used by the run time system. 16 * at function entry, at least this much space is allocated, 17 * and the following information is filled in: 18 * the address of a routine to close the current frame for unwinding, 19 * a pointer to the display entry for the current static level and 20 * the previous contents of the display for this static level. 21 * the curfile location is used to point to the currently active file, 22 * and is filled in as io is initiated. 23 * one of these structures is allocated on the (negatively growing) stack. 24 * at function entry, fp is set to point to the last field of the struct, 25 * thus the offsets of the fields are as indicated below. 26 */ 27 struct rtlocals { 28 struct iorec *curfile; 29 struct dispsave dsave; 30 struct dispsave *dptr; 31 int (*unwind)(); 32 } rtlocs; 33 #define CURFILEOFFSET ( ( -sizeof rtlocs ) + sizeof rtlocs.unwind ) 34 #define DSAVEOFFSET ( CURFILEOFFSET + sizeof rtlocs.curfile ) 35 #define DPTROFFSET ( DSAVEOFFSET + sizeof rtlocs.dsave ) 36 #define UNWINDOFFSET ( DPTROFFSET + sizeof rtlocs.dptr ) 37 #define UNWINDNAME "_UNWIND" 38 39 /* 40 * the register save mask for saving no registers 41 */ 42 #define RSAVEMASK ( 0 ) 43 44 /* 45 * runtime check mask for divide check and integer overflow 46 */ 47 #define RUNCHECK ( ( 1 << 15 ) | ( 1 << 14 ) ) 48 49 /* 50 * formats for various names 51 * NAMEFORMAT arbitrary length strings. 52 * EXTFORMAT for externals, a preceding underscore. 53 * LABELFORMAT for label names, a preceding dollar-sign. 54 * PREFIXFORMAT used to print made up names with prefixes. 55 * LABELPREFIX with getlab() makes up label names. 56 * LLABELPREFIX with getlab() makes up sdb labels. 57 * FORMALPREFIX prefix for EXTFORMAT for formal entry points. 58 * a typical use might be to print out a name with a preceeding underscore 59 * with putprintf( EXTFORMAT , 0 , name ); 60 */ 61 #define NAMEFORMAT "%s" 62 #define EXTFORMAT "_%s" 63 #define LABELFORMAT "$%s" 64 #define PREFIXFORMAT "%s%d" 65 #define LABELPREFIX "L" 66 #define LLABELPREFIX "LL" 67 #define FORMALPREFIX "__" 68 69 /* 70 * the name of the statement counter 71 */ 72 #define STMTCOUNT "__stcnt" 73 74 /* 75 * the name of the pcp counters 76 */ 77 #define PCPCOUNT "__pcpcount" 78 79 /* 80 * a vector of pointer to enclosing functions for fully qualified names. 81 */ 82 char *enclosing[ DSPLYSZ ]; 83 84 /* 85 * and of course ... 86 */ 87 #define BITSPERBYTE 8 88