Skip to contentSkip to conversation

docs/devel: Document decodetree no-overlap groups

PATCH In review Richard Henderson 2 participants 3 messages Aug 3, 2020 – Aug 4, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/devel: Document decodetree no-overlap groups

When support for this feature went in, the update to the documentation was forgotten.

---
 docs/devel/decodetree.rst | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)
docs/devel/decodetree.rst +18 -11
index ce7f52308f..74f66bf46e 100644
@@ -173,18 +173,25 @@ Pattern Groups
 
 Syntax::
 
-  group    := '{' ( pat_def | group )+ '}'
+  group            := overlap_group | no_overlap_group
+  overlap_group    := '{' ( pat_def | group )+ '}'
+  no_overlap_group := '[' ( pat_def | group )+ ']'
 
-A *group* begins with a lone open-brace, with all subsequent lines
-indented two spaces, and ending with a lone close-brace.  Groups
-may be nested, increasing the required indentation of the lines
-within the nested group to two spaces per nesting level.
+A *group* begins with a lone open-brace or open-bracket, with all
+subsequent lines indented two spaces, and ending with a lone
+close-brace or close-bracket.  Groups may be nested, increasing the
+required indentation of the lines within the nested group to two
+spaces per nesting level.
 
-Unlike ungrouped patterns, grouped patterns are allowed to overlap.
-Conflicts are resolved by selecting the patterns in order.  If all
-of the fixedbits for a pattern match, its translate function will
-be called.  If the translate function returns false, then subsequent
-patterns within the group will be matched.
+Patterns within overlap groups are allowed to overlap.  Conflicts are
+resolved by selecting the patterns in order.  If all of the fixedbits
+for a pattern match, its translate function will be called.  If the
+translate function returns false, then subsequent patterns within the
+group will be matched.
+
+Patterns within no-overlap groups are not allowed to overlap, just
+the same as ungrouped patterns.  Thus no-overlap groups are intended
+to be nested inside overlap groups.
 
 The following example from PA-RISC shows specialization of the *or*
 instruction::
@@ -200,7 +207,7 @@ instruction::
 When the *cf* field is zero, the instruction has no side effects,
 and may be specialized.  When the *rt* field is zero, the output
 is discarded and so the instruction has no effect.  When the *rt2*
-field is zero, the operation is ``reg[rt] | 0`` and so encodes
+field is zero, the operation is ``reg[r1] | 0`` and so encodes
 the canonical register copy operation.
 
 The output from the generator might look like::
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Richard Henderson

When support for this feature went in, the update to the documentation was forgotten.

---
 docs/devel/decodetree.rst | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

docs/devel/decodetree.rst instruction:: · line 211

Quoted 6 lines
docs/devel/decodetree.rst +1 -1
@@ -200,7 +207,7 @@ instruction::
 When the *cf* field is zero, the instruction has no side effects,
 and may be specialized.  When the *rt* field is zero, the output
 is discarded and so the instruction has no effect.  When the *rt2*
-field is zero, the operation is ``reg[rt] | 0`` and so encodes
+field is zero, the operation is ``reg[r1] | 0`` and so encodes
 the canonical register copy operation.

Technically a separate change, but a very small one...

thanks
-- PMM

#2 lore raw
Quoted 24 lines · Peter Maydell
Quoted 12 lines · Richard Henderson

When support for this feature went in, the update to the documentation was forgotten.

---
 docs/devel/decodetree.rst | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

docs/devel/decodetree.rst instruction:: · line 211

Quoted 6 lines
docs/devel/decodetree.rst +1 -1
@@ -200,7 +207,7 @@ instruction::
 When the *cf* field is zero, the instruction has no side effects,
 and may be specialized.  When the *rt* field is zero, the output
 is discarded and so the instruction has no effect.  When the *rt2*
-field is zero, the operation is ``reg[rt] | 0`` and so encodes
+field is zero, the operation is ``reg[r1] | 0`` and so encodes
 the canonical register copy operation.

Technically a separate change, but a very small one...

Quoted 1 line

I'll take this via target-arm.next since I have something else to go into rc3 as well.

-- PMM