SPARC Assembly Language Reference Manual

Exit Print View

Updated: July 2014
 
 

5.4.1 Local Executable Code Model

An example of the code for the local executable TLS code model is shown below:

add:
        sethi   %tle_hix22(sum),%o3
        xor     %o3,%tle_lox10(sum),%o2
        ld      [%g7+%o2],%o1
        add     %o1,%o0,%g4
        retl
        st      %g4,[%g7+%o2]

It takes two instructions to form the address of sum. The operators act as follows:

%tle_hix22(sum)R_SPARC_TLS_LE_HIX22 relocation
%tle_lox10(sum)R_SPARC_TLS_LE_LOX10