1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2016 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 107 unchanged lines hidden (view full) --- 116 %(InitiateAccDeclare)s 117 118 %(CompleteAccDeclare)s 119 }; 120}}; 121 122def template EACompDeclare {{ 123 Fault |
124 eaComp(ExecContext *, Trace::InstRecord *) const; |
125}}; 126 127def template InitiateAccDeclare {{ 128 Fault |
129 initiateAcc(ExecContext *, Trace::InstRecord *) const; |
130}}; 131 132 133def template CompleteAccDeclare {{ 134 Fault |
135 completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const; |
136}}; 137 138def template LoadStoreConstructor {{ 139 %(class_name)s::%(class_name)s(ExtMachInst machInst): 140 %(base_class)s("%(mnemonic)s", machInst, %(op_class)s) 141 { 142 %(constructor)s; 143 %(offset_code)s; 144 } 145}}; 146 147def template EACompExecute {{ 148 Fault |
149 %(class_name)s::eaComp(ExecContext *xc, Trace::InstRecord *traceData) const |
150 { 151 Addr EA; 152 Fault fault = NoFault; 153 154 %(op_decl)s; 155 %(op_rd)s; 156 %(ea_code)s; 157 --- 37 unchanged lines hidden (view full) --- 195 fullExecTemplate.subst(iop) + 196 EACompExecute.subst(iop) + 197 initiateAccTemplate.subst(iop) + 198 completeAccTemplate.subst(iop)) 199}}; 200 201def template LoadExecute {{ 202 Fault |
203 %(class_name)s::execute( 204 ExecContext *xc, Trace::InstRecord *traceData) const |
205 { 206 Addr EA; 207 Fault fault = NoFault; 208 209 %(op_decl)s; 210 %(op_rd)s; 211 %(ea_code)s; 212 --- 7 unchanged lines hidden (view full) --- 220 } 221 222 return fault; 223 } 224}}; 225 226def template LoadInitiateAcc {{ 227 Fault |
228 %(class_name)s::initiateAcc(ExecContext *xc, |
229 Trace::InstRecord *traceData) const 230 { 231 Addr EA; 232 Fault fault = NoFault; 233 234 %(op_src_decl)s; 235 %(op_rd)s; 236 %(ea_code)s; 237 238 if (fault == NoFault) { 239 fault = initiateMemRead(xc, traceData, EA, Mem, memAccessFlags); 240 } 241 242 return fault; 243 } 244}}; 245 246def template LoadCompleteAcc {{ 247 Fault |
248 %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc, |
249 Trace::InstRecord *traceData) const 250 { 251 Fault fault = NoFault; 252 253 %(op_decl)s; 254 %(op_rd)s; 255 256 getMem(pkt, Mem, traceData); --- 7 unchanged lines hidden (view full) --- 264 } 265 266 return fault; 267 } 268}}; 269 270def template StoreExecute {{ 271 Fault |
272 %(class_name)s::execute(ExecContext *xc, |
273 Trace::InstRecord *traceData) const 274 { 275 Addr EA; 276 Fault fault = NoFault; 277 278 %(op_decl)s; 279 %(op_rd)s; 280 %(ea_code)s; --- 16 unchanged lines hidden (view full) --- 297 } 298 299 return fault; 300 } 301}}; 302 303def template StoreInitiateAcc {{ 304 Fault |
305 %(class_name)s::initiateAcc(ExecContext *xc, |
306 Trace::InstRecord *traceData) const 307 { 308 Addr EA; 309 Fault fault = NoFault; 310 311 %(op_decl)s; 312 %(op_rd)s; 313 %(ea_code)s; --- 12 unchanged lines hidden (view full) --- 326 } 327 328 return fault; 329 } 330}}; 331 332def template StoreCompleteAcc {{ 333 Fault |
334 %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc, |
335 Trace::InstRecord *traceData) const 336 { 337 return NoFault; 338 } 339}}; 340 341def format Load(memacc_code, ea_code = {{EA = Rs1 + ldisp;}}, mem_flags=[], 342 inst_flags=[]) {{ --- 21 unchanged lines hidden --- |