From 0103d928f35b20e6266b9196d4bea329fc301bb1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 15 May 2021 19:47:17 +0100 Subject: [PATCH] when calling multi-arg function with regs, add to read list --- src/openpower/decoder/pseudo/parser.py | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.30.2