[fpc-devel] Re. z370 Cross Compilation, Pass 2 of ....
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Tue Aug 20 16:54:44 CEST 2013
Apologies that I've broken the thread, but some messages don't get
through our gateway- for some reason I'm seeing the message I'm quoting
arriving as an encoded attachment.
[Sven said]
> If you'd now only explain what a cross-reference tool is I might even
> understand what you're trying to tell me here...
I think what he means is that he wants a tool that will annotate each
procedure/function/method call in the source with the file and line
number that it transfers control to. That's obviously going to be a
problem in a language like Object Pascal which supports virtual methods,
where the actual target isn't known until execution time.
> Otherwise we also rely on external tools (mostly the GNU linker)
> here. So as a first step you'd choose the approach of using an
> external assembler and linker, because simply calling a third party
> utility is easier than completely implementing an internal assembler
> and linker.
With the caveat here that as I understand it experienced IBM programmers
avoid the GNU assembler like the plague, since it doesn't have anything
like the sort of macro facilities they're used to. By implication, that
would imply that they prefer to avoid the GNU linker and related tools
as well.
> Just to name a few: you'll need to get parameter passing for functions
> correctly
Which leads to another issue: the 370 is a register-based system without
a stack as understood today. Parameters are mostly passed in registers,
but this is largely hidden since supervisor calls etc. are usually
hidden in macros.
My own feeling is that it would be best to start targeting a late-model
390, which does have a stack etc., and to use the standard GNU assembler
and linker (as and ld) /initially/ targeting Linux. Any other
combination (i.e. a proprietary assembler etc. with an antique MVS as
target) is going to cause nothing but grief, since it makes it very
difficult for developers skilled with FPC but not with IBM mainframes to
give any practical help.
--
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