[fpc-devel]Re: Latest status
Jonas Maebe
jonas at zeus.rug.ac.be
Mon Nov 26 13:14:53 CET 2001
On zaterdag, november 24, 2001, at 08:26 , Bill M Catambay wrote:
> Now that FreePascal is stabilizing on the "other" platforms, is there
> any light at the end of the tunnel for FreePascal on the Mac? I read on
> the FreePascal page that one of the future tasks is to rewrite the code
> generator to support more platforms (including PowerPC).
>
> http://www.freepascal.org/future.html
>
> How close are we to actually seeing something in that area?
I honestly don't know. Currently, it's not really a future task anymore,
it's a task that's already well underway. The parts of the code
generator that are already completely processor independent and for
which the powerpc support is already implemented (ppc implementations
not tested yet though), are
* basic flow control structures (while..do/repeat..until, for..do,
goto/label, if..then..else, exit, break, continue)
* type conversions (all)
* constant handling (all)
* some memory handling related stuff (loadvmtnode, new/dispose,
address-operator, dereferencing pointer, record subscript, self,
with..do)
* most things which require compiler magic (read(ln)/write(ln), str,
val, rewrite)
* 64bit arithmetics on 32bit processors
* most string operations
* most set operations
The parts of the code generator that are generic, are also already
tested because every time something like that was implemented, the
i386-specific code was removed at the same time.
In addition, most powerpc-specific RTL routines are already finished
(some of them also tested).
So what's still left to do?
Compiler:
* handling of calls and parameters
* basic mathematical operations (add/sub/mul/xor/or/not and comparisons
on ordinals and/or enumeration types)
* shr/shl for ordinal types
* div/mod for ordinal types
* "load" nodes (load a global/local variable, load a parameter, load a
variable from a shared library etc)
* assignments (put the result of an expression in its destination)
* function result handling
* creation of "array of const" parameters
* handling of interfaces etc
* handling of case..of, .. in ..
* handling of array indexes
* lots of small helper routines for the code generator
RTL:
* finish ppc specific things and test them
* create at least a system and "dos" (= unit containing basic file
access routines) units for the OS'es you want to support
> For those of you listed as working on the Mac port (Jonas Maebe, Florian
> Klaempfl, Robert Dell, and Casey Duncan), can I get a status update from
> each of you?
Currently, I'm not doing very much for the compiler because I have a lot
of work for the university, but during the vacation and at the start of
the school year, I did pretty much everything listed in the "already
done" section above.
> Let me know the last thing you worked on, and give me your
> perspective as to where this Mac port is headed (feel free to tell me
> "into the toilet" if that's what you really believe). I think it would
> be a shame if the Mac is left behind on this one.
For starters, I think Mac OS X will be a lot easier than Mac OS 9.x and
below because of the unix underpinnings. However, we try to keep
everything as generic as possible in every way nowadays and I still
intend to create both a "classic" Mac OS and Mac OS X version. Debugging
of the code generator will mostly happen under Mac OS X though for
obvious reasons :)
Jonas
More information about the fpc-devel
mailing list