[instructions] moved regs and mmu to properties to work with janky PrivCPU

kernel-mode
Anton Lydike 4 years ago
parent 1bdf2e6efe
commit ee0aac30c4

@ -29,8 +29,6 @@ class InstructionSet(ABC):
"""
self.name = self.__class__.__name__
self.cpu = cpu
self.mmu = cpu.mmu
self.regs = cpu.regs
def load(self) -> Dict[str, Callable[['LoadedInstruction'], None]]:
"""
@ -132,6 +130,14 @@ class InstructionSet(ABC):
def pc(self, val):
self.cpu.pc = val
@property
def mmu(self):
return self.cpu.mmu
@property
def regs(self):
return self.cpu.regs
def __repr__(self):
return "InstructionSet[{}] with {} instructions".format(
self.__class__.__name__,

Loading…
Cancel
Save