Warn about !<integer> opcode in assignment format.
authorDejan Mircevski <deki@google.com>
Mon, 31 Aug 2015 20:19:07 +0000 (16:19 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:52:01 +0000 (12:52 -0400)
readme.md

index 86e6cb2..7121a76 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -105,6 +105,7 @@ OpReturn
 OpFunctionEnd
 ```
 
+<a name="assignment-format"></a>
 In order to improve the text's readability, the `<result-id>` generated by an
 instruction can be moved to the beginning of that instruction and followed by
 an `=` sign. This allows us to distinguish between variable defs and uses and
@@ -240,6 +241,11 @@ Note that this has some interesting consequences, including:
   that named ID being output.  This may be valid SPIR-V, contrary to the
   presumed intention of the writer.
 
+* If the next instruction after a `!<integer>` has the assignment format
+  (described [above](#assignment-format)), then its OpCode cannot also be a
+  `!<integer>`.  The alternate parsing mode cannot handle the assignment format
+  and will complain that `=` is not a valid operand.
+
 ### Disassembler
 
 The standalone disassembler is the binary called `spirv-dis` and is located in