Am 23.03.2011 18:16, schrieb duck donal:
> Hi Krish,
>    Thank u for the detail!
>    Actually I've konwn the three stages.
>    What I want to konw is the anatomy of each stage.e.g,for compile
> stage,a c source file need to pasing,generating icode etc,I want to konw
> that what's the  Intermediate language of SDCC,does it generate a
> language like the RTL of GCC?What is the difference between SDCC and
> GCC? The syntax tree,the register allocation method and so on?
>     The SDCC manual is too abbreviated to understand well.
>     Could u give me a detail explanation?Or give me some detail materials?
>     Much thanks!
>     Donald

sdcc follows the classic model of compiler stages (and AFAIK so does
gcc; llvm on the otehr hand is quite different).

The parser is a classic yacc parser (see SDCC.y, SDCCy.?) with a lex
lexer (SDCC.lex, SDCClex.c)

We generate an abstract syntax tree (SDCCast.?).

Next is the intermediate language, which is mostly three-address code
(SDCCicode.?).

Some optimizations, e.g. common subexpression elimination (SDCCcse.?)
and other transformations are done on the intermediate code.

That's it for the non port-specific part.

Next comes register allocation, then code generation (generates asm
code) and the peephole optimizer (which does local optimizations on the
asm code). These are port-specific.

Philipp

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to