X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Fsdccman.lyx;h=0bf37885c2c9724bdf666f784a4ce1a8aa324124;hb=717cf743781d6240414f10bc16b532bf54c9efd1;hp=b961c03f6b1b3112e83bb261fbd9fb75c89b3a53;hpb=315208ed05c5115661982da0deff5558c74042be;p=fw%2Fsdcc diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index b961c03f..0bf37885 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -330,156 +330,1511 @@ If you can think of some more, please send them to the list. Installation \layout Subsection -Install and search paths +Configure variables +\layout Standard + +The install paths and default search paths are defined when running 'configure'. + The defaults can be overriden by +\layout Standard + +... + TBD +\newline + +\newline +These configure variables are compiled into the binaries, and can only be + changed by rerunning 'configure' and recompiling SDCC. + The configure variables are written in +\emph on +italics +\emph default + to distinguish them from run time environment variables (see section search + paths). +\newline + +\newline +Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds. + The SDCC team uses Mingw32 to build the official Windows binaries, because + it's +\layout Enumerate + +open source, +\layout Enumerate + +a gcc compiler and last but not least +\layout Enumerate + +the binaries can be built by cross compiling on Sourceforge's compile farm. +\layout Standard + +The other Win32 builds using Borland, VC or whatever don't use 'configure', + but they (hopefully) use the default Win32 paths. +\newline + +\newline +These defaults are: +\newline + +\newline + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Variable +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +PREFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local +\end_inset + + +\begin_inset Text + +\layout Standard + + +\backslash +sdcc +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +EXEC_PREFIX +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$PREFIX +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$PREFIX +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +BINDIR +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$EXECPREFIX +\emph default +/bin +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$EXECPREFIX +\emph default + +\backslash +bin +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +DATADIR +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$PREFIX +\emph default +/share +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$PREFIX +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +DOCDIR +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$DATADIR +\emph default +/sdcc/doc +\end_inset + + +\begin_inset Text + +\layout Standard + + +\emph on +$DATADIR +\emph default + +\backslash +doc +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +INCLUDE_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +sdcc/include +\end_inset + + +\begin_inset Text + +\layout Standard + +include +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +LIB_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +sdcc/lib +\end_inset + + +\begin_inset Text + +\layout Standard + +lib +\end_inset + + + + +\end_inset + + +\newline + +\newline + +\newline +'configure' also computes relative paths. + This is needed for full relocatability of a binary package and to complete + search paths (see section search paths below): +\newline + +\newline + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Variable (computed) +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +BIN2DATA_DIR +\end_inset + + +\begin_inset Text + +\layout Standard + +../share +\end_inset + + +\begin_inset Text + +\layout Standard + +.. +\backslash + +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +PREFIX2BIN_DIR +\end_inset + + +\begin_inset Text + +\layout Standard + +bin +\end_inset + + +\begin_inset Text + +\layout Standard + +bin +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +PREFIX2DATA_DIR +\end_inset + + +\begin_inset Text + +\layout Standard + +share/sdcc +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\end_inset + + +\layout Subsection + +Install paths +\layout Standard + +1. + Binary files (preprocessor, assembler and linker) +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +$EXEC_PREFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local/bin +\end_inset + + +\begin_inset Text + +\layout Standard + + +\backslash +sdcc +\backslash +bin +\end_inset + + + + +\end_inset + + +\newline + +\newline +2. + Include files +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +$DATADIR/ +\newline +$INCLUDE_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local/share/sdcc/include +\end_inset + + +\begin_inset Text + +\layout Standard + + +\backslash +sdcc +\backslash +include +\end_inset + + + + +\end_inset + + +\newline + +\newline +3. + Library files (the +\shape italic +model +\shape default + is auto-appended by the compiler, e.g. + small, large, z80, ds390 etc.) +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +$DATADIR/$LIB_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local/share/sdcc/lib +\end_inset + + +\begin_inset Text + +\layout Standard + + +\backslash +sdcc +\backslash +lib +\end_inset + + + + +\end_inset + + +\newline + +\newline +4. + Documentation +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +$DOCDIR +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local/share/sdcc/doc +\end_inset + + +\begin_inset Text + +\layout Standard + + +\backslash +sdcc +\backslash +doc +\end_inset + + + + +\end_inset + + +\layout Subsection + +Search paths +\layout Standard + +Some search paths or parts of them are determined by configure variables + (in +\emph on +italics +\emph default +, see section above). + Further search paths are determined by environment variables during runtime. + +\newline +The paths searched when running the compiler are as follows (the first catch + wins): +\newline + +\newline +1. + Binary files (preprocessor, assembler and linker) +\newline + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Search path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME/ +\emph on +$PPREFIX2BIN_DIR +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME/bin +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME +\backslash +bin +\end_inset + + + + +\begin_inset Text + +\layout Standard + +Path of argv[0] (if available) +\end_inset + + +\begin_inset Text + +\layout Standard + +Path of argv[0] +\end_inset + + +\begin_inset Text + +\layout Standard + +Path of argv[0] +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$PATH +\end_inset + + +\begin_inset Text + +\layout Standard + +$PATH +\end_inset + + +\begin_inset Text + +\layout Standard + +$PATH +\end_inset + + + + +\end_inset + + +\newline + +\newline +2. + Include files +\newline + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Search path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + +---I dir +\end_inset + + +\begin_inset Text + +\layout Standard + +---I dir +\end_inset + + +\begin_inset Text + +\layout Standard + +---I dir +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$SDCC_INCLUDE +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_INCLUDE +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_INCLUDE +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME/ +\newline + +\emph on +$PREFIX2DATA_DIR/ +\newline +$INCLUDE_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_ HOME/ +\newline +share/sdcc/ +\newline +include +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME +\backslash +include +\end_inset + + + + +\begin_inset Text + +\layout Standard + +path(argv[0])/ +\newline + +\emph on +$BIN2DATADIR/ +\emph default + +\newline + +\emph on +$INCLUDE_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +path(argv[0])/ +\newline +../sdcc/include +\newline +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ + +\end_inset + + +\begin_inset Text + +\layout Standard + +path(argv[0]) +\backslash +.. +\backslash +include +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\emph on +$DATADIR/ +\emph default + +\newline + +\emph on +$INCLUDE_DIR_SUFFIX +\end_inset + + +\begin_inset Text + +\layout Standard + +/usr/local/share/sdcc/ +\newline +include +\end_inset + + +\begin_inset Text + +\layout Standard + +(not on Win32) +\end_inset + + + + +\end_inset + + +\newline + +\newline + The option ---nostdinc disables the last two search paths. +\newline + +\newline +3. + Library files +\newline +With the exception of +\begin_inset Quotes sld +\end_inset + +---L dir +\begin_inset Quotes srd +\end_inset + + the +\shape italic +model +\shape default + is auto-appended by the compiler (e.g. + small, large, z80, ds390 etc.). + +\newline + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +Search path +\end_inset + + +\begin_inset Text + +\layout Standard + +*nix default +\end_inset + + +\begin_inset Text + +\layout Standard + +Win32 default +\end_inset + + + + +\begin_inset Text + +\layout Standard + +---L dir +\end_inset + + +\begin_inset Text + +\layout Standard + +---L dir +\end_inset + + +\begin_inset Text + +\layout Standard + +---L dir +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$SDCC_LIB/ +\newline + +\emph on + +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_LIB/ +\newline + +\emph on + +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_LIB +\backslash + +\newline + +\emph on + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME/ +\newline + +\emph on +$PREFIX2DATA_DIR/ +\newline +$LIB_DIR_SUFFIX/ +\end_inset + + +\begin_inset Text + +\layout Standard + +$SDCC_HOME/ +\newline +share/sdcc/ +\newline +lib/ +\emph on + +\end_inset + + +\begin_inset Text + \layout Standard -Linux (and other gcc-builds like Solaris, Cygwin, Mingw32 and OSX) by default - install in /usr/local. - You can override this when configuring with ---prefix-path. - Subdirs used will be bin, share/sdcc/include, share/sdcc/lib and share/sdcc/doc. -\newline -Windows MSVC and Borland builds will install in one single tree (e.g. - /sdcc) with subdirs bin, lib, include and doc. -\newline +$SDCC_HOME +\backslash +lib +\backslash + +\emph on \newline -The paths searched when running the compiler are as follows (the first catch - wins): -\layout Enumerate + +\end_inset + + + + +\begin_inset Text -Binary files (preprocessor, assembler and linker): -\newline -- the path of argv[0] (if available) +\layout Standard + +path(argv[0])/ \newline -- getenv( -\begin_inset Quotes sld -\end_inset -SDCC_BIN_PATH -\begin_inset Quotes srd -\end_inset +\emph on +$BIN2DATADIR/ +\emph default -) \newline -- getenv( -\begin_inset Quotes sld -\end_inset -SDCCHOME -\begin_inset Quotes srd +\emph on +$LIB_DIR_SUFFIX/ \end_inset + + +\begin_inset Text -)/bin -\newline -- $PATH -\layout Enumerate +\layout Standard -Include files: +path(argv[0])/ \newline -- -I dir +../sdcc/lib/ +\emph on + \newline -- getenv( -\begin_inset Quotes sld -\end_inset +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ -SDCC_INCLUDE_PATH -\begin_inset Quotes srd \end_inset + + +\begin_inset Text -) -\newline -- getenv( -\begin_inset Quotes sld -\end_inset +\layout Standard -SDCCHOME -\begin_inset Quotes srd -\end_inset +path(argv[0]) +\backslash -)/include -\newline -- /usr/local/share/sdcc/include (gcc builds) \newline -- path(arv[0])/../include and then /sdcc/include (as a last resort for windoze - msvc and borland builds) -\layout Enumerate +.. +\backslash +lib +\backslash -Library files (the -\shape italic -model -\shape default - is auto-appended by the compiler, e.g. - small, large, z80, ds390 etc.): -\newline -- -L dir +\emph on + \newline -- getenv( -\begin_inset Quotes sld -\end_inset +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ -SDCC_LIB_PATH -\begin_inset Quotes srd \end_inset + + + + +\begin_inset Text -)/ -\shape italic -model -\shape default +\layout Standard -\newline -- getenv( -\begin_inset Quotes sld -\end_inset -SDCCHOME -\begin_inset Quotes srd +\emph on +$DATADIR/ +\newline +$LIB_DIR_SUFFIX/ \end_inset + + +\begin_inset Text -)/lib/ -\shape italic -model -\shape default +\layout Standard +/usr/local/share/sdcc/ \newline -- /usr/local/share/sdcc/lib/ -\shape italic -model -\shape default - (gcc builds) -\newline -- path(argv[0])/../lib/ -\shape italic -model -\shape default - and then /sdcc/lib/ -\shape italic -model -\shape default - (as a last resort for windoze msvc and borland builds) -\layout Enumerate +lib/ +\emph on + +\end_inset + + +\begin_inset Text -Documentation (although never really searched for, you have to do that yourself - :): -\newline -- getenv( -\begin_inset Quotes sld +\layout Standard + +(not on Win32) \end_inset + + + -SDCCHOME -\begin_inset Quotes srd \end_inset -)/doc -\newline -- /usr/local/share/sdcc/doc (gcc builds) -\newline -- /sdcc/doc (windoze msvc and borland builds) + +\layout Comment + +Don't delete any of the stray spaces in the table above without checking + the HTML output (last line)! \layout Standard -So, for windoze it is highly recommended to set the environment variable - SDCCHOME to prevent needless usage of -I and -L options. - For gcc-builds SDCCHOME should only be set when sdcc is installed in non-standa -rd paths. +\SpecialChar ~ + +\newline +The option ---nostdlib disables the last two search paths. \layout Subsection Linux and other gcc-based systems (cygwin, mingw32, osx) @@ -500,7 +1855,11 @@ Download the source package \series default .src \series medium -.tgz. +.t +\series default +ar. +\series medium +gz. \layout Enumerate @@ -513,7 +1872,7 @@ Bring up a command line terminal, such as xterm. Unpack the file using a command like: \family sans \series bold -"tar -xzf sdcc.src.tgz +"tar -xzf sdcc.src.tar.gz \family default \series default " @@ -572,6 +1931,15 @@ Type \series default This copies the binary executables, the include files, the libraries and the documentation to the install directories. +\layout Standard + +On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelease +)) fails to compile SDCC. + Fortunately there's also gcc 2.9.x installed, which works fine. + This compiler can be selected by running 'configure' with: +\layout LyX-Code + +./configure CC=gcc2 CXX=g++2 \layout Subsection Windows @@ -1986,12 +3354,20 @@ Will not do loop reversal optimization. \layout List \labelwidthstring 00.00.0000 +--- +\series bold +nolabelopt +\series default + Will not optimize labels (makes the dumpfiles more readable). +\layout List +\labelwidthstring 00.00.0000 + \series bold ---no-xinit-opt \series default - This will disable the memcpy of initialized data in far space from code - space + Will not memcpy initialized data in far space from code space. + This saves a few bytes in code space if you don't have initialized data. \layout Subsubsection Other Options @@ -2316,7 +3692,16 @@ cyclomatic complexity ---i-code-in-asm \series default Include i-codes in the asm file. - Looks like noise but is most helpfull for debugging the compiler itself. + Sounds like noise but is most helpfull for debugging the compiler itself. +\layout List +\labelwidthstring 00.00.0000 + + +\series bold +---less-pedantic +\series default + Disable some of the more pedantic warnings (jwk burps: please be more specific + here, please!) \layout Subsubsection Intermediate Dump Options @@ -2473,33 +3858,13 @@ TMPDIR \series bold -(coming\SpecialChar ~ -soon:\SpecialChar ~ -SDCC_BIN_PATH) -\series default - Path, see -\begin_inset Quotes sld -\end_inset - -2.1 Install and search paths -\begin_inset Quotes srd -\end_inset - -. -\layout List -\labelwidthstring 00.00.0000 - - -\series bold -(coming\SpecialChar ~ -soon:\SpecialChar ~ -SDCC_INCLUDE_PATH) +SDCC_HOME \series default Path, see \begin_inset Quotes sld \end_inset -2.1 Install and search paths +2.3 Install and search paths \begin_inset Quotes srd \end_inset @@ -2509,15 +3874,13 @@ SDCC_INCLUDE_PATH) \series bold -(coming\SpecialChar ~ -soon:\SpecialChar ~ -SDCC_LIB_PATH) +SDCC_INCLUDE \series default Path, see \begin_inset Quotes sld \end_inset -2.1 Install and search paths +2.3 Install and search paths \begin_inset Quotes srd \end_inset @@ -2527,17 +3890,13 @@ SDCC_LIB_PATH) \series bold -SDCCDIR\SpecialChar ~ -(soon\SpecialChar ~ -replaced\SpecialChar ~ -by:\SpecialChar ~ -SDCCPATH) +SDCC_LIB \series default Path, see \begin_inset Quotes sld \end_inset -2.1 Install and search paths +2.3 Install and search paths \begin_inset Quotes srd \end_inset @@ -3033,9 +4392,9 @@ Interrupt Numbers and the corresponding address & descriptions for the Standard \begin_inset Tabular - - - + + + \begin_inset Text @@ -5613,15 +6972,17 @@ Pragmas \layout Standard SDCC supports the following #pragma directives. - This directives are applicable only at a function level. \layout Itemize -SAVE - this will save all the current options. +SAVE - this will save all current options to the SAVE/RESTORE stack. + See RESTORE. \layout Itemize -RESTORE - will restore the saved options from the last save. - Note that SAVES & RESTOREs cannot be nested. - SDCC uses the same buffer to save the options each time a SAVE is called. +RESTORE - will restore saved options from the last save. + SAVEs & RESTOREs can be nested. + SDCC uses a SAVE/RESTORE stack: SAVE pushes current options to the stack, + RESTORE pulls current options from the stack. + See SAVE. \layout Itemize NOGCSE - will stop global subexpression elimination. @@ -5638,6 +6999,10 @@ NOOVERLAY - the compiler will not overlay the parameters and local variables of a function. \layout Itemize +LESS_PEDANTIC - the compiler will not warn you anymore for obvious mistakes, + you'r on your own now ;-( +\layout Itemize + NOLOOPREVERSE - Will not do loop reversal optimization \layout Itemize @@ -5662,18 +7027,18 @@ CALLEE-SAVES function1[,function2[,function3...]] - The compiler by default uses a caller saves convention for register saving across function calls, however this can cause unneccessary register pushing & popping when calling small functions from larger functions. - This option can be used to switch the register saving convention for the - function names specified. + This option can be used to switch off the register saving convention for + the function names specified. The compiler will not save registers when calling these functions, extra - code will be generated at the entry & exit for these functions to save - & restore the registers used by these functions, this can SUBSTANTIALLY + code need to be manually inserted at the entry & exit for these functions + to save & restore the registers used by these functions, this can SUBSTANTIALLY reduce code & improve run time performance of the generated code. - In future the compiler (with interprocedural analysis) will be able to - determine the appropriate scheme to use for each function call. + In the future the compiler (with interprocedural analysis) may be able + to determine the appropriate scheme to use for each function call. If ---callee-saves command line option is used, the function names specified in #pragma\SpecialChar ~ -CALLEE-SAVES is appended to the list of functions specified inthe - command line. +CALLEE-SAVES is appended to the list of functions specified in + the command line. \layout Standard The pragma's are intended to be used to turn-off certain optimizations which @@ -7683,6 +9048,9 @@ cc@sdcc.sourceforge.net'. in locating optimization problems. \layout Section +Compiler internals +\layout Subsection + The anatomy of the compiler \layout Standard @@ -8935,10 +10303,53 @@ mov dpl,a \SpecialChar ~ \SpecialChar ~ ret -\size default +\newline + +\layout Subsection + +A few words about basic block successors, predecessors and dominators +\layout Standard + +Successors are basic blocks that might execute after this basic block. +\newline +Predecessors are basic blocks that might execute before reaching this basic + block. +\newline +Dominators are basic blocks that WILL execute before reaching this basic + block. +\newline + +\layout Standard +[basic block 1] +\layout Standard + +if (something) +\layout Standard + +[basic block 2] +\layout Standard + +else +\layout Standard + +[basic block 3] +\layout Standard + +[basic block 4] \newline +\layout Standard + +a) succList of [BB2] = [BB4], of [BB3] = [BB4], of [BB1] = [BB2,BB3] +\layout Standard + +b) predList of [BB2] = [BB1], of [BB3] = [BB1], of [BB4] = [BB2,BB3] +\layout Standard + +c) domVect of [BB4] = BB1 ... + here we are not sure if BB2 or BB3 was executed but we are SURE that BB1 + was executed. \layout Section Acknowledgments