1// -*- mode:c++ -*- 2 3// Copyright (c) 2007 MIPS Technologies, Inc. 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 50 unchanged lines hidden (view full) --- 59 MipsStaticInst(mnem, _machInst, __opClass) 60 { 61 } 62 }; 63}}; 64 65// Dsp instruction class execute method template. 66def template DspExecute {{ |
67 Fault %(class_name)s::execute( 68 ExecContext *xc, Trace::InstRecord *traceData) const |
69 { 70 Fault fault = NoFault; 71 72 %(op_decl)s; 73 74 if (isDspPresent(xc)) 75 { 76 if (isDspEnabled(xc)) --- 16 unchanged lines hidden (view full) --- 93 %(op_wb)s; 94 } 95 return fault; 96 } 97}}; 98 99// DspHiLo instruction class execute method template. 100def template DspHiLoExecute {{ |
101 Fault %(class_name)s::execute( 102 ExecContext *xc, Trace::InstRecord *traceData) const |
103 { 104 Fault fault = NoFault; 105 106 %(op_decl)s; 107 108 if (isDspPresent(xc)) 109 { 110 if (isDspEnabled(xc)) --- 22 unchanged lines hidden (view full) --- 133 //traceData->setData(hilo_final_val); 134 } 135 } 136 return fault; 137 } 138}}; 139 140output header {{ |
141 bool isDspEnabled(ExecContext *xc); |
142 |
143 bool isDspPresent(ExecContext *xc); |
144}}; 145 146//Outputs to decoder.cc 147output decoder {{ 148}}; 149 150output exec {{ 151 bool |
152 isDspEnabled(ExecContext *xc) |
153 { 154 return !FullSystem || bits(xc->readMiscReg(MISCREG_STATUS), 24); 155 } 156}}; 157 158output exec {{ 159 bool |
160 isDspPresent(ExecContext *xc) |
161 { 162 return !FullSystem || bits(xc->readMiscReg(MISCREG_CONFIG3), 10); 163 } 164}}; 165 166// add code to fetch the DSPControl register 167// and write it back after execution, giving 168// the instruction the opportunity to modify --- 53 unchanged lines hidden --- |