From 17cbbd84aee765f9c3be45d8abe3bb29c2c14dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?OdnetninI=20=28Eduardo=20Jos=C3=A9=20G=C3=B3mez=20Hern?= =?UTF-8?q?=C3=A1ndez=29?= Date: Mon, 29 Apr 2024 12:38:22 +0200 Subject: [PATCH] cpu: Indirect predictor track conditional indirect (#1077) As discussed in https://github.com/orgs/gem5/discussions/954: In the refactor made by commit f65df9b959d8e2fc3b5 conditional indirect branches are no longer updated in the indirect predictor. This kind of branches do not exist in x86 neither arm, but they are present in PowerPC. This patch, enables the indirect predictor to track this kind of branches. --- src/cpu/pred/simple_indirect.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/pred/simple_indirect.hh b/src/cpu/pred/simple_indirect.hh index efc7c8b0d6..1106d9dc3a 100644 --- a/src/cpu/pred/simple_indirect.hh +++ b/src/cpu/pred/simple_indirect.hh @@ -160,7 +160,8 @@ class SimpleIndirectPredictor : public IndirectPredictor inline bool isIndirectNoReturn(BranchType type) { return (type == BranchType::CallIndirect) || - (type == BranchType::IndirectUncond); + (type == BranchType::IndirectUncond) || + (type == BranchType::IndirectCond); } protected: