[fpc-devel] FPC compiler architecture documentation
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Fri Aug 31 22:49:57 CEST 2012
Florian Klaempfl wrote:
> Am 31.08.2012 09:32, schrieb Michael Schnell:
>> On 08/30/2012 10:20 PM, Florian Klaempfl wrote:
>>> I doubt that a good developer needs such a document to get into the
>>> compiler...
>>
>> Hmmm.
>>
>> I once thought about trying to do an fpc compiler for a not yet
>> supported arch, and I still am interested in having (AKA contributing to
>> such an effort) an "up to date" fpc compiler for as well 68K as PIC32
>> (AFAIK identical to a certain version of MIPS32). I doubt that I would
>> even be able to start, unless an up-to-date documentation of the
>> appropriate parts of the docu is available.
>
> The big picture which could be documented is the easy part. But such a
> document can never cover all details and the details are the hairy part.
> Like certain properties of the target architecture might be special and
> not yet covered by the compiler thus they cannot be documented. They are
> the challenging and time consuming part when adding a new architecture.
I for one am very much aware of that, since for reasons not directly
related to FPC I'm spending a lot of time inside CPU manuals (I've now
got to something like p290 of the IBM S/390 manual, and it's finally
starting to talk about opcodes- although it's not yet discussed the
register model).
However, what's needed /is/ the big picture, starting off with what's
needed for a port (a PC, preferably running Linux, and a working FPC),
where the modified source should be put (local svn, Lazarus CCR, or a
branch of the main repository, and who to talk to and/or how best to do
it in each case), and what naming conventions etc. should be applied
(roughly, how to set up ./compiler/xxxxx and what to change in
./compiler to make the build process aware of it).
We can really do without another David Zhang episode where somebody
well-meaning flattens the directory structure and duplicates files
needlessly.
With respect to everybody concerned, I'd strongly suggest that
http://wiki.lazarus.freepascal.org/ZSeries/Part_1 et seq. are worth
reviewing since they contain a number of misconceptions that have been
echoed by others (e.g. that the best way to start is to have a working
Pascal compiler on the target system).
It's entirely in order for a document to state that some elements of
what it describes are unknown, or unknowable without feedback from the
reader. But there are still targets worth supporting and people with the
motivation and target-specific skills to do so, and keeping the project
"closed by complexity" is to nobody's advantage.
--
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