internal.tex 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. %
  2. % $Id$
  3. % This file is part of the FPC documentation.
  4. % Copyright (C) 1998 by Florian Klaempfl
  5. %
  6. % The FPC documentation is free text; you can redistribute it and/or
  7. % modify it under the terms of the GNU Library General Public License as
  8. % published by the Free Software Foundation; either version 2 of the
  9. % License, or (at your option) any later version.
  10. %
  11. % The FPC Documentation is distributed in the hope that it will be useful,
  12. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. % Library General Public License for more details.
  15. %
  16. % You should have received a copy of the GNU Library General Public
  17. % License along with the FPC documentation; see the file COPYING.LIB. If not,
  18. % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. % Boston, MA 02111-1307, USA.
  20. %
  21. \documentclass{report}
  22. %
  23. % Preamble
  24. %
  25. \ifx\pdfoutput\undefined
  26. \usepackage{html}
  27. \usepackage{htmllist}
  28. \latex{\usepackage{fpc}}
  29. \else
  30. \usepackage{fpc}
  31. \fi
  32. %
  33. \html{\input{fpc-html.tex}}
  34. %
  35. \ifpdf
  36. \pdfinfo{/Author(Michael Van Canneyt)
  37. /Title(Programmers' Guide)
  38. /Subject(Free Pascal Compiler documentation)
  39. /Keywords(Free Pascal, Compiler, Internals)
  40. }
  41. \fi
  42. %
  43. % Settings
  44. %
  45. \makeindex
  46. %
  47. % Start of document.
  48. %
  49. \begin{document}
  50. \title{Free Pascal :\\ Compiler documentation}
  51. \docdescription{Compiler documentation for \fpc, version \fpcversion}
  52. \docversion{1.0}
  53. \input{date.inc}
  54. \author{Micha\"el Van Canneyt\\Florian Kl\"ampfl}
  55. \maketitle
  56. \tableofcontents
  57. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  58. % Introduction
  59. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  60. \chapter{Introduction}
  61. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  62. % About this document
  63. \section{About this document}
  64. This document tries to make the internal workings of \fpc more clear.
  65. It is assumed that the reader has some knowledge about compiler
  66. building.
  67. This document describes the compiler as it is/functions at the time of
  68. writing. Since the compiler is under continuous development, some of the
  69. things described here may be outdated. In case of doubt, consult the
  70. \file{README} files distributed with the compiler.
  71. The \file{README} files are, in case of conflict with this manual,
  72. authoritative.
  73. I hope, my poor english is quite understandable. Feel free to correct
  74. spelling mistakes.
  75. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  76. % About the compiler
  77. \section{About the compiler}
  78. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  79. % Getting more information.
  80. \section{Getting more information.}
  81. The ultimate source for information about compiler internals is
  82. the compiler source, though it isn't very well documented. If you
  83. need more information you should join the developers mailing
  84. list or you can contact the developers.
  85. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  86. % Overview
  87. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  88. \chapter{Overview}
  89. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  90. % History
  91. \section{History}
  92. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  93. % The compiler passes
  94. \section{The compiler passes}
  95. It isn't easy to divide the compilation process of \fpc into passes
  96. how it is described by many thesis about compiler building,
  97. but I would say \fpc does the compilation in five passes:
  98. \begin{enumerate}
  99. \item Scanning and Parsing. The compiler reads the input file,
  100. does preprocessing (i. e.
  101. reading include files, expanding macros ...) (\ref{ch:scanner})
  102. and the parser (\ref{ch:parser}) creates a parse tree (\ref{ch:parse_tree}).
  103. While this pass the compiler builds also the symbol tables
  104. (\ref{ch:symbol_tables}).
  105. \item Semantic analysis. This pass checks if semantic of
  106. the code is correct, i.e. if the types of expressions matches
  107. to the operators (\ref{ch:semantical_analysis}). This pass determines
  108. also how many registers are needed to evalute an expression, this
  109. information is used by the code generator later.
  110. \item Code generation
  111. \item Optimizing of the assembler
  112. \item Assembler writing
  113. \end{enumerate}
  114. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  115. % The scanner
  116. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  117. %% \chapter{The scanner}
  118. \label{ch:scanner}
  119. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  120. % The symbol tables
  121. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  122. \chapter{The symbol tables}
  123. \label{ch:symbol_tables}
  124. The symbol table is used to store information about all
  125. symbols, declarations and definitions in a program.
  126. In an abstract view, a symbol table is a data base with a string field
  127. as index. \fpc implements the symbol table mainly as a binary tree, but
  128. for big symbol tables some hash technics are used. The implementation
  129. can be found in symtable.pas, object tsymtable.
  130. The symbol table module can't be associated with a stage of the compiler,
  131. each stage accesses it.
  132. The scanner uses a symbol table to handle preprocessor symbols, the
  133. parser inserts declaration and the code generator uses the collected
  134. information about symbols and types to generate the code.
  135. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  136. % Definitions
  137. \section{Definitions}
  138. Definitions are one of the most important data structures in \fpc.
  139. They are used to describe types, for example the type of a variable
  140. symbol is given by a definition and the result type
  141. of a expression is given as a definition.
  142. They have nothing to do with the definition of a procedure.
  143. Definitions are implemented as an object (in file \file{symtable.pas},
  144. \var{tdef} and its descendents). There are a lot of different
  145. definitions, for example to describe
  146. ordinal types, arrays, pointers, procedures, ...
  147. To make it more clear let's have a look at the fields of tdef:
  148. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  149. % Symbols
  150. %% \section{Symbols}
  151. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  152. % Working with symbol tables
  153. %% \section{Working with symbol tables}
  154. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  155. % The parse tree
  156. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  157. %% \chapter{The parse tree}
  158. \label{ch:parse_tree}
  159. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  160. % The parser
  161. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  162. %% \chapter{The parser}
  163. \label{ch:parser}
  164. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  165. % The semantical analysis
  166. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  167. %% \chapter{The semantical analysis}
  168. \label{ch:semantical_analysis}
  169. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  170. % The code generation
  171. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  172. %% \chapter{The code generation}
  173. \label{ch:code_generation}
  174. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  175. % The assembler writers
  176. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  177. \chapter{The assembler writers}
  178. \label{ch:assembler_writers}
  179. \fpc doesn't generate machine language, it generates
  180. assembler which must be assembled and linked.
  181. The assembler output is configurable, \fpc can create
  182. assembler for the \file{GNU AS}, the \file{NASM} (Netwide assembler) and
  183. the assemblers of Borland and Microsoft. The default assembler
  184. is the \file{GNU AS}, because it is fast and and available on
  185. many platforms. Why don't we use the \file{NASM}? It is 2-4 times
  186. slower than the \file{GNU AS} and it is created for
  187. hand-written assembler, while the \file{GNU AS} is designed
  188. as back end for a compiler.
  189. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  190. % Miscalleanous
  191. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  192. %% \chapter{Miscalleanous}
  193. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  194. % The register allocation
  195. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  196. \chapter{The register allocation}
  197. The register allocation is very hairy, so it gets
  198. an own chapter in this manual. Please be careful when changing things
  199. regarding the register allocation and test such changes intensive.
  200. Future versions will may implement another kind of register allocation
  201. to make this part of the compiler more robust, see
  202. \ref{se:future_plans}. But the current
  203. system is less or more working and changing it would be a lot of
  204. work, so we have to live with it.
  205. The current register allocation mechanism was implemented 5 years
  206. ago and I didn't think that the compiler would become
  207. so popular, so not much time was spent in the design of it.
  208. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  209. % Basics
  210. \section{Basics}
  211. The register allocation is done in the first and the second pass of
  212. the compiler.
  213. The first pass of a node has to calculate how much registers
  214. are necessary to generate code for the node, but it also has
  215. to take care of child nodes i.e. how much registers
  216. they need.
  217. The register allocation is done via \var{getregister\*}
  218. %(where * is \var{32} or \var{mmx}).
  219. Registers can be released via \var{ungetregister\*}. All registers
  220. of a reference (i.e. base and index) can be released by
  221. \var{del\_reference}. These procedures take care of the register type,
  222. i.e. stack/base registers and registers allocated by register
  223. variables aren't added to the set of unused registers.
  224. If there is a problem in the register allocation an \var{internalerror(10)}
  225. occurs.
  226. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  227. % A simple example
  228. \section{A simple example}
  229. \subsection{The first pass}
  230. This is a part of the first pass for a pointer dereferencation
  231. (\var{p\^\ }), the type determination and some other stuff are left out.
  232. \begin{verbatim}
  233. procedure firstderef(var p : ptree);
  234. begin
  235. // .....
  236. // first pass of the child node
  237. firstpass(p^.left);
  238. // .....
  239. // to dereference a pointer we need one one register
  240. // but if the child node needs more registers, we
  241. // have to pass this to our parent node
  242. p^.registers32:=max(p^.left^.registers32,1);
  243. // a pointer dereferencation doesn't need
  244. // fpu or mmx registers
  245. p^.registersfpu:=p^.left^.registersfpu;
  246. p^.registersmmx:=p^.left^.registersmmx;
  247. // .....
  248. end;
  249. \end{verbatim}
  250. \subsection{The second pass}
  251. The following code contains the complete second pass for
  252. a pointer dereferencing node as it is used by current
  253. compiler versions:
  254. \begin{verbatim}
  255. procedure secondderef(var p : ptree);
  256. var
  257. hr : tregister;
  258. begin
  259. // second pass of the child node, this generates also
  260. // the code of the child node
  261. secondpass(p^.left);
  262. // setup the reference (this sets all values to nil, zero or
  263. // R_NO)
  264. clear_reference(p^.location.reference);
  265. // now we have to distinguish the different locations where
  266. // the child node could be stored
  267. case p^.left^.location.loc of
  268. LOC_REGISTER:
  269. // LOC_REGISTER allows us to use simply the
  270. // result register of the left node
  271. p^.location.reference.base:=p^.left^.location.register;
  272. LOC_CREGISTER:
  273. begin
  274. // we shouldn't destroy the result register of the
  275. // result node, because it is a register variable
  276. // so we allocate a register
  277. hr:=getregister32;
  278. // generate the loading instruction
  279. emit_reg_reg(A_MOV,S_L,p^.left^.location.register,hr);
  280. // setup the result location of the current node
  281. p^.location.reference.base:=hr;
  282. end;
  283. LOC_MEM,LOC_REFERENCE:
  284. begin
  285. // first, we have to release the registers of
  286. // the reference, before we can allocate
  287. // register, del_reference release only the
  288. // registers used by the reference,
  289. // the contents of the registers isn't destroyed
  290. del_reference(p^.left^.location.reference);
  291. // now there should be at least one register free, so
  292. // we can allocate one for the base of the result
  293. hr:=getregister32;
  294. // generate dereferencing instruction
  295. exprasmlist^.concat(new(pai386,op_ref_reg(
  296. A_MOV,S_L,newreference(p^.left^.location.reference),
  297. hr)));
  298. // setup the location of the new created reference
  299. p^.location.reference.base:=hr;
  300. end;
  301. end;
  302. end;
  303. \end{verbatim}
  304. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  305. % Binary nodes
  306. \section{Binary nodes}
  307. The whole thing becomes a little bit more hairy if you have to
  308. generate code for a binary+ node (a node with two or more
  309. childs). If a node calls second pass for a child node,
  310. it has to ensure that enough registers are free
  311. to evaluate the child node (\var{usableregs>=childnode\^.registers32}).
  312. If this condition isn't met, the current node has
  313. to store and restore all registers which the node owns to
  314. release registers. This should be done using the
  315. procedures \var{maybe\_push} and \var{restore}. If still
  316. \var{usableregs<childnode\^.registers32}, the child nodes have to solve
  317. the problem. The point is: if \var{usableregs<childnode\^.registers32},
  318. the current node has to release all registers which it owns
  319. before the second pass is called. An example for generating
  320. code of a binary node is \var{cg386add.secondadd}.
  321. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  322. % FPU registers
  323. \section{FPU registers}
  324. The number of required FPU registers also has to be calculated, but
  325. there's one difference: you don't have to save registers. If not
  326. enough FPU registers are free, an error message is generated, as the user
  327. has to take care of this situation since this is a consequence
  328. of the stack structure of the FPU.
  329. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  330. % Testing register allocation
  331. \section{Testing register allocation}
  332. To test new stuff, you should compile a procedure which contains some local
  333. longint variables with \file{-Or}, to limit the number of
  334. registers:
  335. \begin{verbatim}
  336. procedure test;
  337. var
  338. l,i,j,k : longint;
  339. begin
  340. l:=i; // this forces the compiler to assign as much as
  341. j:=k; // possible variables to registers
  342. // here you should insert your code
  343. end;
  344. \end{verbatim}
  345. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  346. % Future plans
  347. \section{Future plans}
  348. \label{se:future_plans}
  349. \appendix
  350. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  351. % Coding style guide
  352. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  353. \chapter{Coding style guide}
  354. This chapter describes what you should consider if you modify the
  355. compiler sources.
  356. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  357. % The formatting of the source
  358. \section{The formatting of the sources}
  359. Rules how to format the sources.
  360. \begin{itemize}
  361. \item All compiler files should be saved in UNIX format i.e. only
  362. a line feed (\#10), no carrige return (\#13).
  363. \item Don't use tabs
  364. \end{itemize}
  365. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  366. % Some hints how to write the code
  367. \section{Some hints how to write the code}
  368. \begin{itemize}
  369. \item Assigned should be used instead of checking for nil directly, as
  370. it can help solving pointer problems when in real mode.
  371. \end{itemize}
  372. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  373. % Compiler Defines
  374. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  375. \chapter{Compiler Defines}
  376. The compiler can be configured using command line defines, the
  377. basic set is decribed here, switches which change rapidly or
  378. which are only used temporarly are described in the header
  379. of \file{PP.PAS}.
  380. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  381. % Target Processor
  382. \section{Target processor}
  383. The target processor must be set always and it can be:
  384. \begin{description}
  385. \item [\var{I386}] for Intel 32 bit processors of the i386 class
  386. \item [\var{M68K}] for Motorola processors of the 68000 class
  387. \end{description}
  388. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  389. % Include compiler Parts
  390. \section{Include compiler Parts}
  391. \subsection{General}
  392. \begin{description}
  393. \item[\var{GDB}] include GDB stab debugging (\file{-g}) support
  394. \item[\var{UseBrowser}] include Browser (\file{-b}) support
  395. \end{description}
  396. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  397. % Leave Out specific Parts
  398. \section{Leave Out specific Parts}
  399. Leaving out parts of the compiler can be useful if you want to create
  400. a compiler which should also run on systems with less memory
  401. requirements (for example a real mode version compiled with Turbo Pascal).
  402. \subsection{General}
  403. \begin{description}
  404. \item[\var{NoOpt}] will leave out the optimizer
  405. \end{description}
  406. \subsection{I386 specific}
  407. The following defines apply only to the i386 version of the compiler.
  408. \begin{description}
  409. \item[\var{NoAg386Int}] No Intel styled assembler (for MASM/TASM) writer
  410. \item[\var{NoAg386Nsm}] No NASM assembler writer
  411. \item[\var{NoAg386Att}] No AT\&T assembler (for the GNU AS) writer
  412. \item[\var{NoRA386Int}] No Intel assembler parser
  413. \item[\var{NoRA386Dir}] No direct assembler parser
  414. \item[\var{NoRA386Att}] No AT\&T assembler parser
  415. \end{description}
  416. \subsection{M68k specific}
  417. The following defines apply only to the M68k version of the compiler.
  418. \begin{description}
  419. \item[\var{NoAg68kGas}] No gas asm writer
  420. \item[\var{NoAg68kMit}] No mit asm writer
  421. \item[\var{NoAg68kMot}] No mot asm writer
  422. \item[\var{NoRA68kMot}] No Motorola assembler parser
  423. \end{description}
  424. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  425. % Location of the code generator functions
  426. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  427. \chapter{Location of the code generator functions}
  428. This appendix describes where to find the functions of
  429. the code generator. The file names are given for the
  430. i386, for the m68k rename the 386 to 68k
  431. \begin{description}
  432. \item[\file{cg386con}] Constant generation
  433. \begin{description}
  434. \item[\var{secondordconst}]
  435. \item[\var{secondrealconst}]
  436. \item[\var{secondstringconst}]
  437. \item[\var{secondfixconst}]
  438. \item[\var{secondsetconst}]
  439. \item[\var{secondniln}]
  440. \end{description}
  441. \item[\file{cg386mat}] Mathematic functions
  442. \begin{description}
  443. \item[\var{secondmoddiv}]
  444. \item[\var{secondshlshr}]
  445. \item[\var{secondumminus}]
  446. \item[\var{secondnot}]
  447. \end{description}
  448. \item[\file{cg386cnv}] Type conversion functions
  449. \begin{description}
  450. \item[\var{secondtypeconv}]
  451. \item[\var{secondis}]
  452. \item[\var{secondas}]
  453. \end{description}
  454. \item[\file{cg386add}] Add/concat functions
  455. \begin{description}
  456. \item[\var{secondadd}]
  457. \end{description}
  458. \item[\file{cg386mem}] Memory functions
  459. \begin{description}
  460. \item[\var{secondvecn}]
  461. \item[\var{secondaddr}]
  462. \item[\var{seconddoubleaddr}]
  463. \item[\var{secondsimplenewdispose}]
  464. \item[\var{secondhnewn}]
  465. \item[\var{secondhdisposen}]
  466. \item[\var{secondselfn}]
  467. \item[\var{secondwith}]
  468. \item[\var{secondloadvmt}]
  469. \item[\var{secondsubscriptn}]
  470. \item[\var{secondderef}]
  471. \end{description}
  472. \item[\file{cg386flw}] Flow functions
  473. \begin{description}
  474. \item[\var{secondifn}]
  475. \item[\var{second\_while\_repeatn}]
  476. \item[\var{secondfor}]
  477. \item[\var{secondcontinuen}]
  478. \item[\var{secondbreakn}]
  479. \item[\var{secondexitn}]
  480. \item[\var{secondlabel}]
  481. \item[\var{secondgoto}]
  482. \item[\var{secondtryfinally}]
  483. \item[\var{secondtryexcept}]
  484. \item[\var{secondraise}]
  485. \item[\var{secondfail}]
  486. \end{description}
  487. \item[\file{cg386ld}] Load/Store functions
  488. \begin{description}
  489. \item[\var{secondload}]
  490. \item[\var{secondassignment}]
  491. \item[\var{secondfuncret}]
  492. \end{description}
  493. \item[\file{cg386set}] Set functions
  494. \begin{description}
  495. \item[\var{secondcase}]
  496. \item[\var{secondin}]
  497. \end{description}
  498. \item[\file{cg386cal}] Call/inline functions
  499. \begin{description}
  500. \item[\var{secondparacall}]
  501. \item[\var{secondcall}]
  502. \item[\var{secondprocinline}]
  503. \item[\var{secondinline}]
  504. \end{description}
  505. \item[\file{cgi386}] Main secondpass handling
  506. \begin{description}
  507. \item[\var{secondnothing}]
  508. \item[\var{seconderror}]
  509. \item[\var{secondasm}]
  510. \item[\var{secondblockn}]
  511. \item[\var{secondstatement}]
  512. \end{description}
  513. \end{description}
  514. \end{document}