Related articles |
---|
[5 earlier articles] |
Re: Third party compiler middle and back-end jm@bourguet.org (Jean-Marc Bourguet) (2010-10-11) |
Re: Third party compiler middle and back-end j.o.williams.jow@gmail.com (James O. Williams) (2010-10-11) |
Re: Third party compiler middle and back-end gneuner2@comcast.net (George Neuner) (2010-10-12) |
Re: Third party compiler middle and back-end bobduff@shell01.TheWorld.com (Robert A Duff) (2010-10-13) |
Re: Third party compiler middle and back-end cr88192@hotmail.com (BGB / cr88192) (2010-10-13) |
Re: Third party compiler middle and back-end cr88192@hotmail.com (BGB / cr88192) (2010-10-13) |
Re: Third party compiler middle and back-end FredJScipione@alum.RPI.edu (Fred J. Scipione) (2010-10-13) |
Re: Third party compiler middle and back-end danielzazula@gmail.com (Daniel Zazula) (2010-10-17) |
Re: Third party compiler middle and back-end gneuner2@comcast.net (George Neuner) (2010-10-17) |
Re: Third party compiler middle and back-end gneuner2@comcast.net (George Neuner) (2010-10-18) |
Re: Third party compiler middle and back-end cr88192@hotmail.com (BGB / cr88192) (2010-10-18) |
Re: Third party compiler middle and back-end redbrain@gcc.gnu.org (Philip Herron) (2010-10-19) |
Re: Third party compiler middle and back-end cr88192@hotmail.com (BGB / cr88192) (2010-10-19) |
[3 later articles] |
From: | "Fred J. Scipione" <FredJScipione@alum.RPI.edu> |
Newsgroups: | comp.compilers |
Date: | Wed, 13 Oct 2010 22:58:23 -0400 |
Organization: | Public Usenet Newsgroup Access |
References: | 10-10-010 |
Keywords: | code, tools |
Posted-Date: | 16 Oct 2010 09:34:53 EDT |
"Daniel Zazula" <danielzazula@gmail.com> wrote in message
>I want to write a compiler that generates assembly, but I do not know
> assembly, I've already started studying the FASM, but it will take
> much time to learn everything I need to know in order to write a
> decent back-end.
....snip...
Are you familiar with (T)he (A)msterdam (C)ompiler (K)it?
http://tack.sourceforge.net/
The project supports different front-ends and back-ends through a
common set of 'near-assembly-language' pseudo-ops. You can write your
own front-end to produce the same pseudo-ops, and use the existing x86
back-end to produce assembly language. The back-end also handles a
certain amount of optimization, as well. The techniques in TACK's
tools are not the latest-and-greatest, but they do work.
You might also look into the tools used in 'Retargetable Concurrent
Small C' from Dr. Dobb's. Small C is written in (a variant of) C
using recursive descent. You may be able to make a compatible front
in C by hand, or by using a tool like RDP -
http://www.cs.rhul.ac.uk/research/languages/projects/rdp.html. While
Retargetable CSC does not have an explicit x86 back-end, The code in
the SmallC 2.2 sources should give enough guidance to allow you make
the necessary adaptations for the M4 macros, etc.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.