mem.isa (12110:c24ee249b8ba) mem.isa (12234:78ece221f9f5)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010, 2012, 2014, 2016 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

--- 28 unchanged lines hidden (view full) ---

37// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40//
41// Authors: Stephen Hines
42
43
44def template PanicExecute {{
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010, 2012, 2014, 2016 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

--- 28 unchanged lines hidden (view full) ---

37// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40//
41// Authors: Stephen Hines
42
43
44def template PanicExecute {{
45 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
45 Fault %(class_name)s::execute(ExecContext *xc,
46 Trace::InstRecord *traceData) const
47 {
48 panic("Execute function executed when it shouldn't be!\n");
49 return NoFault;
50 }
51}};
52
53def template PanicInitiateAcc {{
46 Trace::InstRecord *traceData) const
47 {
48 panic("Execute function executed when it shouldn't be!\n");
49 return NoFault;
50 }
51}};
52
53def template PanicInitiateAcc {{
54 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT *xc,
54 Fault %(class_name)s::initiateAcc(ExecContext *xc,
55 Trace::InstRecord *traceData) const
56 {
57 panic("InitiateAcc function executed when it shouldn't be!\n");
58 return NoFault;
59 }
60}};
61
62def template PanicCompleteAcc {{
55 Trace::InstRecord *traceData) const
56 {
57 panic("InitiateAcc function executed when it shouldn't be!\n");
58 return NoFault;
59 }
60}};
61
62def template PanicCompleteAcc {{
63 Fault %(class_name)s::completeAcc(PacketPtr pkt,
64 CPU_EXEC_CONTEXT *xc,
63 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
65 Trace::InstRecord *traceData) const
66 {
67 panic("CompleteAcc function executed when it shouldn't be!\n");
68 return NoFault;
69 }
70}};
71
72
73def template SwapExecute {{
64 Trace::InstRecord *traceData) const
65 {
66 panic("CompleteAcc function executed when it shouldn't be!\n");
67 return NoFault;
68 }
69}};
70
71
72def template SwapExecute {{
74 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
73 Fault %(class_name)s::execute(ExecContext *xc,
75 Trace::InstRecord *traceData) const
76 {
77 Addr EA;
78 Fault fault = NoFault;
79
80 %(op_decl)s;
81 uint64_t memData = 0;
82 %(op_rd)s;

--- 19 unchanged lines hidden (view full) ---

102 xc->setPredicate(false);
103 }
104
105 return fault;
106 }
107}};
108
109def template SwapInitiateAcc {{
74 Trace::InstRecord *traceData) const
75 {
76 Addr EA;
77 Fault fault = NoFault;
78
79 %(op_decl)s;
80 uint64_t memData = 0;
81 %(op_rd)s;

--- 19 unchanged lines hidden (view full) ---

101 xc->setPredicate(false);
102 }
103
104 return fault;
105 }
106}};
107
108def template SwapInitiateAcc {{
110 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT *xc,
109 Fault %(class_name)s::initiateAcc(ExecContext *xc,
111 Trace::InstRecord *traceData) const
112 {
113 Addr EA;
114 Fault fault = NoFault;
115
116 %(op_decl)s;
117 uint64_t memData = 0;
118 %(op_rd)s;

--- 11 unchanged lines hidden (view full) ---

130 xc->setPredicate(false);
131 }
132
133 return fault;
134 }
135}};
136
137def template SwapCompleteAcc {{
110 Trace::InstRecord *traceData) const
111 {
112 Addr EA;
113 Fault fault = NoFault;
114
115 %(op_decl)s;
116 uint64_t memData = 0;
117 %(op_rd)s;

--- 11 unchanged lines hidden (view full) ---

129 xc->setPredicate(false);
130 }
131
132 return fault;
133 }
134}};
135
136def template SwapCompleteAcc {{
138 Fault %(class_name)s::completeAcc(PacketPtr pkt,
139 CPU_EXEC_CONTEXT *xc,
137 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
140 Trace::InstRecord *traceData) const
141 {
142 Fault fault = NoFault;
143
144 %(op_decl)s;
145 %(op_rd)s;
146
147 if (%(predicate_test)s)

--- 9 unchanged lines hidden (view full) ---

157 }
158 }
159
160 return fault;
161 }
162}};
163
164def template LoadExecute {{
138 Trace::InstRecord *traceData) const
139 {
140 Fault fault = NoFault;
141
142 %(op_decl)s;
143 %(op_rd)s;
144
145 if (%(predicate_test)s)

--- 9 unchanged lines hidden (view full) ---

155 }
156 }
157
158 return fault;
159 }
160}};
161
162def template LoadExecute {{
165 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
163 Fault %(class_name)s::execute(ExecContext *xc,
166 Trace::InstRecord *traceData) const
167 {
168 Addr EA;
169 Fault fault = NoFault;
170
171 %(op_decl)s;
172 %(op_rd)s;
173 %(ea_code)s;

--- 14 unchanged lines hidden (view full) ---

188
189 return fault;
190 }
191}};
192
193def template NeonLoadExecute {{
194 template <class Element>
195 Fault %(class_name)s<Element>::execute(
164 Trace::InstRecord *traceData) const
165 {
166 Addr EA;
167 Fault fault = NoFault;
168
169 %(op_decl)s;
170 %(op_rd)s;
171 %(ea_code)s;

--- 14 unchanged lines hidden (view full) ---

186
187 return fault;
188 }
189}};
190
191def template NeonLoadExecute {{
192 template <class Element>
193 Fault %(class_name)s<Element>::execute(
196 CPU_EXEC_CONTEXT *xc, Trace::InstRecord *traceData) const
194 ExecContext *xc, Trace::InstRecord *traceData) const
197 {
198 Addr EA;
199 Fault fault = NoFault;
200
201 %(op_decl)s;
202 %(mem_decl)s;
203 %(op_rd)s;
204 %(ea_code)s;

--- 15 unchanged lines hidden (view full) ---

220 xc->setPredicate(false);
221 }
222
223 return fault;
224 }
225}};
226
227def template StoreExecute {{
195 {
196 Addr EA;
197 Fault fault = NoFault;
198
199 %(op_decl)s;
200 %(mem_decl)s;
201 %(op_rd)s;
202 %(ea_code)s;

--- 15 unchanged lines hidden (view full) ---

218 xc->setPredicate(false);
219 }
220
221 return fault;
222 }
223}};
224
225def template StoreExecute {{
228 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
226 Fault %(class_name)s::execute(ExecContext *xc,
229 Trace::InstRecord *traceData) const
230 {
231 Addr EA;
232 Fault fault = NoFault;
233
234 %(op_decl)s;
235 %(op_rd)s;
236 %(ea_code)s;

--- 18 unchanged lines hidden (view full) ---

255
256 return fault;
257 }
258}};
259
260def template NeonStoreExecute {{
261 template <class Element>
262 Fault %(class_name)s<Element>::execute(
227 Trace::InstRecord *traceData) const
228 {
229 Addr EA;
230 Fault fault = NoFault;
231
232 %(op_decl)s;
233 %(op_rd)s;
234 %(ea_code)s;

--- 18 unchanged lines hidden (view full) ---

253
254 return fault;
255 }
256}};
257
258def template NeonStoreExecute {{
259 template <class Element>
260 Fault %(class_name)s<Element>::execute(
263 CPU_EXEC_CONTEXT *xc, Trace::InstRecord *traceData) const
261 ExecContext *xc, Trace::InstRecord *traceData) const
264 {
265 Addr EA;
266 Fault fault = NoFault;
267
268 %(op_decl)s;
269 %(mem_decl)s;
270 %(op_rd)s;
271 %(ea_code)s;

--- 19 unchanged lines hidden (view full) ---

291 xc->setPredicate(false);
292 }
293
294 return fault;
295 }
296}};
297
298def template StoreExExecute {{
262 {
263 Addr EA;
264 Fault fault = NoFault;
265
266 %(op_decl)s;
267 %(mem_decl)s;
268 %(op_rd)s;
269 %(ea_code)s;

--- 19 unchanged lines hidden (view full) ---

289 xc->setPredicate(false);
290 }
291
292 return fault;
293 }
294}};
295
296def template StoreExExecute {{
299 Fault %(class_name)s::execute(CPU_EXEC_CONTEXT *xc,
297 Fault %(class_name)s::execute(ExecContext *xc,
300 Trace::InstRecord *traceData) const
301 {
302 Addr EA;
303 Fault fault = NoFault;
304
305 %(op_decl)s;
306 %(op_rd)s;
307 %(ea_code)s;

--- 22 unchanged lines hidden (view full) ---

330 xc->setPredicate(false);
331 }
332
333 return fault;
334 }
335}};
336
337def template StoreExInitiateAcc {{
298 Trace::InstRecord *traceData) const
299 {
300 Addr EA;
301 Fault fault = NoFault;
302
303 %(op_decl)s;
304 %(op_rd)s;
305 %(ea_code)s;

--- 22 unchanged lines hidden (view full) ---

328 xc->setPredicate(false);
329 }
330
331 return fault;
332 }
333}};
334
335def template StoreExInitiateAcc {{
338 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT *xc,
336 Fault %(class_name)s::initiateAcc(ExecContext *xc,
339 Trace::InstRecord *traceData) const
340 {
341 Addr EA;
342 Fault fault = NoFault;
343
344 %(op_decl)s;
345 %(op_rd)s;
346 %(ea_code)s;

--- 12 unchanged lines hidden (view full) ---

359 xc->setPredicate(false);
360 }
361
362 return fault;
363 }
364}};
365
366def template StoreInitiateAcc {{
337 Trace::InstRecord *traceData) const
338 {
339 Addr EA;
340 Fault fault = NoFault;
341
342 %(op_decl)s;
343 %(op_rd)s;
344 %(ea_code)s;

--- 12 unchanged lines hidden (view full) ---

357 xc->setPredicate(false);
358 }
359
360 return fault;
361 }
362}};
363
364def template StoreInitiateAcc {{
367 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT *xc,
365 Fault %(class_name)s::initiateAcc(ExecContext *xc,
368 Trace::InstRecord *traceData) const
369 {
370 Addr EA;
371 Fault fault = NoFault;
372
373 %(op_decl)s;
374 %(op_rd)s;
375 %(ea_code)s;

--- 14 unchanged lines hidden (view full) ---

390
391 return fault;
392 }
393}};
394
395def template NeonStoreInitiateAcc {{
396 template <class Element>
397 Fault %(class_name)s<Element>::initiateAcc(
366 Trace::InstRecord *traceData) const
367 {
368 Addr EA;
369 Fault fault = NoFault;
370
371 %(op_decl)s;
372 %(op_rd)s;
373 %(ea_code)s;

--- 14 unchanged lines hidden (view full) ---

388
389 return fault;
390 }
391}};
392
393def template NeonStoreInitiateAcc {{
394 template <class Element>
395 Fault %(class_name)s<Element>::initiateAcc(
398 CPU_EXEC_CONTEXT *xc, Trace::InstRecord *traceData) const
396 ExecContext *xc, Trace::InstRecord *traceData) const
399 {
400 Addr EA;
401 Fault fault = NoFault;
402
403 %(op_decl)s;
404 %(mem_decl)s;
405 %(op_rd)s;
406 %(ea_code)s;

--- 13 unchanged lines hidden (view full) ---

420 xc->setPredicate(false);
421 }
422
423 return fault;
424 }
425}};
426
427def template LoadInitiateAcc {{
397 {
398 Addr EA;
399 Fault fault = NoFault;
400
401 %(op_decl)s;
402 %(mem_decl)s;
403 %(op_rd)s;
404 %(ea_code)s;

--- 13 unchanged lines hidden (view full) ---

418 xc->setPredicate(false);
419 }
420
421 return fault;
422 }
423}};
424
425def template LoadInitiateAcc {{
428 Fault %(class_name)s::initiateAcc(CPU_EXEC_CONTEXT *xc,
426 Fault %(class_name)s::initiateAcc(ExecContext *xc,
429 Trace::InstRecord *traceData) const
430 {
431 Addr EA;
432 Fault fault = NoFault;
433
434 %(op_src_decl)s;
435 %(op_rd)s;
436 %(ea_code)s;

--- 10 unchanged lines hidden (view full) ---

447
448 return fault;
449 }
450}};
451
452def template NeonLoadInitiateAcc {{
453 template <class Element>
454 Fault %(class_name)s<Element>::initiateAcc(
427 Trace::InstRecord *traceData) const
428 {
429 Addr EA;
430 Fault fault = NoFault;
431
432 %(op_src_decl)s;
433 %(op_rd)s;
434 %(ea_code)s;

--- 10 unchanged lines hidden (view full) ---

445
446 return fault;
447 }
448}};
449
450def template NeonLoadInitiateAcc {{
451 template <class Element>
452 Fault %(class_name)s<Element>::initiateAcc(
455 CPU_EXEC_CONTEXT *xc, Trace::InstRecord *traceData) const
453 ExecContext *xc, Trace::InstRecord *traceData) const
456 {
457 Addr EA;
458 Fault fault = NoFault;
459
460 %(op_decl)s;
461 %(mem_decl)s;
462 %(op_rd)s;
463 %(ea_code)s;

--- 7 unchanged lines hidden (view full) ---

471 xc->setPredicate(false);
472 }
473
474 return fault;
475 }
476}};
477
478def template LoadCompleteAcc {{
454 {
455 Addr EA;
456 Fault fault = NoFault;
457
458 %(op_decl)s;
459 %(mem_decl)s;
460 %(op_rd)s;
461 %(ea_code)s;

--- 7 unchanged lines hidden (view full) ---

469 xc->setPredicate(false);
470 }
471
472 return fault;
473 }
474}};
475
476def template LoadCompleteAcc {{
479 Fault %(class_name)s::completeAcc(PacketPtr pkt,
480 CPU_EXEC_CONTEXT *xc,
477 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
481 Trace::InstRecord *traceData) const
482 {
483 Fault fault = NoFault;
484
485 %(op_decl)s;
486 %(op_rd)s;
487
488 if (%(predicate_test)s)

--- 12 unchanged lines hidden (view full) ---

501
502 return fault;
503 }
504}};
505
506def template NeonLoadCompleteAcc {{
507 template <class Element>
508 Fault %(class_name)s<Element>::completeAcc(
478 Trace::InstRecord *traceData) const
479 {
480 Fault fault = NoFault;
481
482 %(op_decl)s;
483 %(op_rd)s;
484
485 if (%(predicate_test)s)

--- 12 unchanged lines hidden (view full) ---

498
499 return fault;
500 }
501}};
502
503def template NeonLoadCompleteAcc {{
504 template <class Element>
505 Fault %(class_name)s<Element>::completeAcc(
509 PacketPtr pkt, CPU_EXEC_CONTEXT *xc,
506 PacketPtr pkt, ExecContext *xc,
510 Trace::InstRecord *traceData) const
511 {
512 Fault fault = NoFault;
513
514 %(mem_decl)s;
515 %(op_decl)s;
516 %(op_rd)s;
517

--- 11 unchanged lines hidden (view full) ---

529 }
530 }
531
532 return fault;
533 }
534}};
535
536def template StoreCompleteAcc {{
507 Trace::InstRecord *traceData) const
508 {
509 Fault fault = NoFault;
510
511 %(mem_decl)s;
512 %(op_decl)s;
513 %(op_rd)s;
514

--- 11 unchanged lines hidden (view full) ---

526 }
527 }
528
529 return fault;
530 }
531}};
532
533def template StoreCompleteAcc {{
537 Fault %(class_name)s::completeAcc(PacketPtr pkt,
538 CPU_EXEC_CONTEXT *xc,
534 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
539 Trace::InstRecord *traceData) const
540 {
541 return NoFault;
542 }
543}};
544
545def template NeonStoreCompleteAcc {{
546 template <class Element>
547 Fault %(class_name)s<Element>::completeAcc(
535 Trace::InstRecord *traceData) const
536 {
537 return NoFault;
538 }
539}};
540
541def template NeonStoreCompleteAcc {{
542 template <class Element>
543 Fault %(class_name)s<Element>::completeAcc(
548 PacketPtr pkt, CPU_EXEC_CONTEXT *xc,
549 Trace::InstRecord *traceData) const
544 PacketPtr pkt, ExecContext *xc, Trace::InstRecord *traceData) const
550 {
551 return NoFault;
552 }
553}};
554
555def template StoreExCompleteAcc {{
545 {
546 return NoFault;
547 }
548}};
549
550def template StoreExCompleteAcc {{
556 Fault %(class_name)s::completeAcc(PacketPtr pkt,
557 CPU_EXEC_CONTEXT *xc,
551 Fault %(class_name)s::completeAcc(PacketPtr pkt, ExecContext *xc,
558 Trace::InstRecord *traceData) const
559 {
560 Fault fault = NoFault;
561
562 %(op_decl)s;
563 %(op_rd)s;
564
565 if (%(predicate_test)s)

--- 279 unchanged lines hidden (view full) ---

845 virtual void
846 annotateFault(ArmFault *fault) {
847 %(fa_code)s
848 }
849 };
850}};
851
852def template InitiateAccDeclare {{
552 Trace::InstRecord *traceData) const
553 {
554 Fault fault = NoFault;
555
556 %(op_decl)s;
557 %(op_rd)s;
558
559 if (%(predicate_test)s)

--- 279 unchanged lines hidden (view full) ---

839 virtual void
840 annotateFault(ArmFault *fault) {
841 %(fa_code)s
842 }
843 };
844}};
845
846def template InitiateAccDeclare {{
853 Fault initiateAcc(%(CPU_exec_context)s *, Trace::InstRecord *) const;
847 Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
854}};
855
856def template CompleteAccDeclare {{
848}};
849
850def template CompleteAccDeclare {{
857 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, Trace::InstRecord *) const;
851 Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
858}};
859
860def template RfeConstructor {{
861 %(class_name)s::%(class_name)s(ExtMachInst machInst,
862 uint32_t _base, int _mode, bool _wb)
863 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
864 (IntRegIndex)_base, (AddrMode)_mode, _wb)
865 {

--- 399 unchanged lines hidden ---
852}};
853
854def template RfeConstructor {{
855 %(class_name)s::%(class_name)s(ExtMachInst machInst,
856 uint32_t _base, int _mode, bool _wb)
857 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
858 (IntRegIndex)_base, (AddrMode)_mode, _wb)
859 {

--- 399 unchanged lines hidden ---