[fpc-devel] On a port of Free Pascal to the IBM 370

Sven Barth pascaldragon at googlemail.com
Wed Jan 18 16:26:08 CET 2012


Am 18.01.2012 12:27, schrieb Mark Morgan Lloyd:
>> I noticed that you wanted to add a unit "i_i370" to the "compiler"
>> unit and to the directory "systems". This is wrong. The units listed
>> in the "compiler" unit are the target operating systems (e.g. Windows,
>> Linux, DOS), not the underlying architecture. Thus you'd only add a
>> "i_osvs1" (if I remember the name correctly) to that unit and
>> directory, but you don't need to do this know as you first need to
>> implement the architecture support.
>> This architecture support is located in the corresponding CPU unit
>> (e.g. ARM, PowerPC, i386, x86_64 (the latter two share the x86
>> directory as well)) and is included by using the "cputarg" in the unit
>> "compiler". This unit is located in the corresponding CPU directory.
>> Thus I'd suggest you to copy the directory of an architecture (e.g.
>> MIPS as this is a smaller and younger one) and name that "i370" (now
>> the unit output path I mentioned in "2" will make sense ;) ).
>
> Perhaps now would be a good time for a core developer to add appropriate
> definitions to trunk, so that anybody working on the IBM port only needs
> to modify files in a directory off ./compiler.
>

What kind of definitons do you think of?

>> I myself can't help with porting FPC to a new architecture, as I
>> haven't done that yet (only to a new operating system target). But
>> AFAIK Mark Morgan Lloyd worked on the MIPS target and of course there
>> are compiler developers who implemented new architectures.
>
> Bearing in mind that what I was looking at was code that had already
> been working in version 1 of the compiler, which had been massaged into
> some sort of shape for v2. I can claim very little credit, it was
> entirely "grunt work". More relevant might be Jonas's recent work
> targeting the JVM, but I suspect that the "classic" IBM mainframe
> architecture is probably nearer MIPS or 68K than to JVM or a modern RISC.

By intuition I suggested MIPS as the base, because its a smaller target 
in FPC (and m68k is in no shape to be used as a base...).

I don't know whether the high level code generator Jonas implemented for 
the JVM branch will be of any help here.

Regards,
Sven



More information about the fpc-devel mailing list