IPR-NIOS Altera, IPR-NIOS Datasheet - Page 178

no-image

IPR-NIOS

Manufacturer Part Number
IPR-NIOS
Description
IP NIOS II MEGACORE RENEW
Manufacturer
Altera
Type
MegaCorer
Datasheet

Specifications of IPR-NIOS

License
Renewal License
Lead Free Status / RoHS Status
Not applicable / Not applicable
7–14
Nios II Processor Reference Handbook
Example 7–6
Example 7–6. Local Dynamic Model
addi
call
addi
# Address of x in r5
ldw
# Value of x2 in r6
One 2-word GOT slot is allocated for all R_NIOS2_TLS_LDM16 operations in the
linked object. Any thread-local symbol in this object can be used, as shown in
Example
Example 7–7. GOT Slot with Thread-Local Storage
GOT[n]
GOT[n+1]
Example 7–8
Example 7–8. Initial Exec Model
ldw
add
# Address of x in r4
A single GOT slot is allocated to hold the offset of x from the thread pointer, as shown
in
Example 7–9. GOT Slot for Initial Exec Model
GOT[n]
Example 7–10
Example 7–10. Local Exec Model
addi
# Address of x in r4
There is no GOT slot associated with the local exec model.
Debug information uses the GNU extension DW_OP_GNU_push_tls_address, as
shown in
Example 7–11. Debug Information
.byte 0x03
.word %tls_ldo(x)
.byte 0xe0
Example
r4, r22, %tls_ldm(x)
__tls_get_addr
r5, r2, %tls_ldo(x)
r6, %tls_ldo(x2)(r2)
r4, %tls_ie(x)(r22)
r4, r23, r4
r4, r23, %tls_le(x)
7–7.
Example
7–9.
shows the local dynamic model.
shows the initial exec model.
shows the local exec model.
7–11.
# R_NIOS2_TLS_IE16 x
# R_NIOS2_TLS_LDM16 x
# R_NIOS2_CALL26 __tls_get_addr
# R_NIOS2_TLS_LDO16 x
# R_NIOS2_TLS_LDO16 x2
# R_NIOS2_TLS_LE16 x
# DW_OP_addr
# R_NIOS2_TLS_DTPREL x
# DW_OP_GNU_push_tls_address
R_NIOS2_TLS_DTPMOD x
0
R_NIOS2_TLS_TPREL x
Chapter 7: Application Binary Interface
December 2010 Altera Corporation
ABI for Linux Systems

Related parts for IPR-NIOS