LDIL LP'function,%r1

LDO RP'function(%r1), %r22 ; Now to call the routine

BL $$dyncall, %r31 ; r22 is the input register for $$dyncall COPY %r31, %r2

This code sequence generates the necessary PLABEL fixups that the linker needs in order to generate the proper procedure label. The dyncall millicode routine in /usr/lib/milli.a must be used to call a procedure using this type of procedure label, (that is, a BL or BV does not work).

190 Writing and Generating Position-Independent Code

Page 190
Image 190
HP UX Software Transition Kit (STK) manual Writing and Generating Position-Independent Code