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

📄 md.texi

📁 早期freebsd实现
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
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 @code{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 @code{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@var{m}3}@itemx @samp{div@var{m}3}, @samp{udiv@var{m}3}, @samp{mod@var{m}3}, @samp{umod@var{m}3}@itemx @samp{smin@var{m}3}, @samp{smax@var{m}3}, @samp{umin@var{m}3}, @samp{umax@var{m}3}@itemx @samp{and@var{m}3}, @samp{ior@var{m}3}, @samp{xor@var{m}3}Similar, for other arithmetic operations.@cindex @code{mulhisi3} instruction pattern@item @samp{mulhisi3}Multiply operands 1 and 2, which have mode @code{HImode}, and storea @code{SImode} product in operand 0.@cindex @code{mulqihi3} instruction pattern@cindex @code{mulsidi3} instruction pattern@item @samp{mulqihi3}, @samp{mulsidi3}Similar widening-multiplication instructions of other widths.@cindex @code{umulqihi3} instruction pattern@cindex @code{umulhisi3} instruction pattern@cindex @code{umulsidi3} instruction pattern@item @samp{umulqihi3}, @samp{umulhisi3}, @samp{umulsidi3}Similar widening-multiplication instructions that do unsignedmultiplication.@cindex @code{divmod@var{m}4} instruction pattern@item @samp{divmod@var{m}4}Signed division that produces both a quotient and a remainder.Operand 1 is divided by operand 2 to produce a quotient storedin operand 0 and a remainder stored in operand 3.For machines with an instruction that produces both a quotient and aremainder, provide a pattern for @samp{divmod@var{m}4} but do notprovide patterns for @samp{div@var{m}3} and @samp{mod@var{m}3}.  Thisallows optimization in the relatively common case when both the quotientand remainder are computed.If an instruction that just produces a quotient or just a remainderexists and is more efficient than the instruction that produces both,write the output routine of @samp{divmod@var{m}4} to call@code{find_reg_note} and look for a @code{REG_UNUSED} note on thequotient or remainder and generate the appropriate instruction.@cindex @code{udivmod@var{m}4} instruction pattern@item @samp{udivmod@var{m}4}Similar, but does unsigned division.@cindex @code{ashl@var{m}3} instruction pattern@item @samp{ashl@var{m}3}Arithmetic-shift operand 1 left by a number of bits specified by operand2, and store the result in operand 0.  Here @var{m} is the mode ofoperand 0 and operand 1; operand 2's mode is specified by theinstruction pattern, and the compiler will convert the operand to thatmode before generating the instruction.@cindex @code{ashr@var{m}3} instruction pattern@cindex @code{lshl@var{m}3} instruction pattern@cindex @code{lshr@var{m}3} instruction pattern@cindex @code{rotl@var{m}3} instruction pattern@cindex @code{rotr@var{m}3} instruction pattern@item @samp{ashr@var{m}3}, @samp{lshl@var{m}3}, @samp{lshr@var{m}3}, @samp{rotl@var{m}3}, @samp{rotr@var{m}3}Other shift and rotate instructions, analogous to the@code{ashl@var{m}3} instructions.Logical and arithmetic left shift are the same.  Machines that do notallow negative shift counts often have only one instruction forshifting left.  On such machines, you should define a pattern named@samp{ashl@var{m}3} and leave @samp{lshl@var{m}3} undefined.@cindex @code{neg@var{m}2} instruction pattern@item @samp{neg@var{m}2}Negate operand 1 and store the result in operand 0.@cindex @code{abs@var{m}2} instruction pattern@item @samp{abs@var{m}2}Store the absolute value of operand 1 into operand 0.@cindex @code{sqrt@var{m}2} instruction pattern@item @samp{sqrt@var{m}2}Store the square root of operand 1 into operand 0.The @code{sqrt} built-in function of C always uses the mode whichcorresponds to the C data type @code{double}.@cindex @code{ffs@var{m}2} instruction pattern@item @samp{ffs@var{m}2}Store into operand 0 one plus the index of the least significant 1-bitof operand 1.  If operand 1 is zero, store zero.  @var{m} is the modeof operand 0; operand 1's mode is specified by the instructionpattern, and the compiler will convert the operand to that mode beforegenerating the instruction.The @code{ffs} built-in function of C always uses the mode whichcorresponds to the C data type @code{int}.@cindex @code{one_cmpl@var{m}2} instruction pattern@item @samp{one_cmpl@var{m}2}Store the bitwise-complement of operand 1 into operand 0.@cindex @code{cmp@var{m}} instruction pattern@item @samp{cmp@var{m}}Compare operand 0 and operand 1, and set the condition codes.The RTL pattern should look like this:@example(set (cc0) (compare (match_operand:@var{m} 0 @dots{})                    (match_operand:@var{m} 1 @dots{})))@end example@cindex @code{tst@var{m}} instruction pattern@item @samp{tst@var{m}}Compare operand 0 against zero, and set the condition codes.The RTL pattern should look like this:@example(set (cc0) (match_operand:@var{m} 0 @dots{}))@end example@samp{tst@var{m}} patterns should not be defined for machines that donot use @code{(cc0)}.  Doing so would confuse the optimizer since itwould no longer be clear which @code{set} operations were comparisons.The @samp{cmp@var{m}} patterns should be used instead.@cindex @code{movstr@var{m}} instruction pattern@item @samp{movstr@var{m}}Block move instruction.  The addresses of the destination and sourcestrings are the first two operands, and both are in mode @code{Pmode}.The number of bytes to move is the third operand, in mode @var{m}.The fourth operand is the known shared alignment of the source anddestination, in the form of a @code{const_int} rtx.  Thus, if thecompiler knows that both source and destination are word-aligned,it may provide the value 4 for this operand.These patterns need not give special consideration to the possibilitythat the source and destination strings might overlap.@cindex @code{cmpstr@var{m}} instruction pattern@item @samp{cmpstr@var{m}}Block compare instruction, with five operands.  Operand 0 is the output;it has mode @var{m}.  The remaining four operands are like the operandsof @samp{movstr@var{m}}.  The two memory blocks specified are comparedbyte by byte in lexicographic order.  The effect of the instruction isto store a value in operand 0 whose sign indicates the result of thecomparison.@cindex @code{float@var{mn}2} instruction pattern@item @samp{float@var{m}@var{n}2}Convert signed integer operand 1 (valid for fixed point mode @var{m}) tofloating point mode @var{n} and store in operand 0 (which has mode@var{n}).@cindex @code{floatuns@var{mn}2} instruction pattern@item @samp{floatuns@var{m}@var{n}2}Convert unsigned integer operand 1 (valid for fixed point mode @var{m})to floating point mode @var{n} and store in operand 0 (which has mode@var{n}).@cindex @code{fix@var{mn}2} instruction pattern@item @samp{fix@var{m}@var{n}2}Convert operand 1 (valid for floating point mode @var{m}) to fixedpoint mode @var{n} as a signed number and store in operand 0 (whichhas mode @var{n}).  This instruction's result is defined only whenthe value of operand 1 is an integer.@cindex @code{fixuns@var{mn}2} instruction pattern@item @samp{fixuns@var{m}@var{n}2}Convert operand 1 (valid for floating point mode @var{m}) to fixedpoint mode @var{n} as an unsigned number and store in operand 0 (whichhas mode @var{n}).  This instruction's result is defined only when thevalue of operand 1 is an integer.@cindex @code{ftrunc@var{m}2} instruction pattern@item @samp{ftrunc@var{m}2}Convert operand 1 (valid for floating point mode @var{m}) to aninteger value, still represented in floating point mode @var{m}, andstore it in operand 0 (valid for floating point mode @var{m}).@cindex @code{fix_trunc@var{mn}2} instruction pattern@item @samp{fix_trunc@var{m}@var{n}2}Like @samp{fix@var{m}@var{n}2} but works for any floating point valueof mode @var{m} by converting the value to an integer.@cindex @code{fixuns_trunc@var{mn}2} instruction pattern@item @samp{fixuns_trunc@var{m}@var{n}2}Like @samp{fixuns@var{m}@var{n}2} but works for any floating pointvalue of mode @var{m} by converting the value to an integer.@cindex @code{trunc@var{mn}} instruction pattern@item @samp{trunc@var{m}@var{n}}Truncate operand 1 (valid for mode @var{m}) to mode @var{n} andstore in operand 0 (which has mode @var{n}).  Both modes must be fixedpoint or both floating point.@cindex @code{extend@var{mn}} instruction pattern@item @samp{extend@var{m}@var{n}}Sign-extend operand 1 (valid for mode @var{m}) to mode @var{n} andstore in operand 0 (which has mode @var{n}).  Both modes must be fixedpoint or both floating point.@cindex @code{zero_extend@var{mn}} instruction pattern@item @samp{zero_extend@var{m}@var{n}}Zero-extend operand 1 (valid for mode @var{m}) to mode @var{n} andstore in operand 0 (which has mode @var{n}).  Both modes must be fixedpoint.@cindex @code{extv} instruction pattern@item @samp{extv}Extract a bit field from operand 1 (a register or memory operand), whereoperand 2 specifies the width in bits and operand 3 the starting bit,and store it in operand 0.  Operand 0 must have mode @code{word_mode}.Operand 1 may have mode @code{byte_mode} or @code{word_mode}; often@code{word_mode} is allowed only for registers.  Operands 2 and 3 mustbe valid for @code{word_mode}.The RTL generation pass generates this instruction only with constantsfor operands 2 and 3.The bit-field value is sign-extended to a full word integerbefore it is stored in operand 0.@cindex @code{extzv} instruction pattern@item @samp{extzv}Like @samp{extv} except that the bit-field value is zero-extended.@cindex @code{insv} instruction pattern@item @samp{insv}Store operand 3 (which must be valid for @code{word_mode}) into a bitfield in operand 0, where operand 1 specifies the width in bits andoperand 2 the starting bit.  Operand 0 may have mode @code{byte_mode} or@code{word_mode}; often @code{word_mode} is allowed only for registers.Operands 1 and 2 must be valid for @code{word_mode}.The RTL generation pass generates this instruction only with constantsfor operands 1 and 2.@cindex @code{s@var{cond}} instruction pattern@item @samp{s@var{cond}}Store zero or nonzero in the operand according to the condition codes.Value stored is nonzero iff the condition @var{cond} is true.@var{cond} is the name of a comparison operation expression code, suchas

⌨️ 快捷键说明

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