|
|
A call to a millicode routine can only be made from the assembly level. It is
currently not possible to directly call a millicode function from high-level
programming languages.
It is intended that the standard register usage conventions be followed, with
two exceptions:
The return address (MRP) is passed in gr31; and
Function results are returned in gr29.
There are, however, many non-standard practices regarding millicode register
usage.
Local millicode can be accessed with three different methods, depending on its
location relative to currently executing code. These three methods are:
A standard Branch and Link (BL), if the millicode is within 256K
bytes of the caller,
A BLE instruction, if the millicode is within 256K bytes of a
predefined code base register, and
The two-instruction sequence (LDIL,BLE) that can reach any
address or a BL with a linker-generated stub.
External millicode is accessed by method 2 above. (e.g. it can use sr6 or sr7
with a base register of 0.)
|