Bernd Oppolzer wrote:

only the first step - node tree - is platform independant, and
the translations from there is already CPU specific - oh, I see,
it's written there - I looked at the word "independant" in the paranthese - my fault ...

Sorry for that ...

Then the main effort is to understand what the contents of the node tree mean
and to build another variant of step 2 (for z-Arch).

At this point I'd throw in that one of the things the higher levels of the compiler knows is the overall properties of the registers, i.e. things like which ones are available for procedure parameters. This is one of the things that the lower level has to specify, so the lower-level units aren't there solely to do a macro-style substitution converting the compiler's internal representation to a sequence of assembler lines.

The corollary of this is that it's fairly common for a new target CPU to necessitate higher-level changes, and these then have to be propagated to all of the other targets. Which is why it's important to keep people like Florian and Jonas happy :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to