Go to the documentation of this file.
33 #include "debug/Decode.hh"
52 constexpr
size_t max_bit =
sizeof(
machInst) * 8 - 1;
53 constexpr
size_t mid_bit =
sizeof(
machInst) * 4 - 1;
56 DPRINTF(Decode,
"Requesting bytes 0x%08x from address %#x\n", inst,
68 assert(
bits(
emi, max_bit, mid_bit + 1) == 0);
74 emi =
bits(inst, max_bit, mid_bit + 1);
85 DPRINTF(Decode,
"Decoding instruction 0x%08x at address %#x\n",
92 DPRINTF(Decode,
"Decode: Decoded %s instruction: %#x\n",
93 si->getName(), mach_inst);
107 next_pc.
npc(next_pc.instAddr() +
sizeof(
machInst) / 2);
108 next_pc.compressed(
true);
110 next_pc.npc(next_pc.instAddr() +
sizeof(
machInst));
111 next_pc.compressed(
false);
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
StaticInstPtr decode(ExtMachInst mach_inst, Addr addr)
Decode a machine instruction.
void moreBytes(const PCStateBase &pc, Addr fetchPC) override
Feed data to the decoder.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
decode_cache::InstMap< ExtMachInst > instMap
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool compressed(ExtMachInst inst)
StaticInstPtr decodeInst(ExtMachInst mach_inst)
Generated on Wed Jul 13 2022 10:38:56 for gem5 by doxygen 1.8.17