static_inst.cc (2665:a124942bacb8) static_inst.cc (2680:246e7104f744)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 46 unchanged lines hidden (view full) ---

55 hist[count]++;
56 }
57 for (int i = 0; i <= max_hist; ++i) {
58 cerr << "\tbuckets of size " << i << " = " << hist[i] << endl;
59 }
60}
61
62bool
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 46 unchanged lines hidden (view full) ---

55 hist[count]++;
56 }
57 for (int i = 0; i <= max_hist; ++i) {
58 cerr << "\tbuckets of size " << i << " = " << hist[i] << endl;
59 }
60}
61
62bool
63StaticInst::hasBranchTarget(Addr pc, ExecContext *xc, Addr &tgt) const
63StaticInst::hasBranchTarget(Addr pc, ThreadContext *tc, Addr &tgt) const
64{
65 if (isDirectCtrl()) {
66 tgt = branchTarget(pc);
67 return true;
68 }
69
70 if (isIndirectCtrl()) {
64{
65 if (isDirectCtrl()) {
66 tgt = branchTarget(pc);
67 return true;
68 }
69
70 if (isIndirectCtrl()) {
71 tgt = branchTarget(xc);
71 tgt = branchTarget(tc);
72 return true;
73 }
74
75 return false;
76}
77
72 return true;
73 }
74
75 return false;
76}
77