tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] OSX


From: Peter \"Firefly\" Lund
Subject: Re: [Tinycc-devel] OSX
Date: Sun, 20 Apr 2003 12:16:35 +0200 (MEST)

On Sat, 19 Apr 2003, Steve Dekorte wrote:

> I'd like to, but I really don't have much knowledge in that area. If
> someone could point me to exactly what code needs to change and general
> docs needed to understand how to change it, I would research it and
> give it a shot if I think I could do it without an unreasonable amount
> of effort.

Ok.

1) Do you know PPC assembler?
2) Do you know the executable format for OS X?  Does it use ELF?  COFF?
3) Do you know anything about compilers in general?
4) Do you know 386+ assembler?
5) Do you know Unix build systems?

ad 1) You'll have to learn it eventually to write the code generator
ad 2) If it uses ELF you can probably reuse most of the code
ad 3) It would be easier if you knew a little -- like, what is a parser, a
  lexer, intermediate code, register allocation, a code generator, etc.
  Please tell us what you know -- it is much easier to direct you then.
ad 4) It is much easier to read and modify the current code generator if
  you do.
ad 5) By this I mean make/gmake, command-line C compilers, etc.  If you
expect a flashing gui for everything you won't get very far.


Most of the code to be changed is in i386-gen.c -- make a file called
ppc-gen.c that does the same thing, only with PowerPC opcodes instead.

Helpful resources:

  Jack W. Crenshaw, "Let's build a compiler"

  comp.compilers -- if you look back a month or two you'll find a
discussion about trainers/introductions like Jack's, some of which go
faster, some go further, some use different architectures.  You should be
able to find one you like.

  the "dragon book":  Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman,
"Compilers - Principles, Techniques, and Tools", Addison-Wesley, 1986.

-Peter




reply via email to

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