[M3devel] C generating back end

Tony Hosking hosking at cs.purdue.edu
Sat Jan 2 00:42:34 CET 2010


On 1 Jan 2010, at 18:05, Jay K wrote:

> 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.

I'd like to avoid that sort of interleaving.

> The "cleaner" way is probably to implement a new M3CG though and
> leave m3front unchanged.

This is a much better plan.

> 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)

We can use the gcc-backend exception handling support if anyone was prepared to work on it.

>  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/d2789713/attachment-0002.html>


More information about the M3devel mailing list