• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2006, Vol. 28 ›› Issue (6): 115-117.

• 论文 • 上一篇    下一篇

后备栈:一种高效的返回地址栈修复机制

孙彩霞 唐宏伟 张民选   

  • 出版日期:2006-06-01 发布日期:2010-05-20

  • Online:2006-06-01 Published:2010-05-20

摘要:

当前,大多数高性能微处理器都使用返回地址栈为返回指令提供预测目标地址.而要想获得高的返回地址预测精度,在发生分支误预测后对返回地址栈进行修复是必不可少的.本 文首先分析了三种常见的返回地址栈修复机制,提出了一种新的返回地址栈修复机制——后备栈,并详细描述了后备栈机制的逻辑实现和工作原理.最后,本文把后备栈机制和其其他三种常见的修复机制进行了比较.在不发生返回地址栈溢出时,使用后备栈机制能够获得100%的返回地址预测精度.

关键词: 返回地址栈 返回地址栈修复机制 后备栈 分支预测

Abstract:

In most current high-performance microprocessors, the predicted target addresses of procedure returns are provided by a return-address stack (RAS).   In order to achieve higher prediction accuracy, it is necessary to repair the return-address-stack after branch mispredictions. First, three kinds of re  turn-address stack repair mechanisms used widely are analyzed, a novel retura-address stack repair technique called backup stack is proposed, and its im plementation is detailed. At last, the backup stack repair mechanism is compared with other three ones and a conclusion is drawn. With the backup stack  technique used to repair the return-address stack, a 100% retura-address prediction accuracy can be achieved unless overflow appears.

Key words: return-address stack, return-address stack repair mechanism, backup stack, branch prediction