fix short stores

pd
openpowerwtf 2 years ago
parent 41d69cc86a
commit ea41dbaafa

@ -140,16 +140,15 @@ class Memory(DotMap):
if be is not None: if be is not None:
try: try:
be = be + 0 be = be + 0
be = f'{be:04b}'
except: except:
be = int(be, 2) pass
be = f'{be:04b}'
if be == '0000': if be == '0000':
return return

mask = 0 mask = 0
for i in range(4): for i in range(4):
mask = mask << 8 mask = mask << 8
if be[i]: if be[i] == '1':
mask += 0xFF mask += 0xFF
data = (self.read(addr) & ~mask) | (data & mask) data = (self.read(addr) & ~mask) | (data & mask)



Loading…
Cancel
Save