From: Jacob Lifshay Date: Tue, 25 Jul 2023 03:33:34 +0000 (-0700) Subject: don't convert CR[BI] to CR.BI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd8ad147011a17a1020442da77e6899b7d4b23e1;p=openpower-isa.git don't convert CR[BI] to CR.BI --- 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