[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Regarding My first compiler

Subject: Re: [Tinycc-devel] Regarding My first compiler
Date: Sat, 11 Feb 2012 22:00:45 +0530

Hi Rob,

Thank you very much!!!

I am going through the link that u have mentioned in your mail. If i face any problem may i get back to you? 

Thanks & Regards,

On Sat, Feb 11, 2012 at 7:43 PM, Rob <address@hidden> wrote:
On Sat, Feb 11, 2012 at 07:24:56PM +0530, RAHUL KUMAR wrote:
> Hi ,
> I am a software engineer, am doing work on embedded domain, as i have
> 1.5+yr work exp on this  i don't know much about embedded thing.
> Actually i want to implement my own compiler with very basics functionality
> in C language because i am lit bit comfortable in c just to check how our
> program get compiled in standard compilers.So to make better understanding
> of how compiler works i want to implement my own compiler.
> So  could you please guide me from where i have to start as i don't
>  anything  regarding compiler implementation.
> Thanks & Regards,
> Rahul

I'm currently writing one of my own. The code it produces is very very
suboptimal because I haven't written an optimiser for it yet, but I hope
the actual parsing and syntax-tree code is straightforward.


I did a course at uni on the parsing side of things, and just made the
rest up from there. It only produces static binaries at the moment,
which uses a library that comes with the compiler, rather than the
system's libc.

This is due to different calling conventions (since I've yet to get to
putting everything into registers, it treats a machine as a stack
machine more or less).

Floats aren't supported yet, structs can be parsed, but no code can be
generated, and function pointers aren't supported either. I have a type
parsing branch, and my local working copy is almost ready to merge, then
I'll have function pointer support.

Next on the list is structs, enums and floats, then it may be able to
compile itself.


Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]