Register Your Window Frames

By Jim Turley  |  Posted 2002-02-11 Print this article Print

Registers are great when your program is running, but pushing and popping 128 big ol registers for subroutine calls is unpleasantly time-consuming (and usually not necessary anyway). Its traditional but its inefficient. One alternative is register windows, of which SPARC processors are a notable proponent. Register windows have their problems, too, and its no coincidence that the only major RISC architecture to use register windows is also the slowest major RISC architecture still in production. IA-64 gets around the constant pushing and popping by using register frames. The first 32 of the 128 integer registers are global, available to all tasks at all times. The other 96, though, can be framed, rotated, or both. Before a function call, you use Itaniums ALLOC instruction (which is unrelated to the C function of the same name) to shift the apparent arrangement of the general-purpose registers so that it appears that parameters are being passed from one function to another through shared registers. In reality, ALLOC changes the mapping of the logical (software-visible) registers to the physical registers, much like SPARC does. The similarities with SPARCs windows are strong and the differences mostly minor. With IA-64s frames, the frame size is arbitrary, unlike SPARC, which supports a few different fixed frame sizes. In the example illustration, the calling routine sets aside 11 registers (GR32 - GR42) for the called routine, with four registers overlapping. The overlapping registers are where the parameters will be passed, although they never really move. Regardless of what registers either routine physically uses, they will appear to be contiguous with the first 32 fixed registers, GR0 - GR31.
Register frames
The maximum frame size is all 96 registers, plus the 32 globals that are always visible. Only the integer registers are framed; FP registers and predicate registers (described below) are not. The minimum frame size is one register, or you can choose not to use ALLOC at all.

Jim Turley is a semiconductor industry analyst, editor, and presenter working in Silicon Valley. Focus technologies are 32-bit microprocessors and semiconductor intellectual property (SIP).

Most recently Jim was the Senior Vice President of Strategy & Technology at ARC International plc (LSE:ARK), where he set the Company's strategic direction and guided its technical developments at five locations worldwide. With headquarters in London (UK) and development centers in New Hampshire, Canada, and California, ARC International is an innovative leader in the semiconductor IP (intellectual property) industry.

Previously, Jim was senior analyst for MicroDesign Resources (a unit of Cahners/Reed Elsevier) as well as the Senior Editor of the prestigious industry journal Microprocessor Report (a three-time winner of the Computer Press Award), and Editor-in-Chief of Embedded Processor Watch. He also hosted and directed the yearly Embedded Processor Forum conference, the industry's annual showcase for new microprocessors. As an analyst and editor, Turley consulting with leading semiconductor firms, providing informed advice on technology trends and market requirements, and was often called on to participate in new product reviews, strategy sessions, and technology development for large semiconductor companies.

Turley is the author of six popular books including Advanced 80386 Programming Techniques, the best-selling PCs Made Easy and others published by McGraw-Hill and Academic Press. He's served as technical editor for several of McGraw-Hill's computer and programming books. In addition, he was a regular technology columnist for Embedded System Programming, Computer Design, and Supermicro magazines, and contributed articles to dozens more. Earlier in his career, Turley held engineering or marketing positions at Adept Technology, Force Computers, TeleVideo, and other high-technology firms in Europe and the United States.

Turley has created and presented numerous seminars and training sessions around the world covering technology trends and the competitive microprocessor market. He is also a well-known speaker at industry events such as the Embedded Systems Conference and Microprocessor Forum, is frequently quoted in the Wall Street Journal, New York Times, USA Today, San Francisco Chronicle, and San Jose Mercury News, and has appeared frequently on television, radio, and Internet broadcasts. Jim volunteers for Recording for the Blind and recently earned his amateur auto-racing license. He has a talented and stunningly attractive wife, two overachieving children, an apparently brain-damaged dog, and an opossum living under the house.

Jim can be contacted at or by calling (408) 226-8086.

For additional information, visit


Submit a Comment

Loading Comments...
Manage your Newsletters: Login   Register My Newsletters

Rocket Fuel