SPARC Assembly Language Reference Manual

Exit Print View

Updated: July 2014
 
 

5.2.3 44–Bit Absolute

The 44–bit absolute code model for add() might look like the following:

add:
         sethi   %h44(sum),%o5
         or      %o5,%m44(sum),%o4
         sllx    %o4,12,%o2
         ld      [%o2+%l44(sum)],%o3
         add     %o3,%o0,%o1
         retl 
         st      %o1,[%o2+%l44(sum)]

It takes 4 instructions to form the 44 bits of address for sum. The operators act like as follows:

%h44(sum)R_SPARC_H44 relocation
%m44(sum)R_SPARC_M44
%l44(sum)R_SPARC_L44