monitor_mwait.isa (11303:f694764d656d) | monitor_mwait.isa (12234:78ece221f9f5) |
---|---|
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 {{ | 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(%(CPU_exec_context)s *, Trace::InstRecord *) const; 51 Fault initiateAcc(%(CPU_exec_context)s *, Trace::InstRecord *) const; 52 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, 53 Trace::InstRecord *) const; | 50 Fault execute(ExecContext *, Trace::InstRecord *) const; 51 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const; 52 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const; |
54}}; 55 56def template MwaitDeclare {{ 57 class %(class_name)s : public %(base_class)s 58 { 59 public: 60 // Constructor. 61 %(class_name)s(ExtMachInst machInst); 62 %(MwaitExecDeclare)s 63 }; 64}}; 65 66def template MwaitInitiateAcc {{ | 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 {{ |
67 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT * xc, | 66 Fault %(class_name)s::initiateAcc(ExecContext * xc, |
68 Trace::InstRecord * traceData) const 69 { 70 unsigned s = 0x8; //size 71 unsigned f = 0; //flags 72 initiateMemRead(xc, traceData, xc->getAddrMonitor()->vAddr, s, f); 73 return NoFault; 74 } 75}}; 76 77def template MwaitCompleteAcc {{ | 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 {{ |
78 Fault %(class_name)s::completeAcc(PacketPtr pkt, CPU_EXEC_CONTEXT *xc, | 77 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc, |
79 Trace::InstRecord *traceData) const 80 { 81 MicroHalt hltObj(machInst, mnemonic, 0x0); 82 if(xc->mwait(pkt)) { 83 hltObj.execute(xc, traceData); 84 } 85 return NoFault; 86 } --- 44 unchanged lines hidden --- | 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 --- |