as: s390 Directives

1 
1 9.40.4 Assembler Directives
1 ---------------------------
1 
1 'as' for s390 supports all of the standard ELF assembler directives as
1 outlined in the main part of this document.  Some directives have been
1 extended and there are some additional directives, which are only
1 available for the s390 'as'.
1 
1 '.insn'
1      This directive permits the numeric representation of an
1      instructions and makes the assembler insert the operands according
11      to one of the instructions formats for '.insn' (⇒s390
      Formats).  For example, the instruction 'l %r1,24(%r15)' could be
1      written as '.insn rx,0x58000000,%r1,24(%r15)'.
1 '.short'
1 '.long'
1 '.quad'
1      This directive places one or more 16-bit (.short), 32-bit (.long),
1      or 64-bit (.quad) values into the current section.  If an ELF or
1      TLS modifier is used only the following expressions are allowed:
1      'symbol@modifier + constant', 'symbol@modifier + label + constant',
1      and 'symbol@modifier - label + constant'.  The following modifiers
1      are available:
1      '@got'
1      '@got12'
1           The @got modifier can be used for .short, .long and .quad.
1           The @got12 modifier is synonym to @got.  The symbol is added
1           to the GOT. The symbol term is replaced with offset from the
1           start of the GOT to the GOT slot for the symbol.
1      '@gotoff'
1           The @gotoff modifier can be used for .short, .long and .quad.
1           The symbol term is replaced with the offset from the start of
1           the GOT to the address of the symbol.
1      '@gotplt'
1           The @gotplt modifier can be used for .long and .quad.  A
1           procedure linkage table entry is generated for the symbol and
1           a jump slot for the symbol is added to the GOT. The symbol
1           term is replaced with the offset from the start of the GOT to
1           the jump slot for the symbol.
1      '@plt'
1           The @plt modifier can be used for .long and .quad.  A
1           procedure linkage table entry us generated for the symbol.
1           The symbol term is replaced with the address of the PLT entry
1           for the symbol.
1      '@pltoff'
1           The @pltoff modifier can be used for .short, .long and .quad.
1           The symbol term is replaced with the offset from the start of
1           the PLT to the address of the symbol.
1      '@tlsgd'
1      '@tlsldm'
1           The @tlsgd and @tlsldm modifier can be used for .long and
1           .quad.  A tls_index structure for the symbol is added to the
1           GOT. The symbol term is replaced with the offset from the
1           start of the GOT to the tls_index structure.
1      '@gotntpoff'
1      '@indntpoff'
1           The @gotntpoff and @indntpoff modifier can be used for .long
1           and .quad.  The symbol is added to the static TLS block and
1           the negated offset to the symbol in the static TLS block is
1           added to the GOT. For @gotntpoff the symbol term is replaced
1           with the offset from the start of the GOT to the GOT slot, for
1           @indntpoff the symbol term is replaced with the address of the
1           GOT slot.
1      '@dtpoff'
1           The @dtpoff modifier can be used for .long and .quad.  The
1           symbol term is replaced with the offset of the symbol relative
1           to the start of the TLS block it is contained in.
1      '@ntpoff'
1           The @ntpoff modifier can be used for .long and .quad.  The
1           symbol term is replaced with the offset of the symbol relative
1           to the TCB pointer.
1 
1      For more information about the thread local storage modifiers see
1      the ELF extension documentation 'ELF Handling For Thread-Local
1      Storage'.
1 
1 '.ltorg'
1      This directive causes the current contents of the literal pool to
11      be dumped to the current location (⇒s390 Literal Pool
      Entries).
1 
1 '.machine STRING[+EXTENSION]...'
1 
1      This directive allows changing the machine for which code is
1      generated.  'string' may be any of the '-march=' selection options,
1      or 'push', or 'pop'.  '.machine push' saves the currently selected
1      cpu, which may be restored with '.machine pop'.  Be aware that the
1      cpu string has to be put into double quotes in case it contains
1      characters not appropriate for identifiers.  So you have to write
1      '"z9-109"' instead of just 'z9-109'.  Extensions can be specified
1      after the cpu name, separated by plus characters.  Valid extensions
1      are: 'htm', 'nohtm', 'vx', 'novx'.  They extend the basic
1      instruction set with features from a higher cpu level, or remove
1      support for a feature from the given cpu level.
1 
1      Example: 'z13+nohtm' allows all instructions of the z13 cpu except
1      instructions from the HTM facility.
1 
1 '.machinemode string'
1      This directive allows to change the architecture mode for which
1      code is being generated.  'string' may be 'esa', 'zarch',
1      'zarch_nohighgprs', 'push', or 'pop'.  '.machinemode
1      zarch_nohighgprs' can be used to prevent the 'highgprs' flag from
1      being set in the ELF header of the output file.  This is useful in
1      situations where the code is gated with a runtime check which makes
1      sure that the code is only executed on kernels providing the
1      'highgprs' feature.  '.machinemode push' saves the currently
1      selected mode, which may be restored with '.machinemode pop'.
1