corrects template for new arch_if changes
This commit is contained in:
parent
8f491ef36b
commit
a0eeae7dd6
@ -175,22 +175,8 @@ private:
|
|||||||
decoder instr_decoder;
|
decoder instr_decoder;
|
||||||
|
|
||||||
iss::status fetch_ins(virt_addr_t pc, uint8_t * data){
|
iss::status fetch_ins(virt_addr_t pc, uint8_t * data){
|
||||||
if(this->core.has_mmu()) {
|
if (this->core.read(iss::address_type::PHYSICAL, pc.access, pc.space, pc.val, 4, data) != iss::Ok)
|
||||||
auto phys_pc = this->core.virt2phys(pc);
|
return iss::Err;
|
||||||
// if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary
|
|
||||||
// if (this->core.read(phys_pc, 2, data) != iss::Ok) return iss::Err;
|
|
||||||
// if ((data[0] & 0x3) == 0x3) // this is a 32bit instruction
|
|
||||||
// if (this->core.read(this->core.v2p(pc + 2), 2, data + 2) != iss::Ok)
|
|
||||||
// return iss::Err;
|
|
||||||
// } else {
|
|
||||||
if (this->core.read(phys_pc, 4, data) != iss::Ok)
|
|
||||||
return iss::Err;
|
|
||||||
// }
|
|
||||||
} else {
|
|
||||||
if (this->core.read(phys_addr_t(pc.access, pc.space, pc.val), 4, data) != iss::Ok)
|
|
||||||
return iss::Err;
|
|
||||||
|
|
||||||
}
|
|
||||||
return iss::Ok;
|
return iss::Ok;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user