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

📄 internals.texi

📁 基于4个mips核的noc设计
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
is a label, even if it does not have a colon.@item TC_START_LABEL@itemx TC_START_LABEL_WITHOUT_COLON@cindex TC_START_LABELYou may define this macro to control what GAS considers to be a label.  Thedefault definition is to accept any name followed by a colon character.@item TC_START_LABEL_WITHOUT_COLON@cindex TC_START_LABEL_WITHOUT_COLONSame as TC_START_LABEL, but should be used instead of TC_START_LABEL whenLABELS_WITHOUT_COLONS is defined.@item NO_PSEUDO_DOT@cindex NO_PSEUDO_DOTIf you define this macro, GAS will not require pseudo-ops to start with a@kbd{.} character.@item TC_EQUAL_IN_INSN@cindex TC_EQUAL_IN_INSNIf you define this macro, it should return nonzero if the instruction ispermitted to contain an @kbd{=} character.  GAS will call it with twoarguments, the character before the @kbd{=} character, and the value of@code{input_line_pointer} at that point.  GAS uses this macro to decide if a@kbd{=} is an assignment or an instruction.@item TC_EOL_IN_INSN@cindex TC_EOL_IN_INSNIf you define this macro, it should return nonzero if the current input linepointer should be treated as the end of a line.@item md_parse_name@cindex md_parse_nameIf this macro is defined, GAS will call it for any symbol found in anexpression.  You can define this to handle special symbols in a special way.If a symbol always has a certain value, you should normally enter it in thesymbol table, perhaps using @code{reg_section}.@item md_undefined_symbol@cindex md_undefined_symbolGAS will call this function when a symbol table lookup fails, before itcreates a new symbol.  Typically this would be used to supply symbols whosename or value changes dynamically, possibly in a context sensitive way.Predefined symbols with fixed values, such as register names or conditioncodes, are typically entered directly into the symbol table when @code{md_begin}is called.  One argument is passed, a @code{char *} for the symbol.@item md_operand@cindex md_operandGAS will call this function with one argument, an @code{expressionS}pointer, for any expression that can not be recognized.  When the functionis called, @code{input_line_pointer} will point to the start of theexpression.@item tc_unrecognized_line@cindex tc_unrecognized_lineIf you define this macro, GAS will call it when it finds a line that it can notparse.@item md_do_align@cindex md_do_alignYou may define this macro to handle an alignment directive.  GAS will call itwhen the directive is seen in the input file.  For example, the i386 backenduses this to generate efficient nop instructions of varying lengths, dependingupon the number of bytes that the alignment will skip.@item HANDLE_ALIGN@cindex HANDLE_ALIGNYou may define this macro to do special handling for an alignment directive.GAS will call it at the end of the assembly.@item TC_IMPLICIT_LCOMM_ALIGNMENT (@var{size}, @var{p2var})@cindex TC_IMPLICIT_LCOMM_ALIGNMENTAn @code{.lcomm} directive with no explicit alignment parameter will use thismacro to set @var{p2var} to the alignment that a request for @var{size} byteswill have.  The alignment is expressed as a power of two.  If no alignmentshould take place, the macro definition should do nothing.  Some targets definea @code{.bss} directive that is also affected by this macro.  The defaultdefinition will set @var{p2var} to the truncated power of two of sizes up toeight bytes.@item md_flush_pending_output@cindex md_flush_pending_outputIf you define this macro, GAS will call it each time it skips any space because of aspace filling or alignment or data allocation pseudo-op.@item TC_PARSE_CONS_EXPRESSION@cindex TC_PARSE_CONS_EXPRESSIONYou may define this macro to parse an expression used in a data allocationpseudo-op such as @code{.word}.  You can use this to recognize relocationdirectives that may appear in such directives.@item BITFIELD_CONS_EXPRESSION@cindex BITFIELD_CONS_EXPRESSIONIf you define this macro, GAS will recognize bitfield instructions in dataallocation pseudo-ops, as used on the i960.@item REPEAT_CONS_EXPRESSION@cindex REPEAT_CONS_EXPRESSIONIf you define this macro, GAS will recognize repeat counts in data allocationpseudo-ops, as used on the MIPS.@item md_cons_align@cindex md_cons_alignYou may define this macro to do any special alignment before a data allocationpseudo-op.@item TC_CONS_FIX_NEW@cindex TC_CONS_FIX_NEWYou may define this macro to generate a fixup for a data allocation pseudo-op.@item TC_INIT_FIX_DATA (@var{fixp})@cindex TC_INIT_FIX_DATAA C statement to initialize the target specific fields of fixup @var{fixp}.These fields are defined with the @code{TC_FIX_TYPE} macro.@item TC_FIX_DATA_PRINT (@var{stream}, @var{fixp})@cindex TC_FIX_DATA_PRINTA C statement to output target specific debugging information forfixup @var{fixp} to @var{stream}.  This macro is called by @code{print_fixup}.@item TC_FRAG_INIT (@var{fragp})@cindex TC_FRAG_INITA C statement to initialize the target specific fields of frag @var{fragp}.These fields are defined with the @code{TC_FRAG_TYPE} macro.@item md_number_to_chars@cindex md_number_to_charsThis should just call either @code{number_to_chars_bigendian} or@code{number_to_chars_littleendian}, whichever is appropriate.  On targets likethe MIPS which support options to change the endianness, which function to callis a runtime decision.  On other targets, @code{md_number_to_chars} can be asimple macro.@item md_reloc_size@cindex md_reloc_sizeThis variable is only used in the original version of gas (not@code{BFD_ASSEMBLER} and not @code{MANY_SEGMENTS}).  It holds the size of arelocation entry.@item WORKING_DOT_WORD@itemx md_short_jump_size@itemx md_long_jump_size@itemx md_create_short_jump@itemx md_create_long_jump@itemx TC_CHECK_ADJUSTED_BROKEN_DOT_WORD@cindex WORKING_DOT_WORD@cindex md_short_jump_size@cindex md_long_jump_size@cindex md_create_short_jump@cindex md_create_long_jump@cindex TC_CHECK_ADJUSTED_BROKEN_DOT_WORDIf @code{WORKING_DOT_WORD} is defined, GAS will not do broken word processing(@pxref{Broken words}).  Otherwise, you should set @code{md_short_jump_size} tothe size of a short jump (a jump that is just long enough to jump around anumber of long jumps) and @code{md_long_jump_size} to the size of a long jump(a jump that can go anywhere in the function).  You should define@code{md_create_short_jump} to create a short jump around a number of longjumps, and define @code{md_create_long_jump} to create a long jump.If defined, the macro TC_CHECK_ADJUSTED_BROKEN_DOT_WORD will be called for eachadjusted word just before the word is output.  The macro takes two arguments,an @code{addressT} with the adjusted word and a pointer to the current@code{struct broken_word}.@item md_estimate_size_before_relax@cindex md_estimate_size_before_relaxThis function returns an estimate of the size of a @code{rs_machine_dependent}frag before any relaxing is done.  It may also create any necessaryrelocations.@item md_relax_frag@cindex md_relax_fragThis macro may be defined to relax a frag.  GAS will call this with thesegment, the frag, and the change in size of all previous frags;@code{md_relax_frag} should return the change in size of the frag.@xref{Relaxation}.@item TC_GENERIC_RELAX_TABLE@cindex TC_GENERIC_RELAX_TABLEIf you do not define @code{md_relax_frag}, you may define@code{TC_GENERIC_RELAX_TABLE} as a table of @code{relax_typeS} structures.  Themachine independent code knows how to use such a table to relax PC relativereferences.  See @file{tc-m68k.c} for an example.  @xref{Relaxation}.@item md_prepare_relax_scan@cindex md_prepare_relax_scanIf defined, it is a C statement that is invoked prior to scanningthe relax table.@item LINKER_RELAXING_SHRINKS_ONLY@cindex LINKER_RELAXING_SHRINKS_ONLYIf you define this macro, and the global variable @samp{linkrelax} is set(because of a command line option, or unconditionally in @code{md_begin}), a@samp{.align} directive will cause extra space to be allocated.  The linker canthen discard this space when relaxing the section.@item TC_LINKRELAX_FIXUP (@var{segT})@cindex TC_LINKRELAX_FIXUPIf defined, this macro allows control over whether fixups for agiven section will be processed when the @var{linkrelax} variable isset.  The macro is given the N_TYPE bits for the section in its@var{segT} argument.  If the macro evaluates to a non-zero valuethen the fixups will be converted into relocs, otherwise they willbe passed to @var{md_apply_fix3} as normal.@item md_convert_frag@cindex md_convert_fragGAS will call this for each rs_machine_dependent fragment.The instruction is completed using the data from the relaxation pass.It may also create any necessary relocations.@xref{Relaxation}.@item md_apply_fix@cindex md_apply_fixGAS will call this for each fixup.  It should store the correct value in theobject file.  @code{fixup_segment} performs a generic overflow check on the@code{valueT *val} argument after @code{md_apply_fix} returns.  If the overflowcheck is relevant for the target machine, then @code{md_apply_fix} shouldmodify @code{valueT *val}, typically to the value stored in the object file.@item TC_HANDLES_FX_DONE@cindex TC_HANDLES_FX_DONEIf this macro is defined, it means that @code{md_apply_fix} correctly sets the@code{fx_done} field in the fixup.@item tc_gen_reloc@cindex tc_gen_relocA @code{BFD_ASSEMBLER} GAS will call this to generate a reloc.  GAS will passthe resulting reloc to @code{bfd_install_relocation}.  This currently workspoorly, as @code{bfd_install_relocation} often does the wrong thing, andinstances of @code{tc_gen_reloc} have been written to work around the problems,which in turns makes it difficult to fix @code{bfd_install_relocation}.@item RELOC_EXPANSION_POSSIBLE@cindex RELOC_EXPANSION_POSSIBLEIf you define this macro, it means that @code{tc_gen_reloc} may return multiplerelocation entries for a single fixup.  In this case, the return value of@code{tc_gen_reloc} is a pointer to a null terminated array.@item MAX_RELOC_EXPANSION@cindex MAX_RELOC_EXPANSIONYou must define this if @code{RELOC_EXPANSION_POSSIBLE} is defined; itindicates the largest number of relocs which @code{tc_gen_reloc} may return fora single fixup.@item tc_fix_adjustable@cindex tc_fix_adjustableYou may define this macro to indicate whether a fixup against a locally definedsymbol should be adjusted to be against the section symbol.  It should return anon-zero value if the adjustment is acceptable.@item MD_PCREL_FROM_SECTION@cindex MD_PCREL_FROM_SECTIONIf you define this macro, it should return the offset between the address of aPC relative fixup and the position from which the PC relative adjustment shouldbe made.  On many processors, the base of a PC relative instruction is the nextinstruction, so this macro would return the length of an instruction.@item md_pcrel_from@cindex md_pcrel_fromThis is the default value of @code{MD_PCREL_FROM_SECTION}.  The difference isthat @code{md_pcrel_from} does not take a section argument.@item tc_frob_label@cindex tc_frob_labelIf you define this macro, GAS will call it each time a label is defined.@item md_section_align@cindex md_section_alignGAS will call this function for each section at the end of the assembly, topermit the CPU backend to adjust the alignment of a section.  The functionmust take two arguments, a @code{segT} for the section and a @code{valueT}for the size of the section, and return a @code{valueT} for the roundedsize.@item md_macro_start@cindex md_macro_startIf defined, GAS will call this macro when it starts to include a macroexpansion.  @code{macro_nest} indicates the current macro nesting level, whichincludes the one being expanded.@item md_macro_info@cindex md_macro_infoIf defined, GAS will call this macro after the macro expansion has beenincluded in the input and after parsing the macro arguments.  The singleargument is a pointer to the macro processing's internal representation of themacro (macro_entry *), which includes expansion of the formal arguments.@item md_macro_end@cindex md_macro_endComplement to md_macro_start.  If defined, it is called when finishedprocessing an inserted macro expansion, just before decrementing macro_nest.@item DOUBLEBAR_PARALLEL@cindex DOUBLEBAR_PARALLELAffects the preprocessor so that lines containing '||' don't have theirwhitespace stripped following the double bar.  This is useful for targets thatimplement parallel instructions.@item KEEP_WHITE_AROUND_COLON@cindex KEEP_WHITE_AROUND_COLONNormally, whitespace is compressed and removed when, in the presence of thecolon, the adjoining tokens can be distinguished.  This option affects thepreprocessor so that whitespace around colons is preserved.  This is usefulwhen colons might be removed from the input after preprocessing but beforeassembling, so that adjoining tokens can still be distinguished if there iswhitespace, or concatentated if there is not.@item tc_frob_section@cindex tc_frob_sectionIf you define this macro, a @code{BFD_ASSEMBLER} GAS will call it for eachsection at the end of the assembly.@item tc_frob_file_before_adjust@cindex tc_frob_file_before_adjustIf you define this macro, GAS will call it after the symbol values areresolved, but before the fixups have been changed from local symbols to sectionsymbols.@item tc_frob_symbol@cindex tc_frob_symbolIf you define this macro, GAS will call it for each symbol.  You can indicatethat the symbol should not be included in the object file by definining thismacro to set its second argument to a non-zero value.@item tc_frob_file@cindex tc_frob_fileIf you define this macro, GAS will call it after the symbol table has beencompleted, but before the relocations have been generated.@item tc_frob_file_after_relocsIf you define this macro, GAS will call it after the relocs have beengenerated.

⌨️ 快捷键说明

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