summaryrefslogtreecommitdiff
path: root/syntax.md
diff options
context:
space:
mode:
authorDejan Mircevski <deki@google.com>2015-09-11 15:03:54 -0400
committerDavid Neto <dneto@google.com>2015-10-26 12:55:33 -0400
commite3a19c0d633bee53b873f8278d301b6bdc2076de (patch)
tree3becbee22f36ee21e6593d647426516955a3ce80 /syntax.md
parentb30a0c529bfc8c4d71ae536b4d014572c91e901a (diff)
downloadSPIRV-Tools-e3a19c0d633bee53b873f8278d301b6bdc2076de.tar.gz
SPIRV-Tools-e3a19c0d633bee53b873f8278d301b6bdc2076de.tar.bz2
SPIRV-Tools-e3a19c0d633bee53b873f8278d301b6bdc2076de.zip
Forbid !<integer> preceding or succeeding '='.
Diffstat (limited to 'syntax.md')
-rw-r--r--syntax.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/syntax.md b/syntax.md
index e16142e5..ffbe8b55 100644
--- a/syntax.md
+++ b/syntax.md
@@ -138,7 +138,7 @@ encountered, it begins a new instruction and parsing returns to normal. (If a
subsequent OpCode is never found, then this alternate parsing mode handles all
the remaining words in the program. If a subsequent OpCode is in an
[assignment form](#assignment-form), the ID preceding it begins a new
-instruction, even if that ID is itself a `!<integer>`.)
+instruction.)
The assembler processes the words encountered in alternate parsing mode as
follows:
@@ -169,6 +169,10 @@ Note that this has some interesting consequences, including:
by the alternate parsing mode. They must be replaced by `!<integer>` for
successful assembly.
+* The `<result-id>` on the left-hand side of an assignment cannot be
+ a`!<integer>`. But it can be a number prefixed by `%`, which still gives the
+ user control over its value.
+
* The `=` sign cannot be processed by the alternate parsing mode if the OpCode
following it is a `!<integer>`.