aboutsummaryrefslogtreecommitdiff
path: root/BinaryEncoding.md
diff options
context:
space:
mode:
authortitzer <titzer@google.com>2016-03-04 09:53:13 -0800
committertitzer <titzer@google.com>2016-03-04 09:53:13 -0800
commitd0c0f94022674bafb97f76ba34fc4f01d775f740 (patch)
tree56994b320e9fcd4714d67e08f6e18cf7a3b7d2ed /BinaryEncoding.md
parent0b987cf8d04b563adbdb0822774c8eb972cdb83d (diff)
downloadnanowasm-design-d0c0f94022674bafb97f76ba34fc4f01d775f740.tar.gz
Add default target
Diffstat (limited to 'BinaryEncoding.md')
-rw-r--r--BinaryEncoding.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/BinaryEncoding.md b/BinaryEncoding.md
index e3604ef..5dd6066 100644
--- a/BinaryEncoding.md
+++ b/BinaryEncoding.md
@@ -297,12 +297,13 @@ The `br_table` operator has an immediate operand which is encoded as follows:
| Field | Type | Description |
| ---- | ---- | ---- |
-| target_count | `uint16` | number of targets in the target_table, required to be at least 1 |
+| target_count | `uint16` | number of targets in the target_table |
| target_table | `uint16*` | target entries that indicate an outer block or loop to which to break |
+| default_target | `uint16` | an outer block or loop to which to break in the default case |
The `br_table` operator implements an indirect branch. It accepts one `i32` expression as input and
branches to the block or loop at the given offset within the `target_table`. If the input value is
-out of range, `br_table` branches to the last, default, entry in the table.
+out of range, `br_table` branches to the default target.
## Basic operators ([described here](AstSemantics.md#constants))
| Name | Opcode | Immediate | Description |