1738Speter /* Copyright (c) 1979 Regents of the University of California */ 2738Speter 3*9120Smckusick /* static char sccsid[] = "@(#)pc.h 1.6 11/10/82"; */ 4738Speter 5*9120Smckusick #include <setjmp.h> 6*9120Smckusick 7738Speter /* 8738Speter * random constants for pc 9738Speter */ 10738Speter 11738Speter /* 12738Speter * the name of the display. 13738Speter */ 14738Speter #define DISPLAYNAME "__disply" 15738Speter 16738Speter /* 17738Speter * the structure below describes the locals used by the run time system. 18738Speter * at function entry, at least this much space is allocated, 19738Speter * and the following information is filled in: 20738Speter * the address of a routine to close the current frame for unwinding, 21738Speter * a pointer to the display entry for the current static level and 22738Speter * the previous contents of the display for this static level. 23738Speter * the curfile location is used to point to the currently active file, 24738Speter * and is filled in as io is initiated. 25738Speter * one of these structures is allocated on the (negatively growing) stack. 26738Speter * at function entry, fp is set to point to the last field of the struct, 27738Speter * thus the offsets of the fields are as indicated below. 28738Speter */ 29738Speter struct rtlocals { 30*9120Smckusick jmp_buf gotoenv; 31738Speter struct iorec *curfile; 32738Speter struct dispsave dsave; 33738Speter } rtlocs; 34*9120Smckusick #define GOTOENVOFFSET ( -sizeof rtlocs ) 35*9120Smckusick #define CURFILEOFFSET ( GOTOENVOFFSET + sizeof rtlocs.gotoenv ) 36738Speter #define DSAVEOFFSET ( CURFILEOFFSET + sizeof rtlocs.curfile ) 37738Speter 38738Speter /* 39738Speter * the register save mask for saving no registers 40738Speter */ 41738Speter #define RSAVEMASK ( 0 ) 42738Speter 43738Speter /* 44738Speter * runtime check mask for divide check and integer overflow 45738Speter */ 46738Speter #define RUNCHECK ( ( 1 << 15 ) | ( 1 << 14 ) ) 47738Speter 48738Speter /* 49738Speter * formats for various names 50738Speter * NAMEFORMAT arbitrary length strings. 51738Speter * EXTFORMAT for externals, a preceding underscore. 524880Speter * LABELFORMAT for label names, a preceding dollar-sign. 53738Speter * PREFIXFORMAT used to print made up names with prefixes. 54738Speter * LABELPREFIX with getlab() makes up label names. 55738Speter * LLABELPREFIX with getlab() makes up sdb labels. 563428Speter * FORMALPREFIX prefix for EXTFORMAT for formal entry points. 57738Speter * a typical use might be to print out a name with a preceeding underscore 58738Speter * with putprintf( EXTFORMAT , 0 , name ); 59738Speter */ 60738Speter #define NAMEFORMAT "%s" 61738Speter #define EXTFORMAT "_%s" 624880Speter #define LABELFORMAT "$%s" 63738Speter #define PREFIXFORMAT "%s%d" 64738Speter #define LABELPREFIX "L" 65738Speter #define LLABELPREFIX "LL" 663428Speter #define FORMALPREFIX "__" 67738Speter 68738Speter /* 69738Speter * the name of the statement counter 70738Speter */ 71738Speter #define STMTCOUNT "__stcnt" 72738Speter 73738Speter /* 74738Speter * the name of the pcp counters 75738Speter */ 76738Speter #define PCPCOUNT "__pcpcount" 77738Speter 78738Speter /* 79738Speter * a vector of pointer to enclosing functions for fully qualified names. 80738Speter */ 81738Speter char *enclosing[ DSPLYSZ ]; 82738Speter 83738Speter /* 84738Speter * and of course ... 85738Speter */ 86738Speter #define BITSPERBYTE 8 87