Re: Third party compiler middle and back-end

"BGB / cr88192" <cr88192@hotmail.com>
Wed, 13 Oct 2010 14:16:42 -0700

          From comp.compilers

Related articles
[4 earlier articles]
Re: Third party compiler middle and back-end cr88192@hotmail.com (BGB / cr88192) (2010-10-10)
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)
[4 later articles]
| List of all articles for this month |

From: "BGB / cr88192" <cr88192@hotmail.com>
Newsgroups: comp.compilers
Date: Wed, 13 Oct 2010 14:16:42 -0700
Organization: albasani.net
References: 10-10-010 10-10-017
Keywords: code, translator
Posted-Date: 16 Oct 2010 09:34:22 EDT

"Jean-Marc Bourguet" <jm@bourguet.org> wrote in message
> Daniel Zazula <danielzazula@gmail.com> writes:
>
>> The back-end that I'm looking for needs to generate at least x86
>> Assembly (although I prefer Amd64), I don't mind if it generates other
>> assemblies as well. I prefer back-ends written in C# or Object Pascal,
>> but I will also accept C/C++ ones.
>>
>> Any suggestions?
>
> Use C as intermediate code. There is quite a few backend for a few
> architectures available.


yes, this is a reasonably good option if one is static compiling an HLL.


so, for compiling an HLL into a statically-compiled form, this is a fairly
good option, as one just needs to map the HLL features or bytecode or
whatever onto appropriate C constructs, emit code, and let the C compiler do
the rest.




the main downside though is if one is:
A, not doing static compilation (say, it is for a scripting VM, which IME is
the main reason one might want to write their own compiler);
B, not dealing with an HLL (less likely, but can reasonably happen);
C, needs low-level HW or OS access (of the sort usually provided by ASM or
involved in writing drivers);
...


for example, compiling C to C, or ASM to C, is in most cases pointless...


compiling a script language to C and using TinyCC or similar as a scripting
engine could work, but is probably not the ideal strategy.


...




as mentioned elsewhere, the OP does not mention what this compiler will do
or why it is needed, which sadly limits the ability to provide good
general-purpose advice.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.