ILC between XPLINK and non-XPLINK C

The parameter list format passed by non-XPLINK C is identical to one built in the argument area of an XPLINK caller, except that in the XPLINK case certain parameters may be passed in registers. The argument list may contain addresses of arguments passed indirectly (by reference) or values of arguments passed directly (by value). The end of the parameter list is not marked by the high order bit of the last parameter being turned on. Since the end of the argument list is not identified the programmer must ensure that the callee only accesses as many parameters as the caller had arguments.

When an XPLINK function calls a non-XPLINK C function, glue code will use the information encoded at the call site to determine which registers contain parameters. These parameters will be stored in the argument area to construct a complete, contiguous parameter list. When the non-XPLINK C program is given control, register 1 will point to this complete parameter list. Upon return, the returned value is transferred from C to XPLINK conventions by the glue code, again using information encoded at the call site.

When a non-XPLINK C function calls an XPLINK function, glue code will use the interface-mapping flags in the PPA1 of the XPLINK callee to determine which registers should contain parameters. These registers will be loaded from the parameter list, and the rest of the parameter list will be copied into the argument area of the "caller" (in this case, a transitional stack frame). Upon return, the returned value is transferred from XPLINK to C conventions by the glue code, again using information in the interface-mapping flags.