zoukankan      html  css  js  c++  java
  • 汇编指令

    汇编指令都是以.开头

    .align integer, pad    //pad是用于填充的一般为空或0
    The .align directive causes the next data generated to be aligned modulo integer bytes.
    Integer must be a positive integer expression and must be a power of 2. If specifed, pad is an
    integer bye value used for padding. The default value of pad for the text section is 0x90
    (nop); for other sections, the default value of pad is zero (0).


    .ascii "string"
    The .ascii directive places the characters in string into the object module at the current
    location but does not terminate the string with a null byte (). String must be enclosed in
    double quotes (") (ASCII 0x22). The .ascii directive is not valid for the .bss section.


    .bcd integer
    The .bcd directive generates a packed decimal (80-bit) value into the current section. The
    .bcd directive is not valid for the .bss section.


    .bss
    The .bss directive changes the current section to .bss.
    .bss symbol, integer
    Defne symbol in the .bss section and add integer bytes to the value of the location counter
    for .bss. When issued with arguments, the .bss directive does not change the current
    section to .bss. Integer must be positive.


    .byte byte1,byte2,...,byteN
    The .byte directive generates initialized bytes into the current section. The .byte directive
    is not valid for the .bss section. Each byte must be an 8-bit value.


    .2byte expression1, expression2, ..., expressionN
    Refer to the description of the .value directive.


    .4byte expression1, expression2, ..., expressionN
    Refer to the description of the .long directive.


    .8byte expression1, expression2, ..., expressionN
    Refer to the description of the .quad directive.


    .comm name, size,alignment
    The .comm directive allocates storage in the data section. The storage is referenced by the
    identifer name. Size is measured in bytes and must be a positive integer. Name cannot be
    predefined. Alignment is optional. If alignment is specifed, the address of name is aligned to
    a multiple of alignment.


    .data
    The .data directive changes the current section to .data.
    .double float
    The .double directive generates a double-precision floating-point constant into the current
    section. The .double directive is not valid for the .bss section.
    .even
    The .even directive aligns the current program counter (.) to an even boundary

    .ext expression1, expression2, ..., expressionN
    The .ext directive generates an 80387 80–bit floating point constant for each expression into
    the current section. The .ext directive is not valid for the .bss section.

    .file "string"
    The .file directive creates a symbol table entry where string is the symbol name and
    STT_FILE is the symbol table type. String specifes the name of the source file associated with
    the object file.


    .float float
    The .float directive generates a single-precision floating-point constant into the current
    section. The .float directive is not valid in the .bss section.


    .globl symbol1, symbol2, ..., symbolN
    The .globl directive declares each symbol in the list to be global. Each symbol is either
    defined externally or defined in the input file and accessible in other files. Default bindings
    for the symbol are overridden. A global symbol defnition in one file satisfes an undefned
    reference to the same global symbol in another fle. Multiple defnitions of a defned global
    symbol are not allowed. If a defned global symbol has more than one defnition, an error
    occurs. The .globl directive only declares the symbol to be global in scope, it does not defne
    the symbol.

    .group group, section, #comdat
    The .group directive adds section to a COMDAT group. Refer to “COMDAT Section” in
    Linker and Libraries Guide for additional information about COMDAT.

    .hidden symbol1, symbol2, ..., symbolN
    The .hidden directive declares each symbol in the list to have hidden linker scoping. All
    references to symbol within a dynamic module bind to the definition within that module.
    Symbol is not visible outside of the module.

    .ident "string"
    The .ident directive creates an entry in the .comment section containing string. String is any
    sequence of characters, not including the double quote ("). To include the double quote
    character within a string, precede the double quote character with a backslash () (ASCII
    0x5C).

    .lcomm name, size, alignment
    The .lcomm directive allocates storage in the .bss section. The storage is referenced by the
    symbol name, and has a size of size bytes. Name cannot be predefined, and size must be a
    positive integer. If alignment is specifed, the address of name is aligned to a multiple of
    alignment bytes. If alignment is not specifed, the default alignment is 4 bytes.

    .local symbol1, symbol2, ..., symbolN
    The .local directive declares each symbol in the list to be local. Each symbol is defined in the
    input fle and not accessible to other fles. Default bindings for the symbols are overridden.
    Symbols declared with the .local directive take precedence over weak and global symbols.
    (See “Symbol Table Section” in Linker and Libraries Guide for a description of global and

    weak symbols.) Because local symbols are not accessible to other fles, local symbols of the
    same name may exist in multiple fles. The .local directive only declares the symbol to be
    local in scope, it does not defne the symbol.

    .long expression1, expression2, ..., expressionN
    The .long directive generates a long integer (32-bit, two's complement value) for each
    expression into the current section. Each expression must be a 32–bit value and must evaluate
    to an integer value. The .long directive is not valid for the .bss section.

    .popsection
    The .popsection directive pops the top of the section stack and continues processing of the
    popped section.

    .previous
    The .previous directive continues processing of the previous section.

    .pushsection section
    The .pushsection directive pushes the specifed section onto the section stack and switches
    to another section.

    .quad expression1, expression2, ..., expressionN
    The .quad directive generates an initialized word (64-bit, two's complement value) for each
    expression into the current section. Each expression must be a 64-bit value, and must evaluate
    to an integer value. The .quad directive is not valid for the .bss section.

    .rel symbol@ type
    The .rel directive generates the specifed relocation entry type for the specifed symbol. The

    .lit directive supports TLS (thread-local storage). Refer to Chapter 8, “Thread-Local
    Storage,” in Linker and Libraries Guide for additional information about TLS.

    .section section, attributes
    The .section directive makes section the current section. If section does not exist, a new
    section with the specifed name and attributes is created. If section is a non-reserved section,
    attributes must be included the frst time section is specifed by the .section directive.

    .set symbol, expression
    The .set directive assigns the value of expression to symbol. Expression can be any legal
    expression that evaluates to a numerical value.

    .skip integer, value
    While generating values for any data section, the .skip directive causes integer bytes to be
    skipped over, or, optionally, flled with the specifed value.

    .sleb128 expression
    The .sleb128 directive generates a signed, little-endian, base 128 number from expression.

    .string "string"
    The .string directive places the characters in string into the object module at the current
    location and terminates the string with a null byte (). String must be enclosed in double
    quotes (") (ASCII 0x22). The .string directive is not valid for the .bss section.

    .symbolic symbol1, symbol2, ..., symbolN
    The .symbolic directive declares each symbol in the list to havesymbolic linker scoping. All
    references to symbol within a dynamic module bind to the definition within that module.
    Outside of the module, symbol is treated as global.

    .tbss
    The .tbss directive changes the current section to .tbss. The .tbss section contains
    uninitialized TLS data objects that will be initialized to zero by the runtime linker.

    .tcomm
    The .tcomm directive defines a TLS common block.

    .tdata
    The .tdata directive changes the current section to .tdata. The .tdata section contains the
    initialization image for initialized TLS data objects.

    .text
    The .text directive defines the current section as .text.

    .uleb128 expression
    The .uleb128 directive generates an unsigned, little-endian, base 128 number from
    expression.

    .value expression1, expression2, ..., expressionN
    The .value directive generates an initialized word (16-bit, two's complement value) for each
    expression into the current section. Each expression must be a 16-bit integer value. The
    .value directive is not valid for the .bss section.

    .weak symbol1, symbol2, ..., symbolN
    The .weak directive declares each symbol in the argument list to be defined either externally
    or in the input file and accessible to other files. Default bindings of the symbol are overridden
    by the .weak directive. A weak symbol definition in one file satisfies an undefined reference
    to a global symbol of the same name in another file. Unresolved weak symbols have a default
    value of zero. The link editor does not resolve these symbols. If a weak symbol has the same
    name as a defned global symbol, the weak symbol is ignored and no error results. The .weak
    directive does not defne the symbol.

    .zero expression
    While flling a data section, the .zero directive fills the number of bytes specifed by
    expression with zero (0).





  • 相关阅读:
    python从可迭代对象中取值
    python中可迭代对象和列表
    python中字典生成式
    Redis源码解析之跳跃表(一)
    Redis高可用集群
    Redis主从&哨兵集群搭建
    Java并发之ThreadPoolExecutor源码解析(三)
    Java并发之ThreadPoolExecutor源码解析(二)
    Java并发之ThreadPoolExecutor源码解析(一)
    并发编程之JMM&Volatile(三)
  • 原文地址:https://www.cnblogs.com/xpylovely/p/11164248.html
Copyright © 2011-2022 走看看