void
moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
- ext_inst = inst;
+ ext_inst = letoh(inst);
instDone = true;
if (FullSystem)
ext_inst |= (static_cast<ExtMachInst>(pc.pc() & 0x1) << 32);
void
Decoder::moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
- data = inst;
+ data = letoh(inst);
offset = (fetchPC >= pc.instAddr()) ? 0 : pc.instAddr() - fetchPC;
emi.thumb = pc.thumb();
emi.aarch64 = pc.aarch64();
void
moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
- emi = inst;
+ emi = letoh(inst);
instDone = true;
}
void
moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
- emi = inst;
+ emi = betoh(inst);
instDone = true;
}
void
Decoder::moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
+ inst = letoh(inst);
DPRINTF(Decode, "Requesting bytes 0x%08x from address %#x\n", inst,
fetchPC);
void
moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
- emi = inst;
+ emi = betoh(inst);
// The I bit, bit 13, is used to figure out where the ASI
// should come from. Use that in the ExtMachInst. This is
// slightly redundant, but it removes the need to put a condition
DPRINTF(Decoder, "Getting more bytes.\n");
basePC = fetchPC;
offset = (fetchPC >= pc.instAddr()) ? 0 : pc.instAddr() - fetchPC;
- fetchChunk = data;
+ fetchChunk = letoh(data);
outOfBytes = false;
process();
}
pkt->dataStatic(&machInst);
icachePort->sendFunctional(pkt);
- machInst = gtoh(machInst);
delete pkt;
}
} else {
uint8_t *line = line_in->line;
- TheISA::MachInst inst_word;
/* The instruction is wholly in the line, can just
* assign */
- inst_word = TheISA::gtoh(
- *(reinterpret_cast<TheISA::MachInst *>
- (line + fetch_info.inputIndex)));
+ auto inst_word = *reinterpret_cast<TheISA::MachInst *>
+ (line + fetch_info.inputIndex);
if (!decoder->instReady()) {
decoder->moreBytes(fetch_info.pc,
break;
}
- MachInst inst = TheISA::gtoh(cacheInsts[blkOffset]);
- decoder[tid]->moreBytes(thisPC, fetchAddr, inst);
+ decoder[tid]->moreBytes(thisPC, fetchAddr, cacheInsts[blkOffset]);
if (decoder[tid]->needMoreBytes()) {
blkOffset++;
thread->comInstEventQueue.serviceEvents(t_info.numInst);
// decode the instruction
- inst = gtoh(inst);
-
TheISA::PCState pcState = thread->pcState();
if (isRomMicroPC(pcState.microPC())) {