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

📄 md.texi

📁 gcc库的原代码,对编程有很大帮助.
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@table @code@item fFloating point register (@code{fp0} to @code{fp3})@item lLocal register (@code{r0} to @code{r15})@item bGlobal register (@code{g0} to @code{g15})@item dAny local or global register@item IIntegers from 0 to 31@item J0@item KIntegers from -31 to 0@item GFloating point 0@item HFloating point 1@end table@item MIPS---@file{mips.h}@table @code@item dGeneral-purpose integer register@item fFloating-point register (if available)@item h@samp{Hi} register@item l@samp{Lo} register@item x@samp{Hi} or @samp{Lo} register@item yGeneral-purpose integer register@item zFloating-point status register@item ISigned 16 bit constant (for arithmetic instructions)@item JZero@item KZero-extended 16-bit constant (for logic instructions)@item LConstant with low 16 bits zero (can be loaded with @code{lui})@item M32 bit constant which requires two instructions to load (a constantwhich is not @samp{I}, @samp{K}, or @samp{L})@item NNegative 16 bit constant@item OExact power of two@item PPositive 16 bit constant@item GFloating point zero@item QMemory reference that can be loaded with more than one instruction(@samp{m} is preferable for @code{asm} statements)@item RMemory reference that can be loaded with one instruction(@samp{m} is preferable for @code{asm} statements)@item SMemory reference in external OSF/rose PIC format(@samp{m} is preferable for @code{asm} statements)@end table@item Motorola 680x0---@file{m68k.h}@table @code@item aAddress register@item dData register@item f68881 floating-point register, if available@item xSun FPA (floating-point) register, if available@item yFirst 16 Sun FPA registers, if available@item IInteger in the range 1 to 8@item J16 bit signed number@item KSigned number whose magnitude is greater than 0x80@item LInteger in the range -8 to -1@item GFloating point constant that is not a 68881 constant@item HFloating point constant that can be used by Sun FPA@end table@need 1000@item SPARC---@file{sparc.h}@table @code@item fFloating-point register@item ISigned 13 bit constant@item JZero@item K32 bit constant with the low 12 bits clear (a constant that can beloaded with the @code{sethi} instruction)@item GFloating-point zero@item HSigned 13 bit constant, sign-extended to 32 or 64 bits@item QMemory reference that can be loaded with one instruction  (@samp{m} ismore appropriate for @code{asm} statements)@item SConstant, or memory address@item TMemory address aligned to an 8-byte boundary@item U Even register@end table@end table@ifset INTERNALS@node No Constraints@subsection Not Using Constraints@cindex no constraints@cindex not using constraintsSome machines are so clean that operand constraints are not required.  Forexample, on the Vax, an operand valid in one context is valid in any othercontext.  On such a machine, every operand constraint would be @samp{g},excepting only operands of ``load address'' instructions which arewritten as if they referred to a memory location's contents but actualrefer to its address.  They would have constraint @samp{p}.@cindex empty constraintsFor such machines, instead of writing @samp{g} and @samp{p} for allthe constraints, you can choose to write a description with empty constraints.Then you write @samp{""} for the constraint in every @code{match_operand}.Address operands are identified by writing an @code{address} expressionaround the @code{match_operand}, not by their constraints.When the machine description has just empty constraints, certain partsof compilation are skipped, making the compiler faster.  However,few machines actually do not need constraints; all machine descriptionsnow in existence use constraints.@end ifset@ifset INTERNALS@node Standard Names@section Standard Pattern Names For Generation@cindex standard pattern names@cindex pattern names@cindex names, patternHere is a table of the instruction names that are meaningful in the RTLgeneration pass of the compiler.  Giving one of these names to aninstruction pattern tells the RTL generation pass that it can use thepattern in to accomplish a certain task.@table @asis@cindex @code{mov@var{m}} instruction pattern@item @samp{mov@var{m}}Here @var{m} stands for a two-letter machine mode name, in lower case.This instruction pattern moves data with that machine mode from operand1 to operand 0.  For example, @samp{movsi} moves full-word data.If operand 0 is a @code{subreg} with mode @var{m} of a register whoseown mode is wider than @var{m}, the effect of this instruction isto store the specified value in the part of the register that correspondsto mode @var{m}.  The effect on the rest of the register is undefined.This class of patterns is special in several ways.  First of all, eachof these names @emph{must} be defined, because there is no other wayto copy a datum from one place to another.Second, these patterns are not used solely in the RTL generation pass.Even the reload pass can generate move insns to copy values from stackslots into temporary registers.  When it does so, one of the operands isa hard register and the other is an operand that can need to be reloadedinto a register.@findex force_regTherefore, when given such a pair of operands, the pattern must generateRTL which needs no reloading and needs no temporary registers---noregisters other than the operands.  For example, if you support thepattern with a @code{define_expand}, then in such a case the@code{define_expand} mustn't call @code{force_reg} or any other suchfunction which might generate new pseudo registers.This requirement exists even for subword modes on a RISC machine wherefetching those modes from memory normally requires several insns andsome temporary registers.  Look in @file{spur.md} to see how therequirement can be satisfied.@findex change_addressDuring reload a memory reference with an invalid address may be passedas an operand.  Such an address will be replaced with a valid addresslater in the reload pass.  In this case, nothing may be done with theaddress except to use it as it stands.  If it is copied, it will not bereplaced with a valid address.  No attempt should be made to make suchan address into a valid address and no routine (such as@code{change_address}) that will do so may be called.  Note that@code{general_operand} will fail when applied to such an address.@findex reload_in_progressThe global variable @code{reload_in_progress} (which must be explicitlydeclared if required) can be used to determine whether such specialhandling is required.The variety of operands that have reloads depends on the rest of themachine description, but typically on a RISC machine these can only bepseudo registers that did not get hard registers, while on othermachines explicit memory references will get optional reloads.If a scratch register is required to move an object to or from memory,it can be allocated using @code{gen_reg_rtx} prior to reload.  But thisis impossible during and after reload.  If there are cases needingscratch registers after reload, you must define@code{SECONDARY_INPUT_RELOAD_CLASS} and perhaps also@code{SECONDARY_OUTPUT_RELOAD_CLASS} to detect them, and providepatterns @samp{reload_in@var{m}} or @samp{reload_out@var{m}} to handlethem.  @xref{Register Classes}.The constraints on a @samp{move@var{m}} must permit moving any hardregister to any other hard register provided that@code{HARD_REGNO_MODE_OK} permits mode @var{m} in both registers and@code{REGISTER_MOVE_COST} applied to their classes returns a value of 2.It is obligatory to support floating point @samp{move@var{m}}instructions into and out of any registers that can hold fixed pointvalues, because unions and structures (which have modes @code{SImode} or@code{DImode}) can be in those registers and they may have floatingpoint members.There may also be a need to support fixed point @samp{move@var{m}}instructions in and out of floating point registers.  Unfortunately, Ihave forgotten why this was so, and I don't know whether it is stilltrue.  If @code{HARD_REGNO_MODE_OK} rejects fixed point values infloating point registers, then the constraints of the fixed point@samp{move@var{m}} instructions must be designed to avoid ever trying toreload into a floating point register.@cindex @code{reload_in} instruction pattern@cindex @code{reload_out} instruction pattern@item @samp{reload_in@var{m}}@itemx @samp{reload_out@var{m}}Like @samp{mov@var{m}}, but used when a scratch register is required tomove between operand 0 and operand 1.  Operand 2 describes the scratchregister.  See the discussion of the @code{SECONDARY_RELOAD_CLASS}macro in @pxref{Register Classes}.@cindex @code{movstrict@var{m}} instruction pattern@item @samp{movstrict@var{m}}Like @samp{mov@var{m}} except that if operand 0 is a @code{subreg}with mode @var{m} of a register whose natural mode is wider,the @samp{movstrict@var{m}} instruction is guaranteed not to alterany of the register except the part which belongs to mode @var{m}.@cindex @code{load_multiple} instruction pattern@item @samp{load_multiple}Load several consecutive memory locations into consecutive registers.Operand 0 is the first of the consecutive registers, operand 1is the first memory location, and operand 2 is a constant: thenumber of consecutive registers.Define this only if the target machine really has such an instruction;do not define this if the most efficient way of loading consecutiveregisters from memory is to do them one at a time.On some machines, there are restrictions as to which consecutiveregisters can be stored into memory, such as particular starting orending register numbers or only a range of valid counts.  For thosemachines, use a @code{define_expand} (@pxref{Expander Definitions})and make the pattern fail if the restrictions are not met.Write the generated insn as a @code{parallel} with elements being a@code{set} of one register from the appropriate memory location (you mayalso need @code{use} or @code{clobber} elements).  Use a@code{match_parallel} (@pxref{RTL Template}) to recognize the insn.  See@file{a29k.md} and @file{rs6000.md} for examples of the use of this insnpattern.@cindex @samp{store_multiple} instruction pattern@item @samp{store_multiple}Similar to @samp{load_multiple}, but store several consecutive registersinto consecutive memory locations.  Operand 0 is the first of theconsecutive memory locations, operand 1 is the first register, andoperand 2 is a constant: the number of consecutive registers.@cindex @code{add@var{m}3} instruction pattern@item @samp{add@var{m}3}Add operand 2 and operand 1, storing the result in operand 0.  All operandsmust have mode @var{m}.  This can be used even on two-address machines, bymeans of constraints requiring operands 1 and 0 to be the same location.@cindex @code{sub@var{m}3} instruction pattern@cindex @code{mul@var{m}3} instruction pattern@cindex @code{div@var{m}3} instruction pattern@cindex @code{udiv@var{m}3} instruction pattern@cindex @code{mod@var{m}3} instruction pattern@cindex @code{umod@var{m}3} instruction pattern@cindex @code{min@var{m}3} instruction pattern@cindex @code{max@var{m}3} instruction pattern@cindex @code{umin@var{m}3} instruction pattern@cindex @code{umax@var{m}3} instruction pattern@cindex @code{and@var{m}3} instruction pattern@cindex @code{ior@var{m}3} instruction pattern@cindex @code{xor@var{m}3} instruction pattern@item @samp{sub@var{m}3}, @samp{mul@

⌨️ 快捷键说明

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