From 4d7d5dd768978e2b509fd3581deae739e8cd1f9f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 25 Dec 2021 13:01:19 +0000 Subject: [PATCH] sv_binutils: provide small comment on regex --- src/openpower/sv/sv_binutils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index d1470efe..dc85cc4b 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -50,6 +50,10 @@ PATTERN_VHDL_BINARY = r"(?:2#[01]+#)" PATTERN_DECIMAL = r"(?:[0-9]+)" PATTERN_PARTIAL_BINARY = r"(?:[01-]+)" +# Examples of the entries to be caught by the pattern below: +# 2 => (P2, EXTRA3, RA_OR_ZERO, NONE, NONE, RT, NONE, NONE, NONE, Idx1, NONE, NONE, Idx0, NONE, NONE, NONE), -- lwz +# -----10110 => (P2, EXTRA3, NONE, FRB, NONE, FRT, NONE, NONE, CR1, NONE, Idx1, NONE, Idx0, NONE, NONE, Idx0), -- fsqrts +# 2#0000000000# => (P2, EXTRA3, NONE, NONE, NONE, NONE, NONE, BFA, BF, NONE, NONE, NONE, NONE, NONE, Idx1, Idx0), -- mcrf PATTERN = "".join(( r"^\s*", rf"(?P{PATTERN_VHDL_BINARY}|{PATTERN_DECIMAL}|{PATTERN_PARTIAL_BINARY})", -- 2.30.2