This takes the place of direct access to the machInst field as used in
the MinorCPU model which makes the incorrect assumption that it can
arbitrarily treat the ExtMachInst as an integer, and that masking in a
certain way can meaningfully classify what the instruction will do.
Because that assumption is not correct in general, that had been
ifdef-ed out in most ISAs except ARM, and for the other ISAs the value
was simply set to zero.
Change-Id: I8ac05e65475edc3ccc044afdff09490e2c05ba07
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40098
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
pcState.advance();
}
+ uint64_t getEMI() const override { return machInst; }
+
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
MinorFUTiming *
FUPipeline::findTiming(const StaticInstPtr &inst)
{
-#if THE_ISA == ARM_ISA
- /* This should work for any ISA with a POD mach_inst */
- TheISA::ExtMachInst mach_inst = inst->machInst;
-#else
- /* Just allow extra decode based on op classes */
- uint64_t mach_inst = 0;
-#endif
+ /*
+ * This will only work on ISAs with an instruction format with a fixed size
+ * which can be categorized using bit masks. This is really only supported
+ * on ARM and is a bit of a hack.
+ */
+ uint64_t mach_inst = inst->getEMI();
const std::vector<MinorFUTiming *> &timings =
description.timings;
/// The binary machine instruction.
const TheISA::ExtMachInst machInst;
+ virtual uint64_t getEMI() const { return 0; }
+
protected:
/**