diff mbox series

[3/8] decodetree: Rename MultiPattern to IncMultiPattern

Message ID 20200518164052.18689-4-richard.henderson@linaro.org
State Superseded
Headers show
Series decodetree: Add non-overlapping groups | expand

Commit Message

Richard Henderson May 18, 2020, 4:40 p.m. UTC
Name the current node for "inclusive" multi-pattern, in
preparation for adding a node for "exclusive" multi-pattern.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 scripts/decodetree.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.20.1

Comments

Philippe Mathieu-Daudé May 18, 2020, 4:47 p.m. UTC | #1
On 5/18/20 6:40 PM, Richard Henderson wrote:
> Name the current node for "inclusive" multi-pattern, in

> preparation for adding a node for "exclusive" multi-pattern.

> 

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>   scripts/decodetree.py | 14 +++++++-------

>   1 file changed, 7 insertions(+), 7 deletions(-)

> 

> diff --git a/scripts/decodetree.py b/scripts/decodetree.py

> index b559db3086..7af6b3056d 100755

> --- a/scripts/decodetree.py

> +++ b/scripts/decodetree.py

> @@ -371,7 +371,7 @@ class Pattern(General):

>   # end Pattern

>   

>   

> -class MultiPattern(General):

> +class IncMultiPattern(General):

>       """Class representing an overlapping set of instruction patterns"""

>   

>       def __init__(self, lineno, pats, fixb, fixm, udfm, w):

> @@ -410,7 +410,7 @@ class MultiPattern(General):

>                   output(ind, '}\n')

>               else:

>                   p.output_code(i, extracted, p.fixedbits, p.fixedmask)

> -#end MultiPattern

> +#end IncMultiPattern

>   

>   

>   def parse_field(lineno, name, toks):

> @@ -751,8 +751,8 @@ def parse_generic(lineno, is_format, name, toks):

>                             .format(allbits ^ insnmask))

>   # end parse_general

>   

> -def build_multi_pattern(lineno, pats):

> -    """Validate the Patterns going into a MultiPattern."""

> +def build_incmulti_pattern(lineno, pats):

> +    """Validate the Patterns going into a IncMultiPattern."""

>       global patterns

>       global insnmask

>   

> @@ -792,9 +792,9 @@ def build_multi_pattern(lineno, pats):

>           else:

>               repeat = False

>   

> -    mp = MultiPattern(lineno, pats, fixedbits, fixedmask, undefmask, width)

> +    mp = IncMultiPattern(lineno, pats, fixedbits, fixedmask, undefmask, width)

>       patterns.append(mp)

> -# end build_multi_pattern

> +# end build_incmulti_pattern

>   

>   def parse_file(f):

>       """Parse all of the patterns within a file"""

> @@ -860,7 +860,7 @@ def parse_file(f):

>                   error(start_lineno, 'indentation ', indent, ' != ', nesting)

>               pats = patterns

>               patterns = saved_pats.pop()

> -            build_multi_pattern(lineno, pats)

> +            build_incmulti_pattern(lineno, pats)

>               toks = []

>               continue

>   

> 


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index b559db3086..7af6b3056d 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -371,7 +371,7 @@  class Pattern(General):
 # end Pattern
 
 
-class MultiPattern(General):
+class IncMultiPattern(General):
     """Class representing an overlapping set of instruction patterns"""
 
     def __init__(self, lineno, pats, fixb, fixm, udfm, w):
@@ -410,7 +410,7 @@  class MultiPattern(General):
                 output(ind, '}\n')
             else:
                 p.output_code(i, extracted, p.fixedbits, p.fixedmask)
-#end MultiPattern
+#end IncMultiPattern
 
 
 def parse_field(lineno, name, toks):
@@ -751,8 +751,8 @@  def parse_generic(lineno, is_format, name, toks):
                           .format(allbits ^ insnmask))
 # end parse_general
 
-def build_multi_pattern(lineno, pats):
-    """Validate the Patterns going into a MultiPattern."""
+def build_incmulti_pattern(lineno, pats):
+    """Validate the Patterns going into a IncMultiPattern."""
     global patterns
     global insnmask
 
@@ -792,9 +792,9 @@  def build_multi_pattern(lineno, pats):
         else:
             repeat = False
 
-    mp = MultiPattern(lineno, pats, fixedbits, fixedmask, undefmask, width)
+    mp = IncMultiPattern(lineno, pats, fixedbits, fixedmask, undefmask, width)
     patterns.append(mp)
-# end build_multi_pattern
+# end build_incmulti_pattern
 
 def parse_file(f):
     """Parse all of the patterns within a file"""
@@ -860,7 +860,7 @@  def parse_file(f):
                 error(start_lineno, 'indentation ', indent, ' != ', nesting)
             pats = patterns
             patterns = saved_pats.pop()
-            build_multi_pattern(lineno, pats)
+            build_incmulti_pattern(lineno, pats)
             toks = []
             continue