Previous: , Up: s390 Syntax   [Contents][Index]


9.41.3.8 Literal Pool Entries

A literal pool is a collection of values. To access the values a pointer to the literal pool is loaded to a register, the literal pool register. Usually, register %r13 is used as the literal pool register (s390 Register). Literal pool entries are created by adding the suffix :lit1, :lit2, :lit4, or :lit8 to the end of an expression for an instruction operand. The expression is added to the literal pool and the operand is replaced with the offset to the literal in the literal pool.

:lit1

The literal pool entry is created as an 8-bit value. An operand modifier must not be used for the original expression.

:lit2

The literal pool entry is created as a 16 bit value. The operand modifier @got may be used in the original expression. The term x@got:lit2 will put the got offset for the global symbol x to the literal pool as 16 bit value.

:lit4

The literal pool entry is created as a 32-bit value. The operand modifier @got and @plt may be used in the original expression. The term x@got:lit4 will put the got offset for the global symbol x to the literal pool as a 32-bit value. The term x@plt:lit4 will put the plt offset for the global symbol x to the literal pool as a 32-bit value.

:lit8

The literal pool entry is created as a 64-bit value. The operand modifier @got and @plt may be used in the original expression. The term x@got:lit8 will put the got offset for the global symbol x to the literal pool as a 64-bit value. The term x@plt:lit8 will put the plt offset for the global symbol x to the literal pool as a 64-bit value.

The assembler directive .ltorg is used to emit all literal pool entries to the current position.


Previous: , Up: s390 Syntax   [Contents][Index]