From 8bbd97998c7796ec8893004d05e7f0a163120229 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 9 May 2023 18:48:47 -0700 Subject: [PATCH] add support for accessing XER using XER.SO syntax -- intended for new pseudocode --- src/openpower/decoder/isa/caller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 0807e47a..f23aba98 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -40,6 +40,7 @@ from openpower.decoder.selectable_int import (FieldSelectableInt, SelectableInt, selectconcat, EFFECTIVELY_UNLIMITED) from openpower.fpscr import FPSCRState +from openpower.xer import XERState from openpower.util import LogKind, log instruction_info = namedtuple('instruction_info', @@ -267,7 +268,7 @@ class SPR(dict): info = spr_dict[key] else: info = spr_byname[key] - dict.__setitem__(self, key, SelectableInt(0, info.length)) + self[key] = SelectableInt(0, info.length) res = dict.__getitem__(self, key) log("spr returning", key, res) return res @@ -283,6 +284,8 @@ class SPR(dict): self.__setitem__('SRR0', value) if key == 'HSRR1': # HACK! self.__setitem__('SRR1', value) + if key == 1: + value = XERState(value) log("setting spr", key, value) dict.__setitem__(self, key, value) -- 2.30.2