Endianness transformation was moved from the CPU into this method,
making the "inst" parameter guest endian instead of host endian. The
emi member of the decoder was set using the betoh method, ensuring that
it was still stored in host order. Unfortunately, the "inst" parameter
was used in some places when setting up the rest of emi.
This change replaces those uses of inst with emi.
Change-Id: I0c7f9a1833db4b64fc1a5015cf10f6ba3f7c26a0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23163
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
// should come from. Use that in the ExtMachInst. This is
// slightly redundant, but it removes the need to put a condition
// into all the execute functions
- if (inst & (1 << 13)) {
+ if (emi & (1 << 13)) {
emi |= (static_cast<ExtMachInst>(
asi << (sizeof(MachInst) * 8)));
} else {
- emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
+ emi |= (static_cast<ExtMachInst>(bits(emi, 12, 5))
<< (sizeof(MachInst) * 8));
}
instDone = true;