|
From: <sv...@va...> - 2010-07-07 19:01:46
|
Author: weidendo
Date: 2010-07-07 19:51:59 +0100 (Wed, 07 Jul 2010)
New Revision: 11212
Log:
Fix for branch prediction: handle calls via function pointer
Calls via function pointers are indirect branches, and thus
should call into the indirect branch predictor simulation.
Modified:
trunk/callgrind/main.c
Modified: trunk/callgrind/main.c
===================================================================
--- trunk/callgrind/main.c 2010-07-06 04:25:12 UTC (rev 11211)
+++ trunk/callgrind/main.c 2010-07-07 18:51:59 UTC (rev 11212)
@@ -1180,7 +1180,7 @@
/* Deal with branches to unknown destinations. Except ignore ones
which are function returns as we assume the return stack
predictor never mispredicts. */
- if (sbIn->jumpkind == Ijk_Boring) {
+ if ((sbIn->jumpkind == Ijk_Boring) || (sbIn->jumpkind == Ijk_Call)) {
if (0) { ppIRExpr( sbIn->next ); VG_(printf)("\n"); }
switch (sbIn->next->tag) {
case Iex_Const:
|