Some new functions and forward declarations are necessary to make things work
# Template for execute() signature.
exec_sig_template = '''
# Template for execute() signature.
exec_sig_template = '''
-virtual Fault execute(%s *xc, Trace::InstRecord *traceData) const = 0;
-virtual Fault initiateAcc(%s *xc, Trace::InstRecord *traceData) const
+virtual Fault execute(%(type)s *xc, Trace::InstRecord *traceData) const = 0;
+virtual Fault initiateAcc(%(type)s *xc, Trace::InstRecord *traceData) const
{ panic("initiateAcc not defined!"); M5_DUMMY_RETURN };
{ panic("initiateAcc not defined!"); M5_DUMMY_RETURN };
-virtual Fault completeAcc(Packet *pkt, %s *xc,
+virtual Fault completeAcc(Packet *pkt, %(type)s *xc,
Trace::InstRecord *traceData) const
{ panic("completeAcc not defined!"); M5_DUMMY_RETURN };
Trace::InstRecord *traceData) const
{ panic("completeAcc not defined!"); M5_DUMMY_RETURN };
+virtual int memAccSize(%(type)s *xc)
+{ panic("memAccSize not defined!"); M5_DUMMY_RETURN };
'''
mem_ini_sig_template = '''
'''
mem_ini_sig_template = '''
'''
for cpu in temp_cpu_list:
xc_type = CpuModel.dict[cpu].strings['CPU_exec_context']
'''
for cpu in temp_cpu_list:
xc_type = CpuModel.dict[cpu].strings['CPU_exec_context']
- print >> f, exec_sig_template % (xc_type, xc_type, xc_type)
+ print >> f, exec_sig_template % { 'type' : xc_type }
print >> f, '''
#endif // __CPU_STATIC_INST_EXEC_SIGS_HH__
'''
print >> f, '''
#endif // __CPU_STATIC_INST_EXEC_SIGS_HH__
'''
*/
void restore(unsigned top_entry_idx, const Addr &restored_target);
*/
void restore(unsigned top_entry_idx, const Addr &restored_target);
+ bool empty() { return usedEntries == 0; }
+
+ bool full() { return usedEntries == numEntries; }
private:
/** Increments the top of stack index. */
inline void incrTos()
private:
/** Increments the top of stack index. */
inline void incrTos()
class O3CPUImpl;
template <class Impl> class BaseO3DynInst;
typedef BaseO3DynInst<O3CPUImpl> O3DynInst;
class O3CPUImpl;
template <class Impl> class BaseO3DynInst;
typedef BaseO3DynInst<O3CPUImpl> O3DynInst;
-
-template <class Impl>
-class OzoneDynInst;
+template <class Impl> class OzoneDynInst;
+class InOrderDynInst;
class CheckerCPU;
class FastCPU;
class CheckerCPU;
class FastCPU;
*/
bool hasBranchTarget(Addr pc, ThreadContext *tc, Addr &tgt) const;
*/
bool hasBranchTarget(Addr pc, ThreadContext *tc, Addr &tgt) const;
+ virtual Request::Flags memAccFlags()
+ {
+ panic("StaticInst::memAccFlags called on non-memory instruction");
+ return 0;
+ };
+
/**
* Return string representation of disassembled instruction.
* The default version of this function will call the internal
/**
* Return string representation of disassembled instruction.
* The default version of this function will call the internal