MAINFRAME > Administrator > Performance

The What and Why of zEnterprise Millicode

Why Millicode?

Processor designers will provide an instruction implemented in millicode for numerous reasons:

  • Complex instructions can be implemented with reasonable engineering expense. Conversely, the ability to implement instructions in millicode provides the freedom to define very complex instructions. Examples include program call (PC) and program return (PR), compare and form codeword (CFC) and update tree (UPT), which are used for sorting.
  • Compatibility can be provided across processor generations by an early implementation in millicode preceding a higher performance implementation in hardware. Examples of this are the Long Displacement Facility in zSeries* z900 and the Decimal Floating Point Facility in zSeries z990.
  • It has access to hardware facilities that are not available to normal code. One instance of this is move character long (MVCL) when the operands are 4K blocks on 4K boundaries. The millicode has access to a special hardware data mover that doesn’t drag the data through CPU cache but moves it directly from memory to memory.
  • Instructions can perform multiple storage updates without fear of interruption. A primary example of this is perform locked operation (PLO); another example is extract CPU time (ECTR).
  • It runs with high authorization. This allows well-defined operations that require authorization to be performed without needing to invoke the OS. The branch and stack (BAKR) instruction, for instance, saves registers and other status into storage that the application doesn’t have authority to access.
  • A millicoded instruction can provide common functions almost like subroutines. This can help avoid code bloat. This is seen in MVCL, particularly its padding capability, and compare character long (CLCL), which can even compare strings of different lengths.


Massive Impact

On the 9672 G4, and all succeeding IBM mainframe processors, millicode is used for much more than implementing complex instructions. It augments hardware in the areas of system configuration and initialization, virtualization for logical partitioning, I/O functions, interrupt-processing and other control functions, reliability, availability and serviceability (RAS), recovery, and instrumentation. Millicode running on the native processor is a major element in every aspect of the modern mainframe.

Bob Rogers worked on mainframe system software for 43 years at IBM before retiring as a Distinguished Engineer in 2012.

comments powered by Disqus



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Accelerating Enterprise Application Modernization

Modernizing existing applications rather than replacing them is a time-tested approach to competitive advantage in the financial-services industry.

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
Mainframe News Sign Up Today! Past News Letters