1// Copyright (c) AMD 2// All rights reserved. 3// 4// Authors: Marc Orr 5 6// Monitor Instruction 7 8output header {{ --- 33 unchanged lines hidden (view full) --- 42 exec_output = BasicExecute.subst(iop) 43}}; 44 45 46// Mwait instruction 47 48// Declarations for execute() methods. 49def template MwaitExecDeclare {{ |
50 Fault execute(ExecContext *, Trace::InstRecord *) const; 51 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const; 52 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const; |
53}}; 54 55def template MwaitDeclare {{ 56 class %(class_name)s : public %(base_class)s 57 { 58 public: 59 // Constructor. 60 %(class_name)s(ExtMachInst machInst); 61 %(MwaitExecDeclare)s 62 }; 63}}; 64 65def template MwaitInitiateAcc {{ |
66 Fault %(class_name)s::initiateAcc(ExecContext * xc, |
67 Trace::InstRecord * traceData) const 68 { 69 unsigned s = 0x8; //size 70 unsigned f = 0; //flags 71 initiateMemRead(xc, traceData, xc->getAddrMonitor()->vAddr, s, f); 72 return NoFault; 73 } 74}}; 75 76def template MwaitCompleteAcc {{ |
77 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc, |
78 Trace::InstRecord *traceData) const 79 { 80 MicroHalt hltObj(machInst, mnemonic, 0x0); 81 if(xc->mwait(pkt)) { 82 hltObj.execute(xc, traceData); 83 } 84 return NoFault; 85 } --- 44 unchanged lines hidden --- |