110 std::stringstream
ss;
122 std::stringstream
ss;
135 std::stringstream
ss;
149 std::stringstream
ss;
168 std::stringstream
ss;
186 std::stringstream
ss;
198 std::stringstream
ss;
212 std::stringstream
ss;
224 std::stringstream
ss;
236 std::stringstream
ss;
251 std::stringstream
ss;
265 std::stringstream
ss;
281 std::stringstream
ss;
295 std::stringstream
ss;
311 std::stringstream
ss;
330 std::stringstream
ss;
344 std::stringstream
ss;
361 std::stringstream
ss;
381 std::stringstream
ss;
394 std::stringstream
ss;
410 std::stringstream
ss;
426 std::stringstream
ss;
442 std::stringstream
ss;
456 std::stringstream
ss;
472 std::stringstream
ss;
486 std::stringstream
ss;
502 std::stringstream
ss;
516 std::stringstream
ss;
536 std::stringstream
ss;
551 std::stringstream
ss;
562 }
else if (
mult != 1) {
566 ss << __builtin_ctz(
mult);
576 static const char suffix[9] =
577 {
'\0',
'b',
'h',
'\0',
'w',
'\0',
'\0',
'\0',
'd'};
578 std::stringstream
ss;
594 ss << std::to_string(
imm);
604 std::stringstream
ss;
618 std::stringstream
ss;
634 std::stringstream
ss;
660 std::stringstream
ss;
673 std::stringstream
ss;
687 std::stringstream
ss;
699 std::stringstream
ss;
711 std::stringstream
ss;
721 std::stringstream
ss;
734 std::stringstream
ss;
744 std::stringstream
ss;
753 std::stringstream
ss;
769 std::stringstream
ss;
784 std::stringstream
ss;
800 std::stringstream
ss;
817 std::stringstream
ss;
831 std::stringstream
ss;
841 const char* rotstr[4] = {
"0",
"90",
"180",
"270"};
851 std::stringstream
ss;
861 const char* rotstr[4] = {
"0",
"90",
"180",
"270"};
870 std::stringstream
ss;
893 return "VL" + std::to_string(
imm);
900 return "VL" + std::to_string(1 << ((
imm & 0x7) + 3));
908 return "#" + std::to_string(
imm);
915 assert(num_elems > 0);
920 return 1 << (31 - __builtin_clz((uint32_t) num_elems));
929 return (num_elems >=
imm) ?
imm : 0;
938 unsigned int pcount = 1 << ((
imm & 0x7) + 3);
939 return (num_elems >= pcount) ? pcount : 0;
943 return num_elems - (num_elems % 4);
946 return num_elems - (num_elems % 3);
958 static constexpr uint16_t fpOne16 = 0x3c00;
959 static constexpr uint16_t fpPointFive16 = 0x3800;
960 static constexpr uint32_t fpOne32 = 0x3f800000;
961 static constexpr uint32_t fpPointFive32 = 0x3f000000;
962 static constexpr uint64_t fpOne64 = 0x3ff0000000000000;
963 static constexpr uint64_t fpPointFive64 = 0x3fe0000000000000;
967 return imm ? fpOne16 : fpPointFive16;
969 return imm ? fpOne32 : fpPointFive32;
971 return imm ? fpOne64 : fpPointFive64;
973 panic(
"Unsupported size");
980 static constexpr uint16_t fpOne16 = 0x3c00;
981 static constexpr uint32_t fpOne32 = 0x3f800000;
982 static constexpr uint64_t fpOne64 = 0x3ff0000000000000;
986 return imm ? fpOne16 : 0x0;
988 return imm ? fpOne32 : 0x0;
990 return imm ? fpOne64 : 0x0;
992 panic(
"Unsupported size");
999 static constexpr uint16_t fpTwo16 = 0x4000;
1000 static constexpr uint16_t fpPointFive16 = 0x3800;
1001 static constexpr uint32_t fpTwo32 = 0x40000000;
1002 static constexpr uint32_t fpPointFive32 = 0x3f000000;
1003 static constexpr uint64_t fpTwo64 = 0x4000000000000000;
1004 static constexpr uint64_t fpPointFive64 = 0x3fe0000000000000;
1008 return imm ? fpTwo16 : fpPointFive16;
1010 return imm ? fpTwo32 : fpPointFive32;
1012 return imm ? fpTwo64 : fpPointFive64;
1014 panic(
"Unsupported size");
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
void printVecReg(std::ostream &os, RegIndex reg_idx, bool isSveVecReg=false) 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 printFloatReg(std::ostream &os, RegIndex reg_idx) const
void printVecPredReg(std::ostream &os, RegIndex reg_idx) const
SveAdrOffsetFormat offsetFormat
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
@ SveAdrOffsetUnpackedUnsigned
@ SveAdrOffsetUnpackedSigned
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
const char * mnemonic
Base mnemonic (e.g., "add").
#define panic(...)
This implements a cprintf based panic() function.
uint64_t sveExpandFpImmAddSub(uint8_t imm, uint8_t size)
Expand 1-bit floating-point immediate to 0.5 or 1.0 (FADD, FSUB, FSUBR).
unsigned int sveDecodePredCount(uint8_t imm, unsigned int num_elems)
Returns the actual number of elements active for PTRUE(S) instructions.
const char * svePredTypeToStr(SvePredType pt)
Returns the specifier for the predication type pt as a string.
std::string sveDisasmPredCountImm(uint8_t imm)
Returns the symbolic name associated with pattern imm for PTRUE(S) instructions.
uint64_t sveExpandFpImmMul(uint8_t imm, uint8_t size)
Expand 1-bit floating-point immediate to 0.5 or 2.0 (FMUL).
uint64_t sveExpandFpImmMaxMin(uint8_t imm, uint8_t size)
Expand 1-bit floating-point immediate to 0.0 or 1.0 (FMAX, FMAXNM, FMIN, FMINNM).
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void ccprintf(cp::Print &print)