From 7f04821a516437b9091fae7690e499ef6d9a84b6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 14 Aug 2020 20:44:59 +0100 Subject: [PATCH] bad hack to get HSRR0/1 to be "same" as SRR0/1 --- src/soc/decoder/isa/caller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index c8b5f4de..59728a0b 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -216,6 +216,10 @@ class SPR(dict): if isinstance(key, int): key = spr_dict[key].SPR key = special_sprs.get(key, key) + if key == 'HSRR0': # HACK! + key = 'SRR0' + if key == 'HSRR1': # HACK! + key = 'SRR1' if key in self: res = dict.__getitem__(self, key) else: @@ -235,6 +239,10 @@ class SPR(dict): key = spr_dict[key].SPR print("spr key", key) key = special_sprs.get(key, key) + if key == 'HSRR0': # HACK! + self.__setitem__('SRR0', value) + if key == 'HSRR1': # HACK! + self.__setitem__('SRR1', value) print("setting spr", key, value) dict.__setitem__(self, key, value) -- 2.30.2