⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gcc.1

📁 早期freebsd实现
💻 1
📖 第 1 页 / 共 5 页
字号:
function calls, by emitting extra instructions to save and restore theregisters around such calls.  Such allocation is done only when itseems to result in better code than would otherwise be produced.This option is enabled by default on certain machines, usually thosewhich have no call-preserved registers to use instead..TP.B \-fkeep\-inline\-functionsEven if all calls to a given function are integrated, and the functionis declared \c.B static\c\&, nevertheless output a separate run-timecallable version of the function..TP.B \-fno\-function\-cseDo not put function addresses in registers; make each instruction thatcalls a constant function contain the function's address explicitly.This option results in less efficient code, but some strange hacksthat alter the assembler output may be confused by the optimizationsperformed when this option is not used..PPThe following options control specific optimizations.  The `\|\c.B \-O2\c\&\|'option turns on all of these optimizations except `\|\c.B \-funroll\-loops\c\&\|'and `\|\c.B \-funroll\-all\-loops\c\&\|'.  The `\|\c.B \-O\c\&\|' option usually turns onthe `\|\c.B \-fthread\-jumps\c\&\|' and `\|\c.B \-fdelayed\-branch\c\&\|' options, butspecific machines may change the default optimizations.You can use the following flags in the rare cases when ``fine-tuning''of optimizations to be performed is desired..TP.B \-fstrength\-reducePerform the optimizations of loop strength reduction andelimination of iteration variables..TP.B \-fthread\-jumpsPerform optimizations where we check to see if a jump branches to alocation where another comparison subsumed by the first is found.  Ifso, the first branch is redirected to either the destination of thesecond branch or a point immediately following it, depending on whetherthe condition is known to be true or false..TP.B \-funroll\-loopsPerform the optimization of loop unrolling.  This is only done for loopswhose number of iterations can be determined at compile time or run time..TP.B \-funroll\-all\-loopsPerform the optimization of loop unrolling.  This is done for all loops.This usually makes programs run more slowly..TP.B \-fcse\-follow\-jumpsIn common subexpression elimination, scan through jump instructions incertain cases.  This is not as powerful as completely global CSE, butnot as slow either..TP.B \-frerun\-cse\-after\-loopRe-run common subexpression elimination after loop optimizations has beenperformed.  .TP.B \-felide\-constructors.I(C++ only.)Use this option to instruct the compiler to be smarter about when it canelide constructors.  Without this flag, GNU C++ and cfront bothgenerate effectively the same code for:.sp.brA\ foo\ ();.brA\ x\ (foo\ ());\ \ \ //\ x\ initialized\ by\ `foo\ ()',\ no\ ctor\ called.brA\ y\ =\ foo\ ();\ \ \ //\ call\ to\ `foo\ ()'\ heads\ to\ temporary,.br\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ y\ is\ initialized\ from\ the\ temporary..br.spNote the difference!  With this flag, GNU C++ initializes `\|\c.B y\c\&\|' directlyfrom the call to .B foo ()without going through a temporary..TP.B \-fexpensive\-optimizationsPerform a number of minor optimizations that are relatively expensive..TP.B \-fdelayed\-branchIf supported for the target machine, attempt to reorder instructionsto exploit instruction slots available after delayed branchinstructions..TP.B \-fschedule\-insnsIf supported for the target machine, attempt to reorder instructions toeliminate execution stalls due to required data being unavailable.  Thishelps machines that have slow floating point or memory load instructionsby allowing other instructions to be issued until the result of the loador floating point instruction is required..TP.B \-fschedule\-insns2Similar to `\|\c.B \-fschedule\-insns\c\&\|', but requests an additional pass ofinstruction scheduling after register allocation has been done.  This isespecially useful on machines with a relatively small number ofregisters and where memory load instructions take more than one cycle..PP.SH TARGET OPTIONSBy default, GNU CC compiles code for the same type of machine that youare using.  However, it can also be installed as a cross-compiler, tocompile for some other type of machine.  In fact, several differentconfigurations of GNU CC, for different target machines, can beinstalled side by side.  Then you specify which one to use with the`\|\c.B \-b\c\&\|' option.In addition, older and newer versions of GNU CC can be installed sideby side.  One of them (probably the newest) will be the default, butyou may sometimes wish to use another..TP.BI "\-b " "machine"\c\&The argument \c.I machine\c\& specifies the target machine for compilation.This is useful when you have installed GNU CC as a cross-compiler.The value to use for \c.I machine\c\& is the same as was specified as themachine type when configuring GNU CC as a cross-compiler.  Forexample, if a cross-compiler was configured with `\|\c.B configurei386v\c\&\|', meaning to compile for an 80386 running System V, then youwould specify `\|\c.B \-b i386v\c\&\|' to run that cross compiler.When you do not specify `\|\c.B \-b\c\&\|', it normally means to compile forthe same type of machine that you are using..TP.BI "\-V " "version"\c\&The argument \c.I version\c\& specifies which version of GNU CC to run.This is useful when multiple versions are installed.  For example,\c.I version\c\& might be `\|\c.B 2.0\c\&\|', meaning to run GNU CC version 2.0.The default version, when you do not specify `\|\c.B \-V\c\&\|', is controlledby the way GNU CC is installed.  Normally, it will be a version thatis recommended for general use..PP.SH MACHINE DEPENDENT OPTIONSEach of the target machine types can have its own special options,starting with `\|\c.B \-m\c\&\|', to choose among various hardware models orconfigurations\(em\&for example, 68010 vs 68020, floating coprocessor ornone.  A single installed version of the compiler can compile for anymodel or configuration, according to the options specified.These are the `\|\c.B \-m\c\&\|' options defined for the 68000 series:.TP.B \-m68020.TP.B \-mc68020Generate output for a 68020 (rather than a 68000).  This is thedefault if you use the unmodified sources..TP.B \-m68000.TP.B \-mc68000Generate output for a 68000 (rather than a 68020)..TP.B \-m68881Generate output containing 68881 instructions for floating point.This is the default if you use the unmodified sources..TP.B \-mfpaGenerate output containing Sun FPA instructions for floating point..TP.B \-msoft\-floatGenerate output containing library calls for floating point..IWARNING: the requisite libraries are not part of GNU CC.  Normally thefacilities of the machine's usual C compiler are used, but this can'tbe done directly in cross-compilation.  You must make your ownarrangements to provide suitable library functions for cross-compilation..TP.B \-mshortConsider type \c.B int\c\& to be 16 bits wide, like \c.B short int\c\&..TP.B \-mnobitfieldDo not use the bit-field instructions.  `\|\c.B \-m68000\c\&\|' implies`\|\c.B \-mnobitfield\c\&\|'..TP.B \-mbitfieldDo use the bit-field instructions.  `\|\c.B \-m68020\c\&\|' implies`\|\c.B \-mbitfield\c\&\|'.  This is the default if you use the unmodifiedsources..TP.B \-mrtdUse a different function-calling convention, in which functionsthat take a fixed number of arguments return with the \c.B rtd\c\&instruction, which pops their arguments while returning.  Thissaves one instruction in the caller since there is no need to popthe arguments there.This calling convention is incompatible with the one normallyused on Unix, so you cannot use it if you need to call librariescompiled with the Unix compiler.Also, you must provide function prototypes for all functions thattake variable numbers of arguments (including \c.B printf\c\&);otherwise incorrect code will be generated for calls to thosefunctions.In addition, seriously incorrect code will result if you call afunction with too many arguments.  (Normally, extra arguments areharmlessly ignored.)The \c.B rtd\c\& instruction is supported by the 68010 and 68020processors, but not by the 68000..PPThese `\|\c.B \-m\c\&\|' options are defined for the Vax:.TP.B \-munixDo not output certain jump instructions (\c.B aobleq\c\& and so on)that the Unix assembler for the Vax cannot handle across longranges..TP.B \-mgnuDo output those jump instructions, on the assumption that youwill assemble with the GNU assembler..TP.B \-mgOutput code for g-format floating point numbers instead of d-format..PPThese `\|\c.B \-m\c\&\|' switches are supported on the Sparc:.TP.B \-mfpuGenerate output containing floating point instructions.  This is thedefault if you use the unmodified sources..TP.B \-mno\-epilogueGenerate separate return instructions for \c.B return\c\& statements.This has both advantages and disadvantages; I don't recall what theyare..PPThese `\|\c.B \-m\c\&\|' options are defined for the Convex:.TP.B \-mc1Generate output for a C1.  This is the default when the compiler isconfigured for a C1..TP.B \-mc2Generate output for a C2.  This is the default when the compiler isconfigured for a C2..TP.B \-margcountGenerate code which puts an argument count in the word preceding eachargument list.  Some non-portable Convex and Vax programs need this word.(Debuggers don't, except for functions with variable-length argumentlists; this information is in the symbol table.).TP.B \-mnoargcountOmit the argument count word.  This is the default if you use theunmodified sources..PPThese `\|\c.B \-m\c\&\|' options are defined for the AMD Am29000:.TP.B \-mdwGenerate code that assumes the DW bit is set, i.e., that byte andhalfword operations are directly supported by the hardware.  This is thedefault..TP.B \-mnodwGenerate code that assumes the DW bit is not set..TP.B \-mbwGenerate code that assumes the system supports byte and halfword writeoperations.  This is the default..TP.B \-mnbwGenerate code that assumes the systems does not support byte andhalfword write operations.  This implies `\|\c.B \-mnodw\c\&\|'..TP.B \-msmallUse a small memory model that assumes that all function addresses areeither within a single 256 KB segment or at an absolute address of lessthan 256K.  This allows the \c.B call\c\& instruction to be used insteadof a \c.B const\c\&, \c.B consth\c\&, \c.B calli\c\& sequence..TP.B \-mlargeDo not assume that the \c.B call\c\& instruction can be used; this is thedefault..TP.B \-m29050Generate code for the Am29050..TP.B \-m29000Generate code for the Am29000.  This is the default..TP.B \-mkernel\-registersGenerate references to registers \c.B gr64-gr95\c\& instead of\c.B gr96-gr127\c\&.  This option can be used when compiling kernel codethat wants a set of global registers disjoint from that used byuser-mode code.Note that when this option is used, register names in `\|\c.B \-f\c\&\|' flagsmust use the normal, user-mode, names..TP.B \-muser\-registersUse the normal set of global registers, \c.B gr96-gr127\c\&.  This is thedefault..TP.B \-mstack\-checkInsert a call to \c.B __msp_check\c\& after each stack adjustment.  Thisis often used for kernel code..PPThese `\|\c.B \-m\c\&\|' options are defined for Motorola 88K architectures:.TP.B \-mbig\-picEmit position-independent code, suitable for dynamic linking, even ifbranches need large displacements.  Equivalent to the general-use option `\|\c.B \-fPIC\c\&\|'.The general-use option `\|\c.B \-fpic\c\&\|',by contrast, only emits valid 88k code if all branches involve smalldisplacements. GCC does not emit position-independent code by default..TP.B \-midentify\-revisionInclude an \c.B ident\c\& directive in the assembler output recording thesource file name, compiler name and version, timestamp, and compilationflags used..TP.B \-mno\-underscoresIn assembler output, emit symbol names without adding an underscorecharacter at the beginning of each name.  The default is to use anunderscore as prefix on each name..TP.B \-mno\-check\-zero\-division.TP.B \-mcheck\-zero\-divisionEarly models of the 88K architecture had problems with division by zero;in particular, many of them didn't trap.  Use these options to avoidincluding (or to include explicitly) additional code to detect divisionby zero and signal an exception.  All GCC configurations for the 88K use`\|\c.B \-mcheck\-zero\-division\c\&\|' by default..TP.B \-mocs\-debug\-info.TP.B \-mno\-ocs\-debug\-infoInclude (or omit) additional debugging information (aboutregisters used in each stack frame) as specified in the 88Open ObjectCompatibility Standard, ``OCS''.  This extra information is not neededby GDB.  The default for DG/UX, SVr4, and Delta 88 SVr3.2 is toinclude this information; other 88k configurations omit this informationby default..TP.B \-mocs\-frame\-position.TP.B \-mno\-ocs\-frame\-positionForce (or do not require) register values to be stored in a particularplace in stack frames, as specified in OCS.  The DG/UX, Delta88 SVr3.2,and BCS configurations use `\|\c.B \-mocs\-frame\-position\c\&\|'; other 88kconfigurations have the default `\|\c.B \-mno\-ocs\-frame\-position\c\&\|'..TP.B \-moptimize\-arg\-area.TP.B \-mno\-optimize\-arg\-areaControl how to store function arguments in stack frames.`\|\c.B \-moptimize\-arg\-area\c\&\|' saves space, but may break somedebuggers (not GDB).  `\|\c.B \-mno\-optimize\-arg\-area\c\&\|' conforms better tostandards.   By default GCC does not optimize the argument area..TP.BI "\-mshort\-data\-" "num"\c\&.I num\c\&Generate smaller data references by making them relative to \c.B r0\c\&,which allows loading a value using a single instruction (rather than theusual two).  You control which data references are affected byspecifying \c.I num\c\& with this option.  For example, if you specify`\|\c.B \-mshort\-data\-512\c\&\|', then the data references affected are thoseinvolving displacements of less than 512 bytes.`\|\c.B \-mshort\-data\-\c.I num\c\&\c\&\|' is not effective for \c.I num\c\& greaterthan 64K..TP.B \-msvr4.TP.B \-msvr3Turn on (`\|\c.B \-msvr4\c\&\|') or off (`\|\c.B \-msvr3\c\&\|') compiler extensionsrelated to System V release 4 (SVr4).  This controls the following:.TP\ \ \ \(bu Which variant of the assembler syntax to emit (which you can selectindependently using `\|\c.B \-mversion03.00\c\&\|').  .TP\ \ \ \(bu`\|\c.B \-msvr4\c\&\|' makes the C preprocessor recognize `\|\c.B #pragma weak\c\&\|'.TP\ \ \ \(bu`\|\c.B \-msvr4\c\&\|' makes GCC issue additional declaration directives used inSVr4.  .PP`\|\c.B \-msvr3\c\&\|' is the default for all m88K configurations exceptthe SVr4 configuration..TP.B \-mtrap\-large\-shift.TP.B \-mhandle\-large\-shiftInclude code to detect bit-shifts of more than 31 bits; respectively,trap such shifts or emit code to handle them properly.  By default GCCmakes no special provision for large bit shifts..TP.B \-muse\-div\-instructionVery early models of the 88K architecture didn't have a divideinstruction, so GCC avoids that instruction by default.  Use this optionto specify that it's safe to use the d

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -