FEATURES OF THE COMPILER (1) General All executables are residentable. It is strongly suggested that you make at least dcpp, dc1, and das resident. The restriction on the residentability is that only one 'copy' can be running at a time... trying to run a residented program that is already running currently causes an immediate exit. A UNIX like frontend, Dcc, exists that makes compilation a breeze. Normally dcpp, dc1, and dlink are NOT run manually. (2) Autoinit capability Currently implemented is autoinit capability for libraries. If you extern the library base variable instead of declare it, then the variable will be brought in from c.lib along with autoinit code to automagically OpenLibrary() it before _main() and CloseLibrary() it after _exit(). You can tell when autoinit is not supported for a given library when the linker returns a 'symbol undefined' error for the base variable, meaning that it is not declared in c.lib anywhere. (3) Use of D0-D1/A0-A1/A4 for register variables For any block statement in the procedure (including the main procedure itself) where no subroutine call is made, D0-D1/A0-A1 will be used for register variables. Since A4 is also available Dcc has A0-A4/A6 to work from instead of A3-A4/A6 that other compilers have. This invariably produces much better code. The compiler ignores the 'register' keyword completely and assigns register variables as it sees fit. If you don't like it, tough. (4) Assembly optimizations Das, the assembler, automatically optimizes branchs to short if possible and also optimizes Bxx-to-BRA (up to 20 hops). Das will also remove LINK/UNLK statements when assembling compiler produced source for subroutines that do not reference A5 and do not make any calls of their own (thus, stack backtrace is still supported). Das will automatically optimize MOVEM's that use REG equates by changing MOVEM into a MOVE if only one register is specified and removing the instruction alltogether if no registers are specified. (5) Compiler optimizations The compiler optimizes conditionals and will use the bit instructions (bset,bclr,btst) whenever possible. The compiler does other obvious optimizations such as use MOVEQ, ADDQ, SUBQ when possible, etc... Multiply is optimized to a shift if possible. Divide is not currently optimized. (6) Linker The linker, DLink, will generate jump tables for out-of-range pc relative references (this means you cannot use extern pc-relative references to data items), and maintains sequencing of sections during coagulation (which is how the autoinit stuff works). The linker has a semi-resident option, -r, which moves all static data items into a code segment and generates BSS space for their 'copy'. All references to said data items actually reference the BSS copy while the static code segment remains unchanged forever, allowing resident code to clear normal BSS and re-initialize the 'data'. This works for the large data model though there are usage restrictions, see dcc.doc. NON-UN-FEATURES OF THE COMPILER (1) In Line library calls Through experimentation I have found that inline library calls tend to slow down overall program execution by making fewer registers available for register variables. Not only fewer registers, but more registers that must be saved and restored. (2) Small Data model I could not find a performance improvment by the use of the small data model, mainly because it causes A4 to become unusable as a register variable. The only use of the small data model is to support full residentability. The small data model also has a tendancy to make for smaller executables but not all that much smaller. The current design, using the large data model, allows residentability on single-run basis. That is, the residented program cannot be run more than once simultaniously but can be run multiple times in sequence. (3) Registerized parameters Another deceptive item. Most of the speed gained is lost by having to reserve register variables for and then move the registerized parameters out of temporary registers (A0-A1/D0-D1). Dcc gets nearly the same effect by having the capability to use D0-D1/A0-A1 as register variables... basically a move from a stack location into D0-D1/A0-A1 and then not having to save/restore any registers. While the combination of the above two items would yield an even greater efficiency, I feel that the complexity invovled would make the compiler too unreliable at this time.