fix segcache bug with new unfolded I/D space

This commit is contained in:
Neil Webber 2023-09-29 14:14:34 -05:00
parent 6d327ff1d3
commit ccfab58040

9
mmu.py
View file

@ -156,8 +156,13 @@ class MemoryMgmt:
else: else:
# dump any matching cache entries in both reading/writing form. # dump any matching cache entries in both reading/writing form.
for rw in (_CYCLE.READ, _CYCLE.WRITE): for rw in (_CYCLE.READ, _CYCLE.WRITE):
if (aprnum, mode, space, rw) in self.segcache: # the "space" is a dilemma because it is tied up in
del self.segcache[(aprnum, mode, space, rw)] # the unfolding of I/D space separation. It's not hard
# to figure out what to do but its also very easy to
# just do this: nuke both I and D space cache entries.
for xspc in (self.ISPACE, self.DSPACE):
if (aprnum, mode, xspc, rw) in self.segcache:
del self.segcache[(aprnum, mode, xspc, rw)]
aprfile[aprnum][parpdr] = value aprfile[aprnum][parpdr] = value