Difference between revisions of "Register renaming"

From Computer History Wiki
Jump to: navigation, search
m (better cat)
m (better cat)
 
Line 7: Line 7:
 
{{semi-stub}}
 
{{semi-stub}}
  
[[Category: CPU Basics‎‎]]
+
[[Category: CPU Hardware]]
`
 

Latest revision as of 15:05, 15 December 2018

Register renaming is a technique used in the implementation of superscalar processors, particularly in those using out-of-order execution, to avoid 'stalls' caused by conflicts over register usage.

When an instruction wants to store its result in a register, the old contents of which some prior instruction (in program terms, not execution time terms) needs to use as an input, the first instruction cannot complete until the second has started. If the first instruction instead places its output in another, 'hidden' internal register, the conflict can be avoided. Later references to the output of the first instruction will of course have to use the value in the hidden internal register - this is the renaming.

One cause of this is the fact that due to the fixed word size used for an instruction set, not many bits are available to name registers, but modern processors can have a lot of registers, more than can be named in the instructions - use of these keeps the data in the CPU, where it is quickly accessible. Register renaming is however needed to make use of them.