home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d3xx
/
d359
/
dice.lha
/
DICE
/
DICE.lzh
/
doc
/
dc1.doc
< prev
next >
Wrap
Text File
|
1990-05-19
|
2KB
|
59 lines
DC1.DOC
MAIN COMPILER PASS
DC1 cppd_src_file [-o outfile] <options>
(NOTE: Refer to DCC.DOC for front end options)
DC1 is the compiler itself. As input it requires an already
preprocessed file and as output it produces assembly. Many assemblers
will not be able to assemble the output due to forward referenced REG
labels and the PROCSTART, PROCEND directives. The output is normally
fed to DAS, which handles a subset of 68000 and also does certain
optimizations (see the document on DAS)
The compiler generates absolute data references and relative code
references by default. Do not confuse this with DCC's default, which
is small-data and small-code.
The compiler will put argument and auto variables into registers
according to register availability and usage. It will use A0-A1/D0-D1
for register variables whenever possible. Consequently, the most
heavily used variables will be in registers even for very large
subroutines.
You should get into the habit of using auto declarations within sub
blocks rather than declare all your autos at the top of the procedure.
Apart from making the code more modular, this will enable the compiler
to make better decisions when allocating register variables.
The output of the compiler generates code of the same order as Aztec or
Lattice C and, in many cases, makes better choices for register
variables. DCC makes much better use of address registers than either
Aztec or Lattice. However, it does not do any major contents tracking
and redundant instructions will be generated. DAS will handle properly
optimizing branches and DAS will eventually have a peephole optimizer
built in it to handle other obvious redundancies.
The compiler does other optimizations itself, such as using bit
instructions to handle special cases of &, |, and ^, include using
BTST.
-----------------------
-----------------------
VOLATILE and REGISTER type specifiers are currently ignored. Taking
the address of any auto variable forces it to be really auto and not
register. Since no major optimization is done, volatileness is
pretty much preserved. The CONST data type is pretty much ignored as
well.
There is an 'interrupt' keyword which preserves all registers and returns
with an RTI instead of an RTS. This is NOT compatible with Amiga
interrupts.