<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 12/17/25 4:07 PM, Hairy Pixels via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGsUGtk+RqRFqVrye=bNgeBSc3ucJujP05wYp2n6u3Ct5swF+A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Dec 17, 2025 at 8:48:35 PM,
Michael Van Canneyt via fpc-pascal <<a
href="mailto:fpc-pascal@lists.freepascal.org"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-pascal@lists.freepascal.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"
type="cite">
<div>nc - node conversion <br>
</div>
</blockquote>
</div>
<br>
<div dir="ltr">ncgmat.pas is n for node, then cg for code
generator, and mat for mathematical. All the node related units
are prefixed with n and it's a code generator for nodes.</div>
</blockquote>
<p>That is correct. All the nodes have a hierarchy. So, for the math
notes, we have:</p>
<p><br>
</p>
<p>nmat.pas - the base classes node - this includes functionality
for the type checking (pass_typecheck), pass_1 (optional
transformations at the tree level), optimizations (simplify)</p>
<p>ncgmat.pas - the generic code generator for the math nodes
(pass_generate_code)</p>
<p>x86/nx86mat.pas - CPU-specific overrides for the math nodes (I'm
using x86 as an example here, other CPUs have similar units in
their CPU-specific directory)</p>
<p>x86_64/nx64mat.pas - another layer of CPU-specific overrides.
This one is specific to x86_64 only, while the above is common to
i8086, i386 and x86_64.</p>
<p><br>
</p>
<p>The same pattern applies to other node types, e.g. nadd.pas,
ncgadd.pas, etc. for "add" nodes (actually +, -, *, and, or, xor
and similar). nflw.pas, ncgflw, etc for control flow nodes
(if..then..else, goto, try..except, for, while, etc.)</p>
<p>Nikolay</p>
</body>
</html>