From: Luke Kenneth Casson Leighton Date: Tue, 25 May 2021 09:41:12 +0000 (+0100) Subject: add add setting of LR so that code jumps outside of executable range when done X-Git-Tag: xlen-bcd~559 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=382510a4cbdded64b6405f9ef45349be414e3afa;p=openpower-isa.git add add setting of LR so that code jumps outside of executable range when done --- diff --git a/media/Makefile b/media/Makefile index dc233552..9f59c297 100644 --- a/media/Makefile +++ b/media/Makefile @@ -34,4 +34,5 @@ wget: tests: $(OBJ) echo juuh pypowersim -g audio/mp3/mp3_0.gpr \ + -s audio/mp3/mp3_0.spr \ -i audio/mp3/mp3_0_apply_window_float.bin diff --git a/media/audio/mp3/mp3_0.spr b/media/audio/mp3/mp3_0.spr new file mode 100644 index 00000000..0a615d76 --- /dev/null +++ b/media/audio/mp3/mp3_0.spr @@ -0,0 +1 @@ +LR: 0xffffffff diff --git a/src/openpower/decoder/isa/pypowersim.py b/src/openpower/decoder/isa/pypowersim.py index f1577eb7..767344f2 100644 --- a/src/openpower/decoder/isa/pypowersim.py +++ b/src/openpower/decoder/isa/pypowersim.py @@ -43,6 +43,7 @@ def read_entries(fname, listqty=None): start with "0x" or "0b" for hex or binary """ regs = {} + allints = True with open(fname) as f: for line in f.readlines(): # split line "x : y" into ["x", "y"], remove spaces @@ -53,8 +54,13 @@ def read_entries(fname, listqty=None): reg = convert_to_num(reg) val = convert_to_num(val) assert reg not in regs, "duplicate entry %s" % (repr(reg)) + allints = allints and isinstance(reg, int) regs[reg] = val + # SPRs can be named + if not allints: + return regs + # post-process into a list. if listqty is None: return regs