Previous: TILEPro Registers, Up: TILEPro Syntax [Contents][Index]

#### 9.48.2.3 Symbolic Operand Modifiers

The assembler supports several modifiers when using symbol addresses in TILEPro instruction operands. The general syntax is the following:

    modifier(symbol)

The following modifiers are supported:

`lo16`

  This modifier is used to load the low 16 bits of the symbol’s address, sign-extended to a 32-bit value (sign-extension allows it to be range-checked against signed 16 bit immediate operands without complaint).

`hi16`

  This modifier is used to load the high 16 bits of the symbol’s address, also sign-extended to a 32-bit value.

`ha16`

  `ha16(N)` is identical to `hi16(N)`, except if `lo16(N)` is negative it adds one to the `hi16(N)` value. This way `lo16` and `ha16` can be added to create any 32-bit value using `auli`. For example, here is how you move an arbitrary 32-bit address into r3:

      moveli r3, lo16(sym)
      auli r3, r3, ha16(sym)

`got`

  This modifier is used to load the offset of the GOT entry corresponding to the symbol.

`got_lo16`

  This modifier is used to load the sign-extended low 16 bits of the offset of the GOT entry corresponding to the symbol.

`got_hi16`

  This modifier is used to load the sign-extended high 16 bits of the offset of the GOT entry corresponding to the symbol.

`got_ha16`

  This modifier is like `got_hi16`, but it adds one if `got_lo16` of the input value is negative.

`plt`

  This modifier is used for function symbols. It causes a procedure linkage table, an array of code stubs, to be created at the time the shared object is created or linked against, together with a global offset table entry. The value is a pc-relative offset to the corresponding stub code in the procedure linkage table. This arrangement causes the run-time symbol resolver to be called to look up and set the value of the symbol the first time the function is called (at latest; depending environment variables). It is only safe to leave the symbol unresolved this way if all references are function calls.

`tls_gd`

  This modifier is used to load the offset of the GOT entry of the symbol’s TLS descriptor, to be used for general-dynamic TLS accesses.

`tls_gd_lo16`

  This modifier is used to load the sign-extended low 16 bits of the offset of the GOT entry of the symbol’s TLS descriptor, to be used for general dynamic TLS accesses.

`tls_gd_hi16`

  This modifier is used to load the sign-extended high 16 bits of the offset of the GOT entry of the symbol’s TLS descriptor, to be used for general dynamic TLS accesses.

`tls_gd_ha16`

  This modifier is like `tls_gd_hi16`, but it adds one to the value if `tls_gd_lo16` of the input value is negative.

`tls_ie`

  This modifier is used to load the offset of the GOT entry containing the offset of the symbol’s address from the TCB, to be used for initial-exec TLS accesses.

`tls_ie_lo16`

  This modifier is used to load the low 16 bits of the offset of the GOT entry containing the offset of the symbol’s address from the TCB, to be used for initial-exec TLS accesses.

`tls_ie_hi16`

  This modifier is used to load the high 16 bits of the offset of the GOT entry containing the offset of the symbol’s address from the TCB, to be used for initial-exec TLS accesses.

`tls_ie_ha16`

  This modifier is like `tls_ie_hi16`, but it adds one to the value if `tls_ie_lo16` of the input value is negative.

`tls_le`

  This modifier is used to load the offset of the symbol’s address from the TCB, to be used for local-exec TLS accesses.

`tls_le_lo16`

  This modifier is used to load the low 16 bits of the offset of the symbol’s address from the TCB, to be used for local-exec TLS accesses.

`tls_le_hi16`

  This modifier is used to load the high 16 bits of the offset of the symbol’s address from the TCB, to be used for local-exec TLS accesses.

`tls_le_ha16`

  This modifier is like `tls_le_hi16`, but it adds one to the value if `tls_le_lo16` of the input value is negative.

`tls_gd_call`

  This modifier is used to tag an instruction as the “call” part of a calling sequence for a TLS GD reference of its operand.

`tls_gd_add`

  This modifier is used to tag an instruction as the “add” part of a calling sequence for a TLS GD reference of its operand.

`tls_ie_load`

  This modifier is used to tag an instruction as the “load” part of a calling sequence for a TLS IE reference of its operand.

Previous: TILEPro Registers, Up: TILEPro Syntax [Contents][Index]