From d0c0f94022674bafb97f76ba34fc4f01d775f740 Mon Sep 17 00:00:00 2001 From: titzer Date: Fri, 4 Mar 2016 09:53:13 -0800 Subject: Add default target --- BinaryEncoding.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'BinaryEncoding.md') 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 | -- cgit v1.2.3