From: Luke Kenneth Casson Leighton Date: Sat, 15 May 2021 18:47:17 +0000 (+0100) Subject: when calling multi-arg function with regs, add to read list X-Git-Tag: 0.0.3~16 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0103d928f35b20e6266b9196d4bea329fc301bb1;p=openpower-isa.git when calling multi-arg function with regs, add to read list --- diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index b24baeac..f7d694f7 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -196,6 +196,11 @@ def apply_trailer(atom, trailer, read_regs): trailer = trailer[2] if trailer[0] == "CALL": #p[0] = ast.Expr(ast.Call(p[1], p[2][1], [])) + for arg in trailer[1]: + if isinstance(arg, ast.Name): + name = arg.id + if name in regs + fregs: + read_regs.add(name) return ast.Call(atom, trailer[1], []) # if p[1].id == 'print': # p[0] = ast.Printnl(ast.Tuple(p[2][1]), None, None)