OSDN Git Service

* rtl.texi: Add text to docs on ifield-assertions.
authordevans <devans>
Wed, 9 Sep 2009 23:56:15 +0000 (23:56 +0000)
committerdevans <devans>
Wed, 9 Sep 2009 23:56:15 +0000 (23:56 +0000)
cgen/ChangeLog
cgen/doc/rtl.texi

index c633016..83a5651 100644 (file)
@@ -1,5 +1,7 @@
 2009-09-09  Doug Evans  <dje@sebabeach.org>
 
+       * rtl.texi: Add text to docs on ifield-assertions.
+
        * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
        saving.
 
index 2cf9bf2..218a628 100644 (file)
@@ -2109,7 +2109,26 @@ The machine encoding of the operand.
 An assertion of what values any instruction fields will or will not have
 in the containing instruction.
 
-??? A better name for this might be "constraint".
+@anchor{ifield-assertion-rtl}
+The syntax of the assertion is a restricted subset of RTL.
+It may only contain @samp{andif}, @samp{eq}, @samp{ne}, @samp{not},
+and may only use instruction fields and integers as operands.
+As a degenerate case, a single integer, is also supported.
+
+In addition, it may also use @samp{member}.
+
+Syntax: @code{(member ifield-name (value1 [value2 ...]))}
+@footnote{Like all rtx, the full syntax is
+@code{(member [(options)] [BI] ifield-name (value1 [value2 ...]))},
+but @samp{options} and @samp{mode} are not really useful here.}
+
+The result of @samp{member} is one if the value of the ifield
+is a member of the list @code{(value1 [value2 ...])}.
+Otherwise the result is zero.
+
+If the result of the assertion is non-zero, the assertion passes.
+Otherwise it fails, and the instruction is not selected for that
+particular bit pattern.
 
 @subsection getter
 
@@ -2272,6 +2291,9 @@ Format elements can be any of:
 This is an expression with a boolean result that is run as the final
 part of instruction decoding to verify a match.
 
+The syntax of the assertion is a restricted subset of RTL.
+@xref{ifield-assertion-rtl}.
+
 @subsection semantics
 @cindex Semantics