self.sim.spr['SRR0'] = 0
self.sim.spr['SRR1'] = 0
- self.sprs[spr] = self.sim.spr[spr.name] # setitem converts to int
+ # avoid accessing SPRs that aren't used/implemented
+ # this avoids printing a bunch of messages like:
+ # setting spr TFHAR SelectableInt(value=0x0, bits=64)
+ # setting spr TFIAR SelectableInt(value=0x0, bits=64)
+ # setting spr TEXASR SelectableInt(value=0x0, bits=64)
+ # setting spr TEXASRU SelectableInt(value=0x0, bits=32)
+ if (spr.name in self.sim.spr or spr.value in self.sim.spr
+ or spr.name in ('HSRR0', 'HSRR1')):
+ # setitem converts to int
+ self.sprs[spr] = self.sim.spr[spr.name]
if clear_srr:
self.sim.spr['SRR0'] = old_srr0