Speculative Loads

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

Somewhat stronger than a hint is a speculative load, an instruction that tells the processor it might want to load data from memory. Programmers (or more realistically, advanced compilers) can sprinkle their code with speculative loads to try to snag data that might be needed soon. Itanium will do its best to comply, but if the system bus is busy, the speculative load might be postponed indefinitely. If a speculative load fails (such as from a memory fault or violation) the processor does not raise an exception. Hey, it was only speculative anyway. Itanium can hoist loads above branches, which many high-end RISCs do, but it can also hoist loads above stores, which is much trickier. The usual problem with the latter procedure is alias detection: the compiler cant be sure that loads and stores arent to the same address. As long as theres a chance, its dangerous to load from memory before all the stores to the same memory addresses are finished. Yet loads are time-consuming, so its a big win if you can accelerate them.
IA-64 gets around this problem--with a little help from you--with the LD.A (load advanced) instruction. LD.A speculatively loads from memory, but also stuffs the load address into a special buffer called the Advanced Load Address Table (ALAT). Subsequent stores to memory are checked against addresses in the ALAT. If theres a match, the speculative load aborts (or, if it already completed, the contents are discarded). Using the data from a LD.A can be tricky, too. You need to validate them with a CHK.A instruction first. Theres no guarantee that any calculations you did wont have to be redone with valid data. Its a bit of a gamble, but can pay handsomely if you speculate wisely. Architecture imitates life.

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 info@jimturley.com or by calling (408) 226-8086.

For additional information, visit http://www.jimturley.com.


Submit a Comment

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

Rocket Fuel