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

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Sun Sep 1 16:02:36 CEST 2013

Bernd Oppolzer wrote:

I'm about to head out, so have to be extremely brief.

> Thank you very much for that, that made things much clearer for me.
> So the compiler relies heavily on the external assembler and the syntax 
> it supports,
> as long as you don't want to do changes to step 2 (that is, change the 
> linear assembler
> representation, which IMO should not be done in the first step).
> And: the assembler is not called once, but for every unit.
> So here, I think, we have some problems or issues, because, as already 
> pointed out,
> the z-Arch doesn't have PUSH and POP instructions, and I guess that the 
> outcome
> of the linear assembler representation will not be very suitable to the 
> things that the
> z-Arch instruction set provides, although in the meantime there are some 
> 1500 instructions.
> Understanding that, I would now like to have some description of the 
> linear assembler
> representation that FPC generates, that is: it is of course not 
> target-specific, but it does of
> course do some assumptions on the type of the underlying hardware. 

Look at the output when using FPC's -a options, for example -aln... that 
might in practice need the EXTDEBUG setting during compilation but I 
can't go into more detail now.

Push will typically be used to put parameters onto the stack, otherwise 
they'll be accessed by indexed operation. The stack frame is discarded 
by target-specific code.

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

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-devel mailing list