#60 Fix software model. Forgot physical address for on RVC instruction

This commit is contained in:
Charles Papon 2019-03-30 11:24:29 +01:00
parent 29980016f3
commit 1a36f2689d
1 changed files with 1 additions and 1 deletions

View File

@ -930,7 +930,7 @@ public:
trap(0, 4, address); trap(0, 4, address);
} else { } else {
if(v2p(address, &pAddr, READ)){ trap(0, 13, address); return; } if(v2p(address, &pAddr, READ)){ trap(0, 13, address); return; }
if(dRead(address, 4, &data)) { if(dRead(pAddr, 4, &data)) {
trap(0, 5, address); trap(0, 5, address);
} else { } else {
rfWrite(i16_addr2, data); pcWrite(pc + 2); rfWrite(i16_addr2, data); pcWrite(pc + 2);