HPlogo PA-RISC Procedure Calling Conventions Reference Manual > Chapter 6 Millicode Calls

6.5 Making a Millicode Call

MPE documents

Complete PDF
Table of Contents

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:
  1. The return address (MRP) is passed in gr31; and

  2. 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:
  1. A standard Branch and Link (BL), if the millicode is within 256K bytes of the caller,

  2. A BLE instruction, if the millicode is within 256K bytes of a predefined code base register, and

  3. 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.)




6.4 Efficiency Factors


6.6 Nested Millicode Calls