register dancing

register dancing

Many older processor architectures suffer from a seriousshortage of general-purpose registers. This is especially aproblem for compiler-writers, because their generated codeneeds places to store temporaries for things like intermediatevalues in expression evaluation. Some designs with thisproblem, like the Intel 80x86, do have a handful ofspecial-purpose registers that can be pressed into service,providing suitable care is taken to avoid unpleasant sideeffects on the state of the processor: while thespecial-purpose register is being used to hold an intermediatevalue, a delicate minuet is required in which the previousvalue of the register is saved and then restored just beforethe official function (and value) of the special-purposeregister is again needed.