From 9d37a6c23d7ecb3aaece79a14d80c984caecd571 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 9 Oct 2022 00:32:05 +0100 Subject: [PATCH] forgot to add offset on GPR() get --- src/openpower/decoder/isa/caller.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 3822de35..35858b9d 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -126,7 +126,7 @@ class GPR(dict): if isinstance(ridx, SelectableInt): ridx = ridx.value if elwidth == 64: - return self[ridx] + return self[ridx+offs] # rrrright. start by breaking down into row/col, based on elwidth gpr_offs = offs // (64//elwidth) gpr_col = offs % (64//elwidth) @@ -168,8 +168,9 @@ class GPR(dict): val |= value << (gpr_col*elwidth) # finally put the damn value into the regfile log("GPR write", base, "isvec", is_vec, "offs", offs, - "elwid", elwidth, "offs/col", gpr_offs, gpr_col, "val", hex(val)) - self[base+gpr_offs].value = val + "elwid", elwidth, "offs/col", gpr_offs, gpr_col, "val", hex(val), + "@", base+gpr_offs) + dict.__setitem__(self, base+gpr_offs, SelectableInt(val, 64)) def __setitem__(self, rnum, value): # rnum = rnum.value # only SelectableInt allowed -- 2.30.2