gem5 v23.0.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
misc.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, 2012-2013, 2017-2018, 2021 Arm Limited
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
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
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license
11 * terms below provided that you ensure that this notice is replicated
12 * unmodified and in its entirety in all distributions of the software,
13 * modified or unmodified, in source code or in binary form.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions are
17 * met: redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer;
19 * redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution;
22 * neither the name of the copyright holders nor the names of its
23 * contributors may be used to endorse or promote products derived from
24 * this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */
38
40#include "arch/arm/tlbi_op.hh"
41
42#include "cpu/reg_class.hh"
43
44namespace gem5
45{
46
47using namespace ArmISA;
48
49std::string
51{
52 std::stringstream ss;
55 ss << ", ";
56 bool foundPsr = false;
57 for (unsigned i = 0; i < numSrcRegs(); i++) {
58 const RegId& reg = srcRegIdx(i);
59 if (!reg.is(MiscRegClass)) {
60 continue;
61 }
62 if (reg.index() == MISCREG_CPSR) {
63 ss << "cpsr";
64 foundPsr = true;
65 break;
66 }
67 if (reg.index() == MISCREG_SPSR) {
68 ss << "spsr";
69 foundPsr = true;
70 break;
71 }
72 }
73 if (!foundPsr) {
74 ss << "????";
75 }
76 return ss.str();
77}
78
79void
80MsrBase::printMsrBase(std::ostream &os) const
81{
83 bool apsr = false;
84 bool foundPsr = false;
85 for (unsigned i = 0; i < numDestRegs(); i++) {
86 const RegId& reg = destRegIdx(i);
87 if (!reg.is(MiscRegClass)) {
88 continue;
89 }
90 if (reg.index() == MISCREG_CPSR) {
91 os << "cpsr_";
92 foundPsr = true;
93 break;
94 }
95 if (reg.index() == MISCREG_SPSR) {
96 if (bits(byteMask, 1, 0)) {
97 os << "spsr_";
98 } else {
99 os << "apsr_";
100 apsr = true;
101 }
102 foundPsr = true;
103 break;
104 }
105 }
106 if (!foundPsr) {
107 os << "????";
108 return;
109 }
110 if (bits(byteMask, 3)) {
111 if (apsr) {
112 os << "nzcvq";
113 } else {
114 os << "f";
115 }
116 }
117 if (bits(byteMask, 2)) {
118 if (apsr) {
119 os << "g";
120 } else {
121 os << "s";
122 }
123 }
124 if (bits(byteMask, 1)) {
125 os << "x";
126 }
127 if (bits(byteMask, 0)) {
128 os << "c";
129 }
130}
131
132std::string
134{
135 std::stringstream ss;
137 ccprintf(ss, ", #%#x", imm);
138 return ss.str();
139}
140
141std::string
143{
144 std::stringstream ss;
146 ss << ", ";
148 return ss.str();
149}
150
151std::string
153{
154 std::stringstream ss;
157 ss << ", ";
159 ss << ", ";
161 return ss.str();
162}
163
164std::string
166{
167 std::stringstream ss;
170 ss << ", ";
172 ss << ", ";
174 return ss.str();
175}
176
177std::string
179{
180 std::stringstream ss;
182 ccprintf(ss, "#%d", imm);
183 return ss.str();
184}
185
186std::string
188{
189 std::stringstream ss;
192 ccprintf(ss, ", #%d", imm);
193 return ss.str();
194}
195
196std::string
198{
199 std::stringstream ss;
202 ss << ", ";
204 return ss.str();
205}
206
207std::string
209{
210 std::stringstream ss;
213 return ss.str();
214}
215
216std::string
218 Addr pc, const loader::SymbolTable *symtab) const
219{
220 std::stringstream ss;
223 ss << ", ";
225 ss << ", ";
227 ccprintf(ss, ", #%d", imm);
228 return ss.str();
229}
230
231std::string
233 Addr pc, const loader::SymbolTable *symtab) const
234{
235 std::stringstream ss;
238 ss << ", ";
240 ss << ", ";
242 ss << ", ";
244 return ss.str();
245}
246
247std::string
249 Addr pc, const loader::SymbolTable *symtab) const
250{
251 std::stringstream ss;
254 ss << ", ";
256 ss << ", ";
258 return ss.str();
259}
260
261std::string
263 Addr pc, const loader::SymbolTable *symtab) const
264{
265 std::stringstream ss;
268 ss << ", ";
270 ccprintf(ss, ", #%d", imm);
271 return ss.str();
272}
273
274std::string
276 Addr pc, const loader::SymbolTable *symtab) const
277{
278 std::stringstream ss;
281 ss << ", ";
283 return ss.str();
284}
285
286std::string
288 Addr pc, const loader::SymbolTable *symtab) const
289{
290 std::stringstream ss;
293 ss << ", ";
295 return ss.str();
296}
297
298std::string
300 Addr pc, const loader::SymbolTable *symtab) const
301{
302 std::stringstream ss;
305 ccprintf(ss, ", #%d, #%d", imm1, imm2);
306 return ss.str();
307}
308
309std::string
311 Addr pc, const loader::SymbolTable *symtab) const
312{
313 std::stringstream ss;
316 ss << ", ";
318 ccprintf(ss, ", #%d, #%d", imm1, imm2);
319 return ss.str();
320}
321
322std::string
324 Addr pc, const loader::SymbolTable *symtab) const
325{
326 std::stringstream ss;
329 ccprintf(ss, ", #%d, ", imm);
331 return ss.str();
332}
333
334std::string
336 Addr pc, const loader::SymbolTable *symtab) const
337{
338 std::stringstream ss;
341 ccprintf(ss, ", #%d, ", imm);
344 return ss.str();
345}
346
347std::string
349 Addr pc, const loader::SymbolTable *symtab) const
350{
351 return csprintf("%-10s (inst %#08x)", "unknown", encoding());
352}
353
354McrMrcMiscInst::McrMrcMiscInst(const char *_mnemonic, ExtMachInst _machInst,
355 uint64_t _iss, MiscRegIndex _miscReg)
356 : ArmStaticInst(_mnemonic, _machInst, No_OpClass)
357{
358 flags[IsNonSpeculative] = true;
359 iss = _iss;
360 miscReg = _miscReg;
361}
362
363Fault
365{
366 return mcrMrc15Trap(miscReg, machInst, xc->tcBase(), iss);
367}
368
369std::string
371 Addr pc, const loader::SymbolTable *symtab) const
372{
373 return csprintf("%-10s (pipe flush)", mnemonic);
374}
375
377 ExtMachInst _machInst, uint64_t _iss,
378 MiscRegIndex _miscReg)
379 : McrMrcMiscInst(_mnemonic, _machInst, _iss, _miscReg)
380{}
381
382Fault
384{
385 Fault fault = mcrMrc15Trap(miscReg, machInst, xc->tcBase(), iss);
386 if (fault != NoFault) {
387 return fault;
388 } else {
389 return std::make_shared<UndefinedInstruction>(machInst, false,
390 mnemonic);
391 }
392}
393
394std::string
396 Addr pc, const loader::SymbolTable *symtab) const
397{
398 return csprintf("%-10s (implementation defined)", mnemonic);
399}
400
401void
403{
404 ThreadContext* tc = xc->tcBase();
405 auto isa = static_cast<ArmISA::ISA *>(tc->getIsaPtr());
406 auto release = isa->getRelease();
407
408 switch (dest_idx) {
409 case MISCREG_TLBIALL: // TLBI all entries, EL0&1,
410 {
411 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
412
413 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
414 TLBIALL tlbiOp(EL1, secure);
415 tlbiOp(tc);
416 return;
417 }
418 // TLB Invalidate All, Inner Shareable
420 {
421 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
422
423 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
424 TLBIALL tlbiOp(EL1, secure);
425 tlbiOp.broadcast(tc);
426 return;
427 }
428 // Instruction TLB Invalidate All
429 case MISCREG_ITLBIALL:
430 {
431 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
432
433 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
434 ITLBIALL tlbiOp(EL1, secure);
435 tlbiOp(tc);
436 return;
437 }
438 // Data TLB Invalidate All
439 case MISCREG_DTLBIALL:
440 {
441 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
442
443 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
444 DTLBIALL tlbiOp(EL1, secure);
445 tlbiOp(tc);
446 return;
447 }
448 // TLB Invalidate by VA
449 case MISCREG_TLBIMVA:
450 {
451 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
452
453 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
454 TLBIMVA tlbiOp(EL1,
455 secure,
456 mbits(value, 31, 12),
457 bits(value, 7, 0),
458 false);
459
460 tlbiOp(tc);
461 return;
462 }
463 // TLB Invalidate by VA, Last Level
464 case MISCREG_TLBIMVAL:
465 {
466 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
467
468 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
469 TLBIMVA tlbiOp(EL1,
470 secure,
471 mbits(value, 31, 12),
472 bits(value, 7, 0),
473 true);
474
475 tlbiOp(tc);
476 return;
477 }
478 // TLB Invalidate by VA, Inner Shareable
480 {
481 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
482
483 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
484 TLBIMVA tlbiOp(EL1,
485 secure,
486 mbits(value, 31, 12),
487 bits(value, 7, 0),
488 false);
489
490 tlbiOp.broadcast(tc);
491 return;
492 }
493 // TLB Invalidate by VA, Last Level, Inner Shareable
495 {
496 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
497
498 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
499 TLBIMVA tlbiOp(EL1,
500 secure,
501 mbits(value, 31, 12),
502 bits(value, 7, 0),
503 true);
504
505 tlbiOp.broadcast(tc);
506 return;
507 }
508 // TLB Invalidate by ASID match
509 case MISCREG_TLBIASID:
510 {
511 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
512
513 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
514 TLBIASID tlbiOp(EL1,
515 secure,
516 bits(value, 7, 0));
517
518 tlbiOp(tc);
519 return;
520 }
521 // TLB Invalidate by ASID match, Inner Shareable
523 {
524 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
525
526 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
527 TLBIASID tlbiOp(EL1,
528 secure,
529 bits(value, 7, 0));
530
531 tlbiOp.broadcast(tc);
532 return;
533 }
534 // TLB Invalidate by VA, All ASID
535 case MISCREG_TLBIMVAA:
536 {
537 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
538
539 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
540 TLBIMVAA tlbiOp(EL1, secure,
541 mbits(value, 31, 12), false);
542
543 tlbiOp(tc);
544 return;
545 }
546 // TLB Invalidate by VA, Last Level, All ASID
548 {
549 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
550
551 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
552 TLBIMVAA tlbiOp(EL1, secure,
553 mbits(value, 31, 12), true);
554
555 tlbiOp(tc);
556 return;
557 }
558 // TLB Invalidate by VA, All ASID, Inner Shareable
560 {
561 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
562
563 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
564 TLBIMVAA tlbiOp(EL1, secure,
565 mbits(value, 31, 12), false);
566
567 tlbiOp.broadcast(tc);
568 return;
569 }
570 // TLB Invalidate by VA, All ASID, Last Level, Inner Shareable
572 {
573 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
574
575 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
576 TLBIMVAA tlbiOp(EL1, secure,
577 mbits(value, 31, 12), true);
578
579 tlbiOp.broadcast(tc);
580 return;
581 }
582 // TLB Invalidate by VA, Hyp mode
583 case MISCREG_TLBIMVAH:
584 {
585 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
586
587 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
588 TLBIMVAA tlbiOp(EL2, secure,
589 mbits(value, 31, 12), false);
590
591 tlbiOp(tc);
592 return;
593 }
594 // TLB Invalidate by VA, Last Level, Hyp mode
596 {
597 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
598
599 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
600 TLBIMVAA tlbiOp(EL2, secure,
601 mbits(value, 31, 12), true);
602
603 tlbiOp(tc);
604 return;
605 }
606 // TLB Invalidate by VA, Hyp mode, Inner Shareable
608 {
609 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
610
611 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
612 TLBIMVAA tlbiOp(EL2, secure,
613 mbits(value, 31, 12), false);
614
615 tlbiOp.broadcast(tc);
616 return;
617 }
618 // TLB Invalidate by VA, Hyp mode, Last Level, Inner Shareable
620 {
621 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
622
623 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
624 TLBIMVAA tlbiOp(EL2, secure,
625 mbits(value, 31, 12), true);
626
627 tlbiOp.broadcast(tc);
628 return;
629 }
630 // TLB Invalidate by Intermediate Physical Address, Stage 2
632 {
633 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
634
635 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
636 TLBIIPA tlbiOp(EL1,
637 secure,
638 static_cast<Addr>(bits(value, 35, 0)) << 12,
639 false);
640
641 tlbiOp(tc);
642 return;
643 }
644 // TLB Invalidate by Intermediate Physical Address, Stage 2,
645 // Last Level
647 {
648 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
649
650 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
651 TLBIIPA tlbiOp(EL1,
652 secure,
653 static_cast<Addr>(bits(value, 35, 0)) << 12,
654 true);
655
656 tlbiOp(tc);
657 return;
658 }
659 // TLB Invalidate by Intermediate Physical Address, Stage 2,
660 // Inner Shareable
662 {
663 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
664
665 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
666 TLBIIPA tlbiOp(EL1,
667 secure,
668 static_cast<Addr>(bits(value, 35, 0)) << 12,
669 false);
670
671 tlbiOp.broadcast(tc);
672 return;
673 }
674 // TLB Invalidate by Intermediate Physical Address, Stage 2,
675 // Last Level, Inner Shareable
677 {
678 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
679
680 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
681 TLBIIPA tlbiOp(EL1,
682 secure,
683 static_cast<Addr>(bits(value, 35, 0)) << 12,
684 true);
685
686 tlbiOp.broadcast(tc);
687 return;
688 }
689 // Instruction TLB Invalidate by VA
690 case MISCREG_ITLBIMVA:
691 {
692 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
693
694 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
695 ITLBIMVA tlbiOp(EL1,
696 secure,
697 mbits(value, 31, 12),
698 bits(value, 7, 0));
699
700 tlbiOp(tc);
701 return;
702 }
703 // Data TLB Invalidate by VA
704 case MISCREG_DTLBIMVA:
705 {
706 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
707
708 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
709 DTLBIMVA tlbiOp(EL1,
710 secure,
711 mbits(value, 31, 12),
712 bits(value, 7, 0));
713
714 tlbiOp(tc);
715 return;
716 }
717 // Instruction TLB Invalidate by ASID match
719 {
720 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
721
722 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
723 ITLBIASID tlbiOp(EL1,
724 secure,
725 bits(value, 7, 0));
726
727 tlbiOp(tc);
728 return;
729 }
730 // Data TLB Invalidate by ASID match
732 {
733 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
734
735 bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
736 DTLBIASID tlbiOp(EL1,
737 secure,
738 bits(value, 7, 0));
739
740 tlbiOp(tc);
741 return;
742 }
743 // TLB Invalidate All, Non-Secure Non-Hyp
745 {
746 TLBIALLN tlbiOp(EL1);
747 tlbiOp(tc);
748 return;
749 }
750 // TLB Invalidate All, Non-Secure Non-Hyp, Inner Shareable
752 {
753 TLBIALLN tlbiOp(EL1);
754 tlbiOp.broadcast(tc);
755 return;
756 }
757 // TLB Invalidate All, Hyp mode
758 case MISCREG_TLBIALLH:
759 {
760 TLBIALLN tlbiOp(EL2);
761 tlbiOp(tc);
762 return;
763 }
764 // TLB Invalidate All, Hyp mode, Inner Shareable
766 {
767 TLBIALLN tlbiOp(EL2);
768 tlbiOp.broadcast(tc);
769 return;
770 }
771 default:
772 panic("Unrecognized TLBIOp\n");
773 }
774}
775
776} // namespace gem5
void printMiscReg(std::ostream &os, RegIndex reg_idx) const
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
void printIntReg(std::ostream &os, RegIndex reg_idx, uint8_t opWidth=0) const
Print a register name for disassembly given the unique dependence tag number (FP or int).
void printShiftOperand(std::ostream &os, RegIndex rm, bool immShift, uint32_t shiftAmt, RegIndex rs, ArmShiftType type) const
Data TLB Invalidate All.
Definition tlbi_op.hh:156
Data TLB Invalidate by ASID match.
Definition tlbi_op.hh:262
Data TLB Invalidate by VA.
Definition tlbi_op.hh:357
const ArmRelease * getRelease() const
Definition isa.hh:192
Instruction TLB Invalidate All.
Definition tlbi_op.hh:141
Instruction TLB Invalidate by ASID match.
Definition tlbi_op.hh:247
Instruction TLB Invalidate by VA.
Definition tlbi_op.hh:341
TLB Invalidate All, Non-Secure.
Definition tlbi_op.hh:277
TLB Invalidate All.
Definition tlbi_op.hh:109
TLB Invalidate by ASID match.
Definition tlbi_op.hh:229
TLB Invalidate by Intermediate Physical Address.
Definition tlbi_op.hh:373
TLB Invalidate by VA, All ASID.
Definition tlbi_op.hh:302
TLB Invalidate by VA.
Definition tlbi_op.hh:321
void broadcast(ThreadContext *tc)
Broadcast the TLB Invalidate operation to all TLBs in the Arm system.
Definition tlbi_op.hh:73
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
virtual ThreadContext * tcBase() const =0
Returns a pointer to the ThreadContext.
uint64_t imm
Definition misc.hh:142
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:178
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:395
McrMrcImplDefined(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
Definition misc.cc:376
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition misc.cc:383
Certain mrc/mcr instructions act as nops or flush the pipe based on what register the instruction is ...
Definition misc.hh:407
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition misc.cc:364
McrMrcMiscInst(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
Definition misc.cc:354
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:370
ArmISA::MiscRegIndex miscReg
Definition misc.hh:410
RegIndex op2
Definition misc.hh:124
RegIndex op1
Definition misc.hh:123
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:165
ArmISA::MiscRegIndex dest
Definition misc.hh:125
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:275
ArmISA::MiscRegIndex dest
Definition misc.hh:295
RegIndex dest2
Definition misc.hh:106
RegIndex dest
Definition misc.hh:105
ArmISA::MiscRegIndex op1
Definition misc.hh:104
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:152
RegIndex dest
Definition misc.hh:49
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:50
uint8_t byteMask
Definition misc.hh:63
void printMsrBase(std::ostream &os) const
Definition misc.cc:80
uint32_t imm
Definition misc.hh:76
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:133
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:142
RegIndex op1
Definition misc.hh:90
Register ID: describe an architectural register with its class and index.
Definition reg_class.hh:93
uint64_t imm2
Definition misc.hh:333
uint64_t imm1
Definition misc.hh:332
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:299
RegIndex dest
Definition misc.hh:331
uint64_t imm
Definition misc.hh:157
RegIndex dest
Definition misc.hh:156
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:187
RegIndex dest
Definition misc.hh:201
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:323
uint64_t imm
Definition misc.hh:202
RegIndex op1
Definition misc.hh:203
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:335
ArmISA::ArmShiftType shiftType
Definition misc.hh:372
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:287
ArmISA::MiscRegIndex op1
Definition misc.hh:314
RegIndex dest
Definition misc.hh:187
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:208
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:310
RegIndex op1
Definition misc.hh:278
uint64_t imm
Definition misc.hh:279
RegIndex dest
Definition misc.hh:277
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:262
RegIndex op1
Definition misc.hh:172
RegIndex dest
Definition misc.hh:171
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:197
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:217
RegIndex op1
Definition misc.hh:260
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:248
RegIndex dest
Definition misc.hh:259
RegIndex op2
Definition misc.hh:261
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:232
uint8_t numSrcRegs() const
Number of source registers.
uint8_t numDestRegs() const
Number of destination registers.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
const char * mnemonic
Base mnemonic (e.g., "add").
std::bitset< Num_Flags > flags
Flag values for this instruction.
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual BaseISA * getIsaPtr() const =0
void performTlbi(ExecContext *xc, ArmISA::MiscRegIndex dest_idx, RegVal value) const
Definition misc.cc:402
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc.cc:348
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition bitfield.hh:76
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
Definition bitfield.hh:103
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
constexpr RegId Zero
Definition int.hh:228
Fault mcrMrc15Trap(const MiscRegIndex misc_reg, ExtMachInst mach_inst, ThreadContext *tc, uint32_t imm)
Definition utility.cc:495
Bitfield< 7 > i
Definition misc_types.hh:67
@ MISCREG_TLBIMVALIS
Definition misc.hh:330
@ MISCREG_TLBIMVAALIS
Definition misc.hh:331
@ MISCREG_TLBIMVAAL
Definition misc.hh:343
@ MISCREG_TLBIIPAS2
Definition misc.hh:350
@ MISCREG_TLBIIPAS2L
Definition misc.hh:351
@ MISCREG_SCR_EL3
Definition misc.hh:599
@ MISCREG_TLBIALLHIS
Definition misc.hh:346
@ MISCREG_TLBIIPAS2LIS
Definition misc.hh:345
@ MISCREG_TLBIASIDIS
Definition misc.hh:328
@ MISCREG_DTLBIMVA
Definition misc.hh:336
@ MISCREG_TLBIMVALH
Definition misc.hh:355
@ MISCREG_TLBIMVA
Definition misc.hh:339
@ MISCREG_TLBIMVAL
Definition misc.hh:342
@ MISCREG_ITLBIALL
Definition misc.hh:332
@ MISCREG_TLBIALLNSNH
Definition misc.hh:354
@ MISCREG_CPSR
Definition misc.hh:66
@ MISCREG_TLBIIPAS2IS
Definition misc.hh:344
@ MISCREG_TLBIMVAAIS
Definition misc.hh:329
@ MISCREG_TLBIMVAHIS
Definition misc.hh:347
@ MISCREG_DTLBIALL
Definition misc.hh:335
@ MISCREG_TLBIALLIS
Definition misc.hh:326
@ MISCREG_TLBIASID
Definition misc.hh:340
@ MISCREG_ITLBIMVA
Definition misc.hh:333
@ MISCREG_TLBIALLNSNHIS
Definition misc.hh:348
@ MISCREG_TLBIMVALHIS
Definition misc.hh:349
@ MISCREG_ITLBIASID
Definition misc.hh:334
@ MISCREG_TLBIMVAIS
Definition misc.hh:327
@ MISCREG_TLBIALLH
Definition misc.hh:352
@ MISCREG_TLBIMVAH
Definition misc.hh:353
@ MISCREG_DTLBIASID
Definition misc.hh:337
@ MISCREG_TLBIALL
Definition misc.hh:338
@ MISCREG_TLBIMVAA
Definition misc.hh:341
@ MISCREG_SPSR
Definition misc.hh:67
Bitfield< 27, 25 > encoding
Definition types.hh:90
Bitfield< 21 > ss
Definition misc_types.hh:60
Bitfield< 4 > pc
Bitfield< 5, 3 > reg
Definition types.hh:92
Bitfield< 17 > os
Definition misc.hh:810
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t RegVal
Definition types.hh:173
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
constexpr decltype(nullptr) NoFault
Definition types.hh:253
@ MiscRegClass
Control (misc) register.
Definition reg_class.hh:69
void ccprintf(cp::Print &print)
Definition cprintf.hh:130
The file contains the definition of a set of TLB Invalidate Instructions.

Generated on Mon Jul 10 2023 15:31:58 for gem5 by doxygen 1.9.7