[M3devel] C generating back end
Jay K
jay.krell at cornell.edu
Sat Jan 2 00:05:44 CET 2010
Fyi I finally looked at the 2.x implementation and the outputing of
C was implemented fairly directly at the m3front layer.
There wasn't the "M3CG" stuff.
Thus, the "easiest" way to get back such functionality would
probably be to "interleave" the old code and the new code within m3front.
The "cleaner" way is probably to implement a new M3CG though and
leave m3front unchanged.
I still think generating portable C a great way to achieve portability.
Better yet maybe, generate C++ and use its exception handling feature.
(ok, maybe generate both, in case some systems lack C++ support)
I realize there are several ways to view this though.
gcc backend provides enough portability
imagine IA64_NT though. or Plan9. or even OpenBSD
or Darwin where there are long standing forks
(The OpenBSD patches are small and we carry/apply them.
The Apple changes I think are mainly in the frontends
which I think is how we get by.)
For efficient exception handling we should be able to use libunwind on most targets.
llvm would provide good portability and maybe other benefits like perf
less reach than gcc but hits the major platforms
difficult for me to get started with sorry
integrated backend could/should be ported around and is fast
a lot of work
I think the first steps here are to learn about mach-o and elf file formats
as part of ports for other x86 targets. I've started a macho-dumper.
burg or others
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100101/98af7028/attachment-0001.html>
More information about the M3devel
mailing list