未验证 提交 bb762f60 编写于 作者: S Steve Gou 提交者: GitHub

ifu: when mispredicted inst is br, we should also shift ghr (#771)

上级 afcc4f2a
......@@ -452,7 +452,7 @@ class IFU(implicit p: Parameters) extends XSModule with HasIFUConst with HasCirc
val sawNTBr = b.sawNotTakenBranch
val isBr = b.pd.isBr
val taken = Mux(isMisPred, b.taken, b.predTaken)
val updatedGh = oldGh.update(sawNTBr, isBr && taken)
val updatedGh = oldGh.update(sawNTBr || isBr, isBr && taken)
final_gh := updatedGh
if1_gh := updatedGh
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册