From 856065cfb3f4b3b8d31be01f6bb5330290853e68 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 12 Jan 2024 23:47:00 +0300 Subject: [PATCH] oppc/parser: check for regs in trailerlist --- src/openpower/oppc/pc_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openpower/oppc/pc_parser.py b/src/openpower/oppc/pc_parser.py index cb60282b..8f385d6d 100644 --- a/src/openpower/oppc/pc_parser.py +++ b/src/openpower/oppc/pc_parser.py @@ -429,6 +429,9 @@ class Parser: name = pc_ast.Call.Name(str(p[1])) node.subject = pc_ast.Call(name=name, args=node.subject) else: + if (isinstance(p[1], pc_ast.Symbol) and + (str(p[1]) in self.__class__.REGS)): + p[1] = self.__class__.REGS[str(p[1])](p[1]) node.subject = p[1] p[0] = p[2] elif isinstance(p[2], pc_ast.Call.Arguments): -- 2.30.2