Passes all tests except MEM and lui?

This commit is contained in:
felsabbagh3
2019-02-10 05:46:18 -05:00
parent 0c3a73a896
commit 3c74a13009
169 changed files with 26599 additions and 443 deletions

View File

@@ -152,7 +152,7 @@ Word MemoryUnit::fetch(Addr vAddr, bool sup) {
return ad.read(pAddr, sup, 8*addrBytes);
}
void MemoryUnit::write(Addr vAddr, Word w, bool sup) {
void MemoryUnit::write(Addr vAddr, Word w, bool sup, Size bytes) {
Addr pAddr;
if (disableVm) {
@@ -162,7 +162,7 @@ void MemoryUnit::write(Addr vAddr, Word w, bool sup) {
TLBEntry t = tlbLookup(vAddr, flagMask);
pAddr = t.pfn*pageSize + vAddr%pageSize;
}
ad.write(pAddr, w, sup, 8*addrBytes);
ad.write(pAddr, w, sup, 8*bytes);
}
void MemoryUnit::tlbAdd(Addr virt, Addr phys, Word flags) {
@@ -247,3 +247,7 @@ void DiskControllerMemDevice::write(Addr a, Word w) {
break;
}
}