Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
8.6 KiB

4 years ago
  1. /*
  2. * |-----------------------------------------------------------|
  3. * | Copyright (c) 1990 MIPS Computer Systems, Inc. |
  4. * | All Rights Reserved |
  5. * |-----------------------------------------------------------|
  6. * | Restricted Rights Legend |
  7. * | Use, duplication, or disclosure by the Government is |
  8. * | subject to restrictions as set forth in |
  9. * | subparagraph (c)(1)(ii) of the Rights in Technical |
  10. * | Data and Computer Software Clause of DFARS 52.227-7013. |
  11. * | MIPS Computer Systems, Inc. |
  12. * | 950 DeGuigne Drive |
  13. * | Sunnyvale, CA 94086 |
  14. * |-----------------------------------------------------------|
  15. */
  16. /*
  17. *-------------------------------------------------------------
  18. *| RESTRICTED RIGHTS LEGEND |
  19. *| Use, duplication, or disclosure by the Government is |
  20. *| subject to restrictions as set forth in subparagraph |
  21. *| (c)(1)(ii) of the Rights in Technical Data and Computer |
  22. *| Software Clause at DFARS 252.227-7013. |
  23. *| MIPS Computer Systems, Inc. |
  24. *| 928 Arques Avenue |
  25. *| Sunnyvale, CA 94086 |
  26. *-------------------------------------------------------------
  27. */
  28. /* $Header: stsupport.h,v 2020.2.1.1 91/02/25 17:53:24 jalal Exp $ */
  29. /*
  30. * Author Mark I. Himelstein
  31. * Date Started 5/15/85
  32. * Purpose provide support to uc to produce mips symbol tables.
  33. */
  34. #ifndef __CMPLRS_STSUPPORT_H
  35. #define __CMPLRS_STSUPPORT_H
  36. #ifdef LANGUAGE_C
  37. AUXU _auxtemp;
  38. #define AUXINT(c) ((_auxtemp.isym = c), _auxtemp)
  39. /* the following struct frames the FDR dtructure and is used at runtime
  40. * to access the objects in the FDR with pointers (since the FDR
  41. * only has indeces.
  42. */
  43. typedef struct {
  44. pFDR pfd; /* file descriptor for this file */
  45. pSYMR psym; /* symbols for this file */
  46. long csymMax; /* max allocated */
  47. pAUXU paux; /* auxiliaries for this file */
  48. long cauxMax; /* max allocated */
  49. char *pss; /* strings space for this file */
  50. long cbssMax; /* max bytes allowed in ss */
  51. pOPTR popt; /* optimization table for this file */
  52. long coptMax; /* max allocated */
  53. pLINER pline; /* lines for this file */
  54. long clineMax; /* max allocated */
  55. pRFDT prfd; /* file indirect for this file */
  56. long crfdMax; /* max allocated */
  57. pPDR ppd; /* procedure descriptor tables */
  58. long cpdMax; /* max allocated */
  59. long freadin; /* set if read in */
  60. } CFDR, *pCFDR;
  61. #define cbCFDR sizeof (CFDR)
  62. #define cfdNil ((pCFDR) 0)
  63. #define icfdNil -1
  64. /* the following struct embodies the HDRR dtructure and is used at runtime
  65. * to access the objects in the HDRR with pointers (since the HDRR
  66. * only has indeces.
  67. */
  68. typedef struct {
  69. long fappend; /* are we appending to this beast ? */
  70. pCFDR pcfd; /* the compile time file descriptors */
  71. pFDR pfd; /* all of the file descriptors in this cu */
  72. long cfd; /* count of file descriptors */
  73. long cfdMax; /* max file descriptors */
  74. pSYMR psym; /* the symbols for this cu */
  75. pEXTR pext; /* externals for this cu */
  76. long cext; /* number of externals */
  77. long cextMax; /* max currently allowed */
  78. char *pssext; /* string space for externals */
  79. long cbssext; /* # of bytes in ss */
  80. long cbssextMax; /* # of bytes allowed in ss */
  81. pAUXU paux; /* auxiliaries for this cu */
  82. char *pss; /* string space for this cu */
  83. pDNR pdn; /* dense number table for this cu */
  84. long cdn; /* number of dn's */
  85. long cdnMax; /* max currently allowed */
  86. pOPTR popt; /* optimization table for this cu */
  87. pLINER pline; /* lines for this cu */
  88. pRFDT prfd; /* file indirect for this cu */
  89. pPDR ppd; /* procedure descriptor tables */
  90. int flags; /* which has been read in already */
  91. int fswap; /* do dubtables need to be swapped */
  92. HDRR hdr; /* header from disk */
  93. } CHDRR, *pCHDRR;
  94. #define cbCHDRR sizeof (CHDRR)
  95. #define chdrNil ((pCHDRR) 0)
  96. #define ichdrNil -1
  97. #endif // LANGUAGE_C
  98. /* constants and macros */
  99. #define ST_FILESINIT 25 /* initial number of files */
  100. #define ST_STRTABINIT 512 /* initial number of bytes in strring space */
  101. #define ST_EXTINIT 32 /* initial number of symbols/file */
  102. #define ST_SYMINIT 64 /* initial number of symbols/file */
  103. #define ST_AUXINIT 64 /* initial number of auxiliaries/file */
  104. #define ST_LINEINIT 512 /* initial number of auxiliaries/file */
  105. #define ST_PDINIT 32 /* initial number of procedures in one file */
  106. #define ST_DNINIT 128 /* initial # of dense numbers */
  107. #define ST_FDISS 1 /* we expect a fd's iss to be this */
  108. #define ST_IDNINIT 2 /* start the dense num tab with this entry */
  109. #define ST_PROCTIROFFSET 1 /* offset from aux of proc's tir */
  110. #define ST_RELOC 1 /* this sym has been reloced already */
  111. #ifdef LANGUAGE_FORTRAN
  112. #define ST_EXTIFD 0x7fffffff /* ifd for externals */
  113. #define ST_RFDESCAPE 0xfff /* rndx.rfd escape says next aux is rfd */
  114. #define ST_ANONINDEX 0xfffff /* rndx.index for anonymous names */
  115. #endif
  116. #ifdef LANGUAGE_C
  117. #define ST_EXTIFD 0x7fffffff /* ifd for externals */
  118. #define ST_RFDESCAPE 0xfff /* rndx.rfd escape says next aux is rfd */
  119. #define ST_ANONINDEX 0xfffff /* rndx.index for anonymous names */
  120. #define ST_PEXTS 0x01 /* mask, if set externals */
  121. #define ST_PSYMS 0x02 /* mask, if set symbols */
  122. #define ST_PLINES 0x04 /* mask, if set lines */
  123. #define ST_PHEADER 0x08 /* mask, if set headers */
  124. #define ST_PDNS 0x10 /* mask, if set dense numbers */
  125. #define ST_POPTS 0x20 /* mask, if set optimization entries */
  126. #define ST_PRFDS 0x40 /* mask, if set file indirect entries */
  127. #define ST_PSSS 0x80 /* mask, if set string space */
  128. #define ST_PPDS 0x100 /* mask, if set proc descriptors */
  129. #define ST_PFDS 0x200 /* mask, if set file descriptors */
  130. #define ST_PAUXS 0x400 /* mask, if set auxiliaries */
  131. #define ST_PSSEXTS 0x800 /* mask, if set external string space */
  132. #endif // LANGUAGE_C
  133. #ifdef LANGUAGE_PASCAL
  134. #define ST_EXTIFD 16#7fffffff /* ifd for externals */
  135. #define ST_RFDESCAPE 16#fff /* rndx.rfd escape says next aux is rfd */
  136. #define ST_ANONINDEX 16#fffff /* rndx.index for anonymous names */
  137. #define ST_PEXTS 16#01 /* mask, if set externals */
  138. #define ST_PSYMS 16#02 /* mask, if set symbols */
  139. #define ST_PLINES 16#04 /* mask, if set lines */
  140. #define ST_HEADER 16#08 /* mask, if set header */
  141. #define ST_PDNS 16#10 /* mask, if set dense numbers */
  142. #define ST_POPTS 16#20 /* mask, if set optimization entries */
  143. #define ST_PRFDS 16#40 /* mask, if set file indirect entries */
  144. #define ST_PSSS 16#80 /* mask, if set string space */
  145. #define ST_PPDS 16#100 /* mask, if set proc descriptors */
  146. #define ST_PFDS 16#200 /* mask, if set file descriptors */
  147. #define ST_PAUXS 16#400 /* mask, if set auxiliaries */
  148. #define ST_PSSEXTS 16#800 /* mask, if set external string space */
  149. #endif // LANGUAGE_PASCAL
  150. #define ST_FCOMPLEXBT(bt) ((bt == btStruct) || (bt == btUnion) || (bt == btTypedef) || (bt == btEnum))
  151. #define valueNil 0
  152. #define export
  153. /*
  154. * Constants to describe aux types used in swap_aux( , ,type);
  155. */
  156. #define ST_AUX_TIR 0
  157. #define ST_AUX_RNDXR 1
  158. #define ST_AUX_DNLOW 2
  159. #define ST_AUX_DNMAC 3
  160. #define ST_AUX_ISYM 4
  161. #define ST_AUX_ISS 5
  162. #define ST_AUX_WIDTH 6
  163. /* $Log: stsupport.h,v $
  164. * Revision 2020.2.1.1 91/02/25 17:53:24 jalal
  165. * update copyright
  166. *
  167. * Revision 2020.2 90/02/19 14:12:44 bettina
  168. * 2.20 - add legend
  169. *
  170. * Revision 2010.3 89/09/26 23:53:12 lai
  171. * updated wrapper
  172. *
  173. * Revision 2010.2 89/09/26 22:16:29 lai
  174. * added wrapper and $LOG
  175. *
  176. */
  177. #endif