Go to the documentation of this file.
41 #ifndef __ARCH_ARM_INSTS_PREDINST_HH__
42 #define __ARCH_ARM_INSTS_PREDINST_HH__
50 static inline uint32_t
54 return rotateValue == 0 ? immValue :
55 (immValue >> rotateValue) | (immValue << (32 - rotateValue));
58 static inline uint32_t
61 uint32_t bigData = dataImm;
62 uint32_t bigCtrl = ctrlImm;
68 return bigData | (bigData << 16);
70 return (bigData << 8) | (bigData << 24);
72 return (bigData << 0) | (bigData << 8) |
73 (bigData << 16) | (bigData << 24);
76 bigCtrl = (bigCtrl << 1) | ((bigData >> 7) & 0x1);
78 return bigData << (32 - bigCtrl);
81 static inline uint64_t
83 bool isAarch64 =
false)
85 uint64_t bigData =
data;
90 bigData = (bigData << 0) | (bigData << 32);
94 bigData = (bigData << 8) | (bigData << 40);
98 bigData = (bigData << 16) | (bigData << 48);
102 bigData = (bigData << 24) | (bigData << 56);
106 bigData = (bigData << 0) | (bigData << 16) |
107 (bigData << 32) | (bigData << 48);
111 bigData = (bigData << 8) | (bigData << 24) |
112 (bigData << 40) | (bigData << 56);
115 bigData = (0xff
ULL << 0) | (bigData << 8) |
116 (0xff
ULL << 32) | (bigData << 40);
119 bigData = (0xffff
ULL << 0) | (bigData << 16) |
120 (0xffff
ULL << 32) | (bigData << 48);
125 for (
int i = 7;
i >= 0;
i--) {
127 bigData |= (
ULL(0xFF) << (
i * 8));
131 bigData = (bigData << 0) | (bigData << 8) |
132 (bigData << 16) | (bigData << 24) |
133 (bigData << 32) | (bigData << 40) |
134 (bigData << 48) | (bigData << 56);
141 bVal =
bits(bigData, 6) ? (0x1F) : (0x20);
142 bigData = (
bits(bigData, 5, 0) << 19) |
143 (bVal << 25) | (
bits(bigData, 7) << 31);
144 bigData |= (bigData << 32);
146 }
else if (isAarch64) {
147 bVal =
bits(bigData, 6) ? (0x0FF) : (0x100);
148 bigData = (
bits(bigData, 5, 0) << 48) |
149 (bVal << 54) | (
bits(bigData, 7) << 63);
164 static inline uint64_t
167 uint64_t bigData =
data;
172 bigData = (
bits(bigData, 5, 0) << 6) |
173 (repData << 12) | (
bits(~bigData, 6) << 14) |
174 (
bits(bigData, 7) << 15);
178 bigData = (
bits(bigData, 5, 0) << 19) |
179 (repData << 25) | (
bits(~bigData, 6) << 30) |
180 (
bits(bigData, 7) << 31);
184 bigData = (
bits(bigData, 5, 0) << 48) |
185 (repData << 54) | (
bits(~bigData, 6) << 62) |
186 (
bits(bigData, 7) << 63);
189 panic(
"Unrecognized FP data type");
203 "Invalid floating point data type in VFP/SIMD or SVE instruction");
243 PredOp(mnem, _machInst, __opClass),
268 PredOp(mnem, _machInst, __opClass),
288 PredOp(mnem, _machInst, __opClass),
306 PredOp(mnem, _machInst, __opClass),
324 PredOp(mnem, _machInst, __opClass),
345 PredOp(mnem, _machInst, __opClass),
351 flags[IsMacroop] =
true;
370 panic(
"Execute method called when it shouldn't!");
384 PredOp(mnem, _machInst, __opClass)
386 flags[IsMicroop] =
true;
392 if (
flags[IsLastMicroop])
400 #endif //__ARCH_ARM_INSTS_PREDINST_HH__
FpDataType
Floating point data types.
static uint32_t modified_imm(uint8_t ctrlImm, uint8_t dataImm)
PredMacroOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
std::bitset< Num_Flags > flags
Flag values for this instruction.
Bitfield< 11, 7 > shiftSize
void advancePC(PCState &pcState) const override
static uint64_t vfp_modified_imm(uint8_t data, FpDataType dtype)
static FpDataType decode_fp_data_type(uint8_t encoding)
const TheISA::ExtMachInst machInst
The binary machine instruction.
DataRegRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, IntRegIndex _shift, ArmShiftType _shiftType)
Base class for predicated integer operations.
static uint32_t rotate_imm(uint32_t immValue, uint32_t rotateValue)
StaticInstPtr fetchMicroop(MicroPC microPC) const override
Return the microop that goes with a particular micropc.
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
DataRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, int32_t _shiftAmt, ArmShiftType _shiftType)
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
PredMicroop(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
PredImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
std::shared_ptr< FaultBase > Fault
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Fault execute(ExecContext *, Trace::InstRecord *) const override
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.
Base class for predicated macro-operations.
std::string generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
static uint64_t simd_modified_imm(bool op, uint8_t cmode, uint8_t data, bool &immValid, bool isAarch64=false)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
PredIntOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
GenericISA::DelaySlotPCState< MachInst > PCState
DataImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1, uint32_t _imm, bool _rotC)
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Base class for predicated immediate operations.
Base class for predicated integer operations.
Bitfield< 27, 25 > encoding
PredOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass)
Constructor.
Base class for predicated micro-operations.
#define ULL(N)
uint64_t constant
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Jun 22 2021 15:28:20 for gem5 by doxygen 1.8.17