1// -*- mode:c++ -*- 2 3// Copyright (c) 2006 The Regents of The University of Michigan 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 --- 152 unchanged lines hidden (view full) --- 161}}; 162 163 164def template CompleteAccDeclare {{ 165 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, Trace::InstRecord *) const; 166}}; 167 168 |
169def template EACompConstructor {{ |
170 /** TODO: change op_class to AddrGenOp or something (requires 171 * creating new member of OpClass enum in op_class.hh, updating 172 * config files, etc.). */ 173 inline %(class_name)s::EAComp::EAComp(MachInst machInst) 174 : %(base_class)s("%(mnemonic)s (EAComp)", machInst, IntAluOp) 175 { |
176 %(constructor)s; |
177 } |
178}}; |
179 |
180 181def template MemAccConstructor {{ |
182 inline %(class_name)s::MemAcc::MemAcc(MachInst machInst) 183 : %(base_class)s("%(mnemonic)s (MemAcc)", machInst, %(op_class)s) 184 { |
185 %(constructor)s; |
186 } |
187}}; |
188 |
189 190def template LoadStoreConstructor {{ |
191 inline %(class_name)s::%(class_name)s(MachInst machInst) 192 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 193 new EAComp(machInst), new MemAcc(machInst)) 194 { 195 %(constructor)s; 196 } 197}}; 198 --- 4 unchanged lines hidden (view full) --- 203 Trace::InstRecord *traceData) const 204 { 205 Addr EA; 206 Fault fault = NoFault; 207 208 %(fp_enable_check)s; 209 %(op_decl)s; 210 %(op_rd)s; |
211 %(ea_code)s; |
212 213 if (fault == NoFault) { 214 %(op_wb)s; 215 xc->setEA(EA); 216 } 217 218 return fault; 219 } --- 9 unchanged lines hidden (view full) --- 229 230 %(fp_enable_check)s; 231 %(op_decl)s; 232 %(op_rd)s; 233 EA = xc->getEA(); 234 235 if (fault == NoFault) { 236 fault = xc->read(EA, (uint%(mem_acc_size)d_t&)Mem, memAccessFlags); |
237 %(memacc_code)s; |
238 } 239 240 if (fault == NoFault) { 241 %(op_wb)s; 242 } 243 244 return fault; 245 } --- 82 unchanged lines hidden (view full) --- 328 uint64_t write_result = 0; 329 330 %(fp_enable_check)s; 331 %(op_decl)s; 332 %(op_rd)s; 333 EA = xc->getEA(); 334 335 if (fault == NoFault) { |
336 %(memacc_code)s; |
337 } 338 339 if (fault == NoFault) { 340 fault = xc->write((uint%(mem_acc_size)d_t&)Mem, EA, 341 memAccessFlags, &write_result); 342 if (traceData) { traceData->setData(Mem); } 343 } 344 --- 127 unchanged lines hidden (view full) --- 472 Fault fault = NoFault; 473 474 %(fp_enable_check)s; 475 %(op_decl)s; 476 %(op_rd)s; 477 EA = xc->getEA(); 478 479 if (fault == NoFault) { |
480 %(memacc_code)s; |
481 } 482 483 return NoFault; 484 } 485}}; 486 487def template MiscExecute {{ 488 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, --- 122 unchanged lines hidden --- |