1<!---======================= begin_copyright_notice ============================
2
3Copyright (C) 2020-2021 Intel Corporation
4
5SPDX-License-Identifier: MIT
6
7============================= end_copyright_notice ==========================-->
8
9
10
11## Opcode
12
13  SWITCHJMP = 0x69
14
15## Format
16
17| | | | | | |
18| --- | --- | --- | --- | --- | --- |
19| 0x69(SWITCHJMP) | Exec_size | Num_labels | Index | Label0 | LabelN | Label(Num_labels-1) |
20
21
22## Semantics
23
24
25
26
27                    Jumps to one of the labels based on the index value.
28
29## Description
30
31
32    Implements a multiway branch by performing a jump to one of the labels in the table based on the given index.
33
34- **Exec_size(ub):** Execution size
35
36  - Bit[2..0]: size of the region for source and destination operands
37
38    - 0b000:  1 element (scalar)
39  - Bit[7..4]: execution mask (explicit control over the enabled channels)
40
41    - 0b0000:  M1
42    - 0b0001:  M2
43    - 0b0010:  M3
44    - 0b0011:  M4
45    - 0b0100:  M5
46    - 0b0101:  M6
47    - 0b0110:  M7
48    - 0b0111:  M8
49    - 0b1000:  M1_NM
50    - 0b1001:  M2_NM
51    - 0b1010:  M3_NM
52    - 0b1011:  M4_NM
53    - 0b1100:  M5_NM
54    - 0b1101:  M6_NM
55    - 0b1110:  M7_NM
56    - 0b1111:  M8_NM
57- **Num_labels(ub):** Number of labels in the table. Must be in the range [1..32]
58
59- **Index(scalar):** Index of the label in the table to jump to. It must have unsigned integer type, and its value must be in the range of [0..<num_labels>-1]
60
61- **Label0(uw):** The 0th label in the jump table, represented by the label variable's id. It must be a block label
62
63- **LabelN(uw):** The Nth label in the jump table, represented by the label variable's id. It must be a block label
64
65- **Label(Num_labels-1)(unknown):** The last label in the jump table, represented by the label variable's id. It must be a block label
66
67#### Properties
68
69
70## Text
71```
72
73
74		SWITCHJMP (<exec_size>) <index> (Label0, Label1, ..., LabelN-1)
75```
76
77
78
79## Notes
80
81
82