From dd8ad147011a17a1020442da77e6899b7d4b23e1 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 24 Jul 2023 20:33:34 -0700 Subject: [PATCH] don't convert CR[BI] to CR.BI --- src/openpower/decoder/pseudo/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index a409d86a..a618aec1 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -28,6 +28,7 @@ import ast regs = ['RA', 'RS', 'RB', 'RC', 'RT'] fregs = ['FRA', 'FRS', 'FRB', 'FRC', 'FRT', 'FRS'] SPECIAL_HELPERS = {'concat', 'MEM', 'GPR', 'FPR', 'SPR', 'pow'} +SUBS_TO_ATTR_EXCEPTIONS = SPECIAL_HELPERS | {'CR'} # I implemented INDENT / DEDENT generation as a post-processing filter @@ -945,7 +946,7 @@ class PowerParser: if trailer[0] != "SUBS": return None base_name = self.try_extract_uppercase_name(atom) - if base_name is None or base_name in SPECIAL_HELPERS: + if base_name is None or base_name in SUBS_TO_ATTR_EXCEPTIONS: return None if len(trailer[1]) != 1: return None -- 2.30.2