[fpc-devel] Re. z370 Cross Compilation, Pass 2 of ....

Bernd Oppolzer bernd.oppolzer at t-online.de
Sun Sep 1 16:47:44 CEST 2013


Am 01.09.2013 16:12, schrieb Jonas Maebe:
>
>> So my question is: is it possible to modify the outcome of step 2 (the linear
>> assembler representation) depending on the target platform
> The linear assembler representation is already 100% platform-specific (as Sven mentioned above). FPC does not have a platform-independent internal RTL (register transfer language) representation.
>
>
>
Thank you.

So my assumptions so far were plain wrong.

The difference between platforms is already in the stages above stage 2.

That is (cited from Sven's mail):

<citation>
Also the compile process of FPC is roughly this:
- for each used unit:
     - parse the unit and generate a node tree for each 
procedure/function/method (basically platform independant)
     - generate a CPU specific linear assembler representation of each 
node tree (this representation is independant of the specific assembler 
used)
     - if an external assembler (e.g. GNU as) is used: convert the 
assembler lists to assembler files
     - call the assembler (internal assemblers work on the assembler 
lists directly) to generate the object file
- for external linkers (e.g. GNU ld): write a linkscript to instrument 
the external linker
- call the linker (internal linkers work directly on the in memory 
information the compiler has gathered)
</citation>

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).

Kind regards

Bernd






More information about the fpc-devel mailing list