Deleted Added
sdiff udiff text old ( 6192:6cd5f0282d8a ) new ( 7720:65d338a8dba4 )
full compact
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;

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

63 hist[count]++;
64 }
65 for (int i = 0; i <= max_hist; ++i) {
66 cerr << "\tbuckets of size " << i << " = " << hist[i] << endl;
67 }
68}
69
70bool
71StaticInst::hasBranchTarget(Addr pc, ThreadContext *tc, Addr &tgt) const
72{
73 if (isDirectCtrl()) {
74 tgt = branchTarget(pc);
75 return true;
76 }
77
78 if (isIndirectCtrl()) {
79 tgt = branchTarget(tc);
80 return true;
81 }
82
83 return false;
84}
85
86StaticInstPtr
87StaticInst::fetchMicroop(MicroPC micropc)
88{
89 panic("StaticInst::fetchMicroop() called on instruction "
90 "that is not microcoded.");
91}
92
93Addr
94StaticInst::branchTarget(Addr branchPC) const
95{
96 panic("StaticInst::branchTarget() called on instruction "
97 "that is not a PC-relative branch.");
98 M5_DUMMY_RETURN;
99}
100
101Addr
102StaticInst::branchTarget(ThreadContext *tc) const
103{
104 panic("StaticInst::branchTarget() called on instruction "
105 "that is not an indirect branch.");
106 M5_DUMMY_RETURN;
107}
108
109const string &
110StaticInst::disassemble(Addr pc, const SymbolTable *symtab) const
111{
112 if (!cachedDisassembly)
113 cachedDisassembly = new string(generateDisassembly(pc, symtab));
114
115 return *cachedDisassembly;
116}