gem5 v24.0.0.0
Loading...
Searching...
No Matches
vector.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 PLCT Lab
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#ifndef __ARCH_RISCV_INSTS_VECTOR_HH__
30#define __ARCH_RISCV_INSTS_VECTOR_HH__
31
32#include <string>
33
34#include "arch/riscv/faults.hh"
36#include "arch/riscv/isa.hh"
38#include "arch/riscv/utility.hh"
39#include "cpu/exec_context.hh"
40#include "cpu/static_inst.hh"
41
42namespace gem5
43{
44
45namespace RiscvISA
46{
47
48float
49getVflmul(uint32_t vlmul_encoding);
50
51inline uint32_t
52getSew(uint32_t vsew)
53{
54 assert(vsew <= 3);
55 return (8 << vsew);
56}
57
58uint32_t
59getVlmax(VTYPE vtype, uint32_t vlen);
60
65{
66 protected:
67 uint64_t bit30;
68 uint64_t bit31;
69 uint64_t zimm10;
70 uint64_t zimm11;
71 uint64_t uimm;
72 uint32_t elen;
73 VConfOp(const char *mnem, ExtMachInst _extMachInst,
74 uint32_t _elen, OpClass __opClass)
75 : RiscvStaticInst(mnem, _extMachInst, __opClass),
76 bit30(_extMachInst.bit30), bit31(_extMachInst.bit31),
77 zimm10(_extMachInst.zimm_vsetivli),
78 zimm11(_extMachInst.zimm_vsetvli),
79 uimm(_extMachInst.uimm_vsetivli),
80 elen(_elen)
81 {
82 this->flags[IsVector] = true;
83 }
84
85 std::string generateDisassembly(
86 Addr pc, const loader::SymbolTable *symtab) const override;
87
88 std::string generateZimmDisassembly() const;
89};
90
91inline uint8_t checked_vtype(bool vill, uint8_t vtype) {
92 panic_if(vill, "vill has been set");
93 const uint8_t vsew = bits(vtype, 5, 3);
94 panic_if(vsew >= 0b100, "vsew: %#x not supported", vsew);
95 const uint8_t vlmul = bits(vtype, 2, 0);
96 panic_if(vlmul == 0b100, "vlmul: %#x not supported", vlmul);
97 return vtype;
98}
99
101{
102 protected:
103 uint32_t vl;
104 uint8_t vtype;
105 VectorNonSplitInst(const char* mnem, ExtMachInst _machInst,
106 OpClass __opClass)
107 : RiscvStaticInst(mnem, _machInst, __opClass),
108 vl(_machInst.vl),
109 vtype(_machInst.vtype8)
110 {
111 this->flags[IsVector] = true;
112 }
113
114 std::string generateDisassembly(
115 Addr pc, const loader::SymbolTable *symtab) const override;
116};
117
119{
120 protected:
121 uint32_t vl;
122 uint8_t vtype;
123 uint32_t vlen;
124
125 VectorMacroInst(const char* mnem, ExtMachInst _machInst,
126 OpClass __opClass, uint32_t _vlen = 256)
127 : RiscvMacroInst(mnem, _machInst, __opClass),
128 vl(_machInst.vl),
129 vtype(_machInst.vtype8),
130 vlen(_vlen)
131 {
132 this->flags[IsVector] = true;
133 }
134};
135
137{
138protected:
139 uint32_t vlen;
140 uint32_t microVl;
141 uint32_t microIdx;
142 uint8_t vtype;
143 VectorMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
144 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen = 256)
145 : RiscvMicroInst(mnem, _machInst, __opClass),
146 vlen(_vlen),
147 microVl(_microVl),
148 microIdx(_microIdx),
149 vtype(_machInst.vtype8)
150 {
151 this->flags[IsVector] = true;
152 }
153};
154
156{
157public:
159 : RiscvMicroInst("vnop", _machInst, No_OpClass)
160 {}
161
163 const override
164 {
165 return NoFault;
166 }
167
168 std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab)
169 const override
170 {
171 std::stringstream ss;
172 ss << mnemonic;
173 return ss.str();
174 }
175};
176
178{
179protected:
180 VectorArithMicroInst(const char *mnem, ExtMachInst _machInst,
181 OpClass __opClass, uint32_t _microVl,
182 uint32_t _microIdx)
183 : VectorMicroInst(mnem, _machInst, __opClass, _microVl, _microIdx)
184 {}
185
186 std::string generateDisassembly(
187 Addr pc, const loader::SymbolTable *symtab) const override;
188};
189
191{
192 protected:
193 VectorArithMacroInst(const char* mnem, ExtMachInst _machInst,
194 OpClass __opClass, uint32_t _vlen = 256)
195 : VectorMacroInst(mnem, _machInst, __opClass, _vlen)
196 {
197 this->flags[IsVector] = true;
198 }
199 std::string generateDisassembly(
200 Addr pc, const loader::SymbolTable *symtab) const override;
201};
202
204{
205protected:
206 VectorVMUNARY0MicroInst(const char *mnem, ExtMachInst _machInst,
207 OpClass __opClass, uint32_t _microVl,
208 uint32_t _microIdx)
209 : VectorMicroInst(mnem, _machInst, __opClass, _microVl, _microIdx)
210 {}
211
212 std::string generateDisassembly(
213 Addr pc, const loader::SymbolTable *symtab) const override;
214};
215
217{
218 protected:
219 VectorVMUNARY0MacroInst(const char* mnem, ExtMachInst _machInst,
220 OpClass __opClass, uint32_t _vlen)
221 : VectorMacroInst(mnem, _machInst, __opClass, _vlen)
222 {
223 this->flags[IsVector] = true;
224 }
225
226 std::string generateDisassembly(
227 Addr pc, const loader::SymbolTable *symtab) const override;
228};
229
231{
232 protected:
233 VectorSlideMacroInst(const char* mnem, ExtMachInst _machInst,
234 OpClass __opClass, uint32_t _vlen = 256)
235 : VectorMacroInst(mnem, _machInst, __opClass, _vlen)
236 {
237 this->flags[IsVector] = true;
238 }
239
240 std::string generateDisassembly(
241 Addr pc, const loader::SymbolTable *symtab) const override;
242};
243
245{
246 protected:
247 uint32_t vdIdx;
248 uint32_t vs2Idx;
249 VectorSlideMicroInst(const char *mnem, ExtMachInst _machInst,
250 OpClass __opClass, uint32_t _microVl,
251 uint32_t _microIdx, uint32_t _vdIdx, uint32_t _vs2Idx)
252 : VectorMicroInst(mnem, _machInst, __opClass, _microVl, _microIdx)
253 , vdIdx(_vdIdx), vs2Idx(_vs2Idx)
254 {}
255
256 std::string generateDisassembly(
257 Addr pc, const loader::SymbolTable *symtab) const override;
258};
259
261{
262 protected:
263 uint32_t offset; // Used to calculate EA.
265
266 VectorMemMicroInst(const char* mnem, ExtMachInst _machInst,
267 OpClass __opClass, uint32_t _microVl,
268 uint32_t _microIdx, uint32_t _offset)
269 : VectorMicroInst(mnem, _machInst, __opClass, _microVl, _microIdx)
270 , offset(_offset)
271 , memAccessFlags(0)
272 {}
273};
274
276{
277 protected:
278 VectorMemMacroInst(const char* mnem, ExtMachInst _machInst,
279 OpClass __opClass, uint32_t _vlen = 256)
280 : VectorMacroInst(mnem, _machInst, __opClass, _vlen)
281 {}
282};
283
285{
286 protected:
287 VleMacroInst(const char* mnem, ExtMachInst _machInst,
288 OpClass __opClass, uint32_t _vlen)
289 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
290 {}
291
292 std::string generateDisassembly(
293 Addr pc, const loader::SymbolTable *symtab) const override;
294};
295
297{
298 protected:
299 VseMacroInst(const char* mnem, ExtMachInst _machInst,
300 OpClass __opClass, uint32_t _vlen)
301 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
302 {}
303
304 std::string generateDisassembly(
305 Addr pc, const loader::SymbolTable *symtab) const override;
306};
307
309{
310 public:
311 mutable bool trimVl;
312 mutable uint32_t faultIdx;
313
314 protected:
316
317 VleMicroInst(const char *mnem, ExtMachInst _machInst,OpClass __opClass,
318 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
319 : VectorMicroInst(mnem, _machInst, __opClass, _microVl,
320 _microIdx, _vlen)
321 , trimVl(false), faultIdx(_microVl)
322 {
323 this->flags[IsLoad] = true;
324 }
325
326 std::string generateDisassembly(
327 Addr pc, const loader::SymbolTable *symtab) const override;
328};
329
331{
332 protected:
334
335 VseMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
336 uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
337 : VectorMicroInst(mnem, _machInst, __opClass, _microVl,
338 _microIdx, _vlen)
339 {
340 this->flags[IsStore] = true;
341 }
342
343 std::string generateDisassembly(
344 Addr pc, const loader::SymbolTable *symtab) const override;
345};
346
348{
349 protected:
350 VlWholeMacroInst(const char *mnem, ExtMachInst _machInst,
351 OpClass __opClass, uint32_t _vlen)
352 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
353 {}
354
355 std::string generateDisassembly(
356 Addr pc, const loader::SymbolTable *symtab) const override;
357};
358
360{
361 protected:
363
364 VlWholeMicroInst(const char *mnem, ExtMachInst _machInst,
365 OpClass __opClass, uint32_t _microVl, uint32_t _microIdx,
366 uint32_t _vlen)
367 : VectorMicroInst(mnem, _machInst, __opClass, _microVl,
368 _microIdx, _vlen)
369 {}
370
371 std::string generateDisassembly(
372 Addr pc, const loader::SymbolTable *symtab) const override;
373};
374
376{
377 protected:
378 VsWholeMacroInst(const char *mnem, ExtMachInst _machInst,
379 OpClass __opClass, uint32_t _vlen)
380 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
381 {}
382
383 std::string generateDisassembly(
384 Addr pc, const loader::SymbolTable *symtab) const override;
385};
386
388{
389 protected:
391
392 VsWholeMicroInst(const char *mnem, ExtMachInst _machInst,
393 OpClass __opClass, uint32_t _microVl,
394 uint32_t _microIdx, uint32_t _vlen)
395 : VectorMicroInst(mnem, _machInst, __opClass , _microVl,
396 _microIdx, _vlen)
397 {}
398
399 std::string generateDisassembly(
400 Addr pc, const loader::SymbolTable *symtab) const override;
401};
402
404{
405 protected:
406 VlStrideMacroInst(const char* mnem, ExtMachInst _machInst,
407 OpClass __opClass, uint32_t _vlen)
408 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
409 {}
410
411 std::string generateDisassembly(
412 Addr pc, const loader::SymbolTable *symtab) const override;
413};
414
416{
417 protected:
418 uint32_t regIdx;
419 VlStrideMicroInst(const char *mnem, ExtMachInst _machInst,
420 OpClass __opClass, uint32_t _regIdx,
421 uint32_t _microIdx, uint32_t _microVl)
422 : VectorMemMicroInst(mnem, _machInst, __opClass, _microVl,
423 _microIdx, 0)
424 , regIdx(_regIdx)
425 {}
426
427 std::string generateDisassembly(
428 Addr pc, const loader::SymbolTable *symtab) const override;
429};
430
432{
433 protected:
434 VsStrideMacroInst(const char* mnem, ExtMachInst _machInst,
435 OpClass __opClass, uint32_t _vlen)
436 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
437 {}
438
439 std::string generateDisassembly(
440 Addr pc, const loader::SymbolTable *symtab) const override;
441};
442
444{
445 protected:
446 uint32_t regIdx;
447 VsStrideMicroInst(const char *mnem, ExtMachInst _machInst,
448 OpClass __opClass, uint32_t _regIdx,
449 uint32_t _microIdx, uint32_t _microVl)
450 : VectorMemMicroInst(mnem, _machInst, __opClass, _microVl,
451 _microIdx, 0)
452 , regIdx(_regIdx)
453 {}
454
455 std::string generateDisassembly(
456 Addr pc, const loader::SymbolTable *symtab) const override;
457};
458
460{
461 protected:
462 VlIndexMacroInst(const char* mnem, ExtMachInst _machInst,
463 OpClass __opClass, uint32_t _vlen)
464 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
465 {}
466
467 std::string generateDisassembly(
468 Addr pc, const loader::SymbolTable *symtab) const override;
469};
470
472{
473 protected:
474 uint32_t vdRegIdx;
475 uint32_t vdElemIdx;
476 uint32_t vs2RegIdx;
477 uint32_t vs2ElemIdx;
478 VlIndexMicroInst(const char *mnem, ExtMachInst _machInst,
479 OpClass __opClass, uint32_t _vdRegIdx, uint32_t _vdElemIdx,
480 uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
481 : VectorMemMicroInst(mnem, _machInst, __opClass, 1,
482 0, 0)
483 , vdRegIdx(_vdRegIdx), vdElemIdx(_vdElemIdx)
484 , vs2RegIdx(_vs2RegIdx), vs2ElemIdx(_vs2ElemIdx)
485 {}
486
487 std::string generateDisassembly(
488 Addr pc, const loader::SymbolTable *symtab) const override;
489};
490
492{
493 protected:
494 VsIndexMacroInst(const char* mnem, ExtMachInst _machInst,
495 OpClass __opClass, uint32_t _vlen)
496 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
497 {}
498
499 std::string generateDisassembly(
500 Addr pc, const loader::SymbolTable *symtab) const override;
501};
502
504{
505 protected:
506 uint32_t vs3RegIdx;
507 uint32_t vs3ElemIdx;
508 uint32_t vs2RegIdx;
509 uint32_t vs2ElemIdx;
510 VsIndexMicroInst(const char *mnem, ExtMachInst _machInst,
511 OpClass __opClass, uint32_t _vs3RegIdx,
512 uint32_t _vs3ElemIdx, uint32_t _vs2RegIdx,
513 uint32_t _vs2ElemIdx)
514 : VectorMemMicroInst(mnem, _machInst, __opClass, 1, 0, 0),
515 vs3RegIdx(_vs3RegIdx), vs3ElemIdx(_vs3ElemIdx),
516 vs2RegIdx(_vs2RegIdx), vs2ElemIdx(_vs2ElemIdx)
517 {}
518
519 std::string generateDisassembly(
520 Addr pc, const loader::SymbolTable *symtab) const override;
521};
522
524{
525 protected:
526 VMvWholeMacroInst(const char* mnem, ExtMachInst _machInst,
527 OpClass __opClass)
528 : VectorArithMacroInst(mnem, _machInst, __opClass)
529 {}
530
531 std::string generateDisassembly(
532 Addr pc, const loader::SymbolTable *symtab) const override;
533};
534
536{
537 protected:
538 VMvWholeMicroInst(const char *mnem, ExtMachInst _machInst,
539 OpClass __opClass, uint32_t _microVl,
540 uint32_t _microIdx)
541 : VectorArithMicroInst(mnem, _machInst, __opClass, _microVl, _microIdx)
542 {}
543
544 std::string generateDisassembly(
545 Addr pc, const loader::SymbolTable *symtab) const override;
546};
547
548
550{
551 private:
554
555 public:
556 uint32_t vlen;
557 size_t elemSize;
559 uint8_t _dstReg, uint8_t _numSrcs, uint32_t _vlen, size_t _elemSize);
560 Fault execute(ExecContext *, trace::InstRecord *) const override;
561 std::string generateDisassembly(Addr,
562 const loader::SymbolTable *) const override;
563};
564
566{
567 private:
568 bool* vxsat;
569 public:
570 VxsatMicroInst(bool* Vxsat, ExtMachInst extMachInst)
571 : VectorArithMicroInst("vxsat_micro", extMachInst,
572 SimdMiscOp, 0, 0)
573 {
574 vxsat = Vxsat;
575 }
576 Fault execute(ExecContext *, trace::InstRecord *) const override;
577 std::string generateDisassembly(Addr, const loader::SymbolTable *)
578 const override;
579};
580
582{
583 private:
587
588 public:
589 VlFFTrimVlMicroOp(ExtMachInst _machInst, uint32_t _microVl,
590 uint32_t _microIdx, uint32_t _vlen,
591 std::vector<StaticInstPtr>& _microops);
592 uint32_t calcVl() const;
593 Fault execute(ExecContext *, trace::InstRecord *) const override;
594 std::unique_ptr<PCStateBase> branchTarget(ThreadContext *) const override;
595 std::string generateDisassembly(Addr, const loader::SymbolTable *)
596 const override;
597};
598
600{
601 protected:
602 VlSegMacroInst(const char* mnem, ExtMachInst _machInst,
603 OpClass __opClass, uint32_t _vlen)
604 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
605 {}
606
607 std::string generateDisassembly(
608 Addr pc, const loader::SymbolTable *symtab) const override;
609};
610
612{
613 protected:
615 uint8_t regIdx;
616
617 VlSegMicroInst(const char *mnem, ExtMachInst _machInst,
618 OpClass __opClass, uint32_t _microVl,
619 uint32_t _microIdx, uint32_t _numMicroops,
620 uint32_t _field, uint32_t _numFields,
621 uint32_t _vlen)
622 : VectorMicroInst(mnem, _machInst, __opClass, _microVl,
623 _microIdx, _vlen)
624 {
625 this->flags[IsLoad] = true;
626 }
627
628 std::string generateDisassembly(
629 Addr pc, const loader::SymbolTable *symtab) const override;
630};
631
633{
634 private:
637 uint32_t numSrcs;
638 uint32_t numMicroops;
639 uint32_t field;
641 uint32_t micro_vl;
642
643 public:
644 uint32_t vlen;
645
646 VlSegDeIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl,
647 uint32_t _dstReg, uint32_t _numSrcs,
648 uint32_t _microIdx, uint32_t _numMicroops,
649 uint32_t _field, uint32_t _vlen,
650 uint32_t _sizeOfElement);
651
652 Fault execute(ExecContext *, trace::InstRecord *) const override;
653
654 std::string generateDisassembly(Addr,
655 const loader::SymbolTable *) const override;
656};
657
659{
660 protected:
661 VsSegMacroInst(const char* mnem, ExtMachInst _machInst,
662 OpClass __opClass, uint32_t _vlen)
663 : VectorMemMacroInst(mnem, _machInst, __opClass, _vlen)
664 {}
665
666 std::string generateDisassembly(
667 Addr pc, const loader::SymbolTable *symtab) const override;
668};
669
671{
672 protected:
674 uint8_t regIdx;
675
676 VsSegMicroInst(const char *mnem, ExtMachInst _machInst,
677 OpClass __opClass, uint32_t _microVl,
678 uint32_t _microIdx, uint32_t _numMicroops,
679 uint32_t _field, uint32_t _numFields,
680 uint32_t _vlen)
681 : VectorMicroInst(mnem, _machInst, __opClass, _microVl,
682 _microIdx, _vlen)
683 {
684 this->flags[IsStore] = true;
685 }
686
687 std::string generateDisassembly(
688 Addr pc, const loader::SymbolTable *symtab) const override;
689};
690
692{
693 private:
696 uint32_t numSrcs;
697 uint32_t numMicroops;
698 uint32_t field;
700 uint32_t micro_vl;
701
702 public:
703 uint32_t vlen;
704
705 VsSegIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl,
706 uint32_t _dstReg, uint32_t _numSrcs,
707 uint32_t _microIdx, uint32_t _numMicroops,
708 uint32_t _field, uint32_t _vlen,
709 uint32_t _sizeOfElement);
710
711 Fault execute(ExecContext *, trace::InstRecord *) const override;
712
713 std::string generateDisassembly(Addr,
714 const loader::SymbolTable *) const override;
715};
716
717} // namespace RiscvISA
718} // namespace gem5
719
720
721#endif // __ARCH_RISCV_INSTS_VECTOR_HH__
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Register ID: describe an architectural register with its class and index.
Definition reg_class.hh:94
Base class for all RISC-V Macroops.
Base class for all RISC-V Microops.
Base class for all RISC-V static instructions.
Base class for Vector Config operations.
Definition vector.hh:65
VConfOp(const char *mnem, ExtMachInst _extMachInst, uint32_t _elen, OpClass __opClass)
Definition vector.hh:73
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:79
std::string generateZimmDisassembly() const
Definition vector.cc:94
VMaskMergeMicroInst(ExtMachInst extMachInst, uint8_t _dstReg, uint8_t _numSrcs, uint32_t _vlen, size_t _elemSize)
Definition vector.cc:414
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Definition vector.cc:474
Fault execute(ExecContext *, trace::InstRecord *) const override
Definition vector.cc:438
RegId srcRegIdxArr[NumVecInternalRegs]
Definition vector.hh:552
VMvWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Definition vector.hh:526
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:395
VMvWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
Definition vector.hh:538
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:405
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:156
VectorArithMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
Definition vector.hh:193
VectorArithMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
Definition vector.hh:180
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:141
VectorMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
Definition vector.hh:125
VectorMemMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
Definition vector.hh:278
VectorMemMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _offset)
Definition vector.hh:266
VectorMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen=256)
Definition vector.hh:143
VectorNonSplitInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Definition vector.hh:105
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:131
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition vector.hh:162
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.hh:168
VectorNopMicroInst(ExtMachInst _machInst)
Definition vector.hh:158
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:203
VectorSlideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen=256)
Definition vector.hh:233
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:189
VectorSlideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vdIdx, uint32_t _vs2Idx)
Definition vector.hh:249
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:180
VectorVMUNARY0MacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:219
VectorVMUNARY0MicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx)
Definition vector.hh:206
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:171
Fault execute(ExecContext *, trace::InstRecord *) const override
Definition vector.cc:543
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Definition vector.cc:583
std::unique_ptr< PCStateBase > branchTarget(ThreadContext *) const override
Return the target address for an indirect branch (jump).
Definition vector.cc:572
std::vector< StaticInstPtr > & microops
Definition vector.hh:586
VlFFTrimVlMicroOp(ExtMachInst _machInst, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen, std::vector< StaticInstPtr > &_microops)
Definition vector.cc:505
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:346
VlIndexMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:462
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:357
VlIndexMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vdRegIdx, uint32_t _vdElemIdx, uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
Definition vector.hh:478
VlSegDeIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl, uint32_t _dstReg, uint32_t _numSrcs, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _vlen, uint32_t _sizeOfElement)
Definition vector.cc:617
Fault execute(ExecContext *, trace::InstRecord *) const override
Definition vector.cc:649
RegId srcRegIdxArr[NumVecInternalRegs]
Definition vector.hh:635
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Definition vector.cc:677
VlSegMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:602
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:591
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:603
Request::Flags memAccessFlags
Definition vector.hh:614
VlSegMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _numFields, uint32_t _vlen)
Definition vector.hh:617
VlStrideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:406
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:298
VlStrideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _regIdx, uint32_t _microIdx, uint32_t _microVl)
Definition vector.hh:419
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:309
VlWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:350
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:270
VlWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Definition vector.hh:364
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:229
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:260
VleMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:287
VleMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Definition vector.hh:317
Request::Flags memAccessFlags
Definition vector.hh:315
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:217
VsIndexMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:494
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:371
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:382
VsIndexMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vs3RegIdx, uint32_t _vs3ElemIdx, uint32_t _vs2RegIdx, uint32_t _vs2ElemIdx)
Definition vector.hh:510
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Definition vector.cc:788
VsSegIntrlvMicroInst(ExtMachInst extMachInst, uint32_t _micro_vl, uint32_t _dstReg, uint32_t _numSrcs, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _vlen, uint32_t _sizeOfElement)
Definition vector.cc:715
RegId srcRegIdxArr[NumVecInternalRegs]
Definition vector.hh:694
Fault execute(ExecContext *, trace::InstRecord *) const override
Definition vector.cc:749
VsSegMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:661
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:689
VsSegMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _numMicroops, uint32_t _field, uint32_t _numFields, uint32_t _vlen)
Definition vector.hh:676
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:701
Request::Flags memAccessFlags
Definition vector.hh:673
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:322
VsStrideMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:434
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:333
VsStrideMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _regIdx, uint32_t _microIdx, uint32_t _microVl)
Definition vector.hh:447
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:289
VsWholeMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:378
VsWholeMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Definition vector.hh:392
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:250
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:279
VseMacroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _vlen)
Definition vector.hh:299
Request::Flags memAccessFlags
Definition vector.hh:333
VseMicroInst(const char *mnem, ExtMachInst _machInst, OpClass __opClass, uint32_t _microVl, uint32_t _microIdx, uint32_t _vlen)
Definition vector.hh:335
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition vector.cc:239
Fault execute(ExecContext *, trace::InstRecord *) const override
Definition vector.cc:488
VxsatMicroInst(bool *Vxsat, ExtMachInst extMachInst)
Definition vector.hh:570
std::string generateDisassembly(Addr, const loader::SymbolTable *) const override
Internal function to generate disassembly string.
Definition vector.cc:497
const char * mnemonic
Base mnemonic (e.g., "add").
std::bitset< Num_Flags > flags
Flag values for this instruction.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
STL vector class.
Definition stl.hh:37
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:79
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition logging.hh:214
float getVflmul(uint32_t vlmul_encoding)
This function translates the 3-bit value of vlmul bits to the corresponding lmul value as specified i...
Definition vector.cc:62
Bitfield< 40 > vill
Definition types.hh:63
const int NumVecInternalRegs
Definition vector.hh:55
Bitfield< 5, 3 > vsew
Definition vector.hh:81
uint8_t checked_vtype(bool vill, uint8_t vtype)
Definition vector.hh:91
Bitfield< 29, 20 > zimm_vsetivli
Definition types.hh:173
uint32_t getVlmax(VTYPE vtype, uint32_t vlen)
Definition vector.cc:70
Bitfield< 19, 15 > uimm_vsetivli
Definition types.hh:174
Bitfield< 30, 20 > zimm_vsetvli
Definition types.hh:170
Bitfield< 2, 0 > vlmul
Definition vector.hh:82
Bitfield< 11, 8 > ss
Bitfield< 4 > pc
Bitfield< 7, 0 > vtype8
Definition vector.hh:78
uint32_t getSew(uint32_t vsew)
Definition vector.hh:52
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
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
static const OpClass SimdMiscOp
Definition op_class.hh:72
constexpr decltype(nullptr) NoFault
Definition types.hh:253

Generated on Tue Jun 18 2024 16:24:00 for gem5 by doxygen 1.11.0