wa-lang.org/wazero@v1.0.2/internal/wasm/instruction.go (about)

     1  package wasm
     2  
     3  // Opcode is the binary Opcode of an instruction. See also InstructionName
     4  type Opcode = byte
     5  
     6  const (
     7  	// OpcodeUnreachable causes an unconditional trap.
     8  	OpcodeUnreachable Opcode = 0x00
     9  	// OpcodeNop does nothing
    10  	OpcodeNop Opcode = 0x01
    11  	// OpcodeBlock brackets a sequence of instructions. A branch instruction on an if label breaks out to after its
    12  	// OpcodeEnd.
    13  	OpcodeBlock Opcode = 0x02
    14  	// OpcodeLoop brackets a sequence of instructions. A branch instruction on a loop label will jump back to the
    15  	// beginning of its block.
    16  	OpcodeLoop Opcode = 0x03
    17  	// OpcodeIf brackets a sequence of instructions. When the top of the stack evaluates to 1, the block is executed.
    18  	// Zero jumps to the optional OpcodeElse. A branch instruction on an if label breaks out to after its OpcodeEnd.
    19  	OpcodeIf Opcode = 0x04
    20  	// OpcodeElse brackets a sequence of instructions enclosed by an OpcodeIf. A branch instruction on a then label
    21  	// breaks out to after the OpcodeEnd on the enclosing OpcodeIf.
    22  	OpcodeElse Opcode = 0x05
    23  	// OpcodeEnd terminates a control instruction OpcodeBlock, OpcodeLoop or OpcodeIf.
    24  	OpcodeEnd Opcode = 0x0b
    25  
    26  	// OpcodeBr is a stack-polymorphic opcode that performs an unconditional branch. How the stack is modified depends
    27  	// on whether the "br" is enclosed by a loop, and if CoreFeatureMultiValue is enabled.
    28  	//
    29  	// Here are the rules in pseudocode about how the stack is modified based on the "br" operand L (label):
    30  	//	if L is loop: append(L.originalStackWithoutInputs, N-values popped from the stack) where N == L.inputs
    31  	//	else: append(L.originalStackWithoutInputs, N-values popped from the stack) where N == L.results
    32  	//
    33  	// In WebAssembly 1.0 (20191205), N can be zero or one. When CoreFeatureMultiValue is enabled, N can be more than one,
    34  	// depending on the type use of the label L.
    35  	//
    36  	// See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#-hrefsyntax-instr-controlmathsfbrl
    37  	OpcodeBr Opcode = 0x0c
    38  	// ^^ TODO: Add a diagram to help explain br l means that branch into AFTER l for non-loop labels
    39  
    40  	OpcodeBrIf         Opcode = 0x0d
    41  	OpcodeBrTable      Opcode = 0x0e
    42  	OpcodeReturn       Opcode = 0x0f
    43  	OpcodeCall         Opcode = 0x10
    44  	OpcodeCallIndirect Opcode = 0x11
    45  
    46  	// parametric instructions
    47  
    48  	OpcodeDrop        Opcode = 0x1a
    49  	OpcodeSelect      Opcode = 0x1b
    50  	OpcodeTypedSelect Opcode = 0x1c
    51  
    52  	// variable instructions
    53  
    54  	OpcodeLocalGet  Opcode = 0x20
    55  	OpcodeLocalSet  Opcode = 0x21
    56  	OpcodeLocalTee  Opcode = 0x22
    57  	OpcodeGlobalGet Opcode = 0x23
    58  	OpcodeGlobalSet Opcode = 0x24
    59  
    60  	// Below are toggled with CoreFeatureReferenceTypes
    61  
    62  	OpcodeTableGet Opcode = 0x25
    63  	OpcodeTableSet Opcode = 0x26
    64  
    65  	// memory instructions
    66  
    67  	OpcodeI32Load    Opcode = 0x28
    68  	OpcodeI64Load    Opcode = 0x29
    69  	OpcodeF32Load    Opcode = 0x2a
    70  	OpcodeF64Load    Opcode = 0x2b
    71  	OpcodeI32Load8S  Opcode = 0x2c
    72  	OpcodeI32Load8U  Opcode = 0x2d
    73  	OpcodeI32Load16S Opcode = 0x2e
    74  	OpcodeI32Load16U Opcode = 0x2f
    75  	OpcodeI64Load8S  Opcode = 0x30
    76  	OpcodeI64Load8U  Opcode = 0x31
    77  	OpcodeI64Load16S Opcode = 0x32
    78  	OpcodeI64Load16U Opcode = 0x33
    79  	OpcodeI64Load32S Opcode = 0x34
    80  	OpcodeI64Load32U Opcode = 0x35
    81  	OpcodeI32Store   Opcode = 0x36
    82  	OpcodeI64Store   Opcode = 0x37
    83  	OpcodeF32Store   Opcode = 0x38
    84  	OpcodeF64Store   Opcode = 0x39
    85  	OpcodeI32Store8  Opcode = 0x3a
    86  	OpcodeI32Store16 Opcode = 0x3b
    87  	OpcodeI64Store8  Opcode = 0x3c
    88  	OpcodeI64Store16 Opcode = 0x3d
    89  	OpcodeI64Store32 Opcode = 0x3e
    90  	OpcodeMemorySize Opcode = 0x3f
    91  	OpcodeMemoryGrow Opcode = 0x40
    92  
    93  	// const instructions
    94  
    95  	OpcodeI32Const Opcode = 0x41
    96  	OpcodeI64Const Opcode = 0x42
    97  	OpcodeF32Const Opcode = 0x43
    98  	OpcodeF64Const Opcode = 0x44
    99  
   100  	// numeric instructions
   101  
   102  	OpcodeI32Eqz Opcode = 0x45
   103  	OpcodeI32Eq  Opcode = 0x46
   104  	OpcodeI32Ne  Opcode = 0x47
   105  	OpcodeI32LtS Opcode = 0x48
   106  	OpcodeI32LtU Opcode = 0x49
   107  	OpcodeI32GtS Opcode = 0x4a
   108  	OpcodeI32GtU Opcode = 0x4b
   109  	OpcodeI32LeS Opcode = 0x4c
   110  	OpcodeI32LeU Opcode = 0x4d
   111  	OpcodeI32GeS Opcode = 0x4e
   112  	OpcodeI32GeU Opcode = 0x4f
   113  
   114  	OpcodeI64Eqz Opcode = 0x50
   115  	OpcodeI64Eq  Opcode = 0x51
   116  	OpcodeI64Ne  Opcode = 0x52
   117  	OpcodeI64LtS Opcode = 0x53
   118  	OpcodeI64LtU Opcode = 0x54
   119  	OpcodeI64GtS Opcode = 0x55
   120  	OpcodeI64GtU Opcode = 0x56
   121  	OpcodeI64LeS Opcode = 0x57
   122  	OpcodeI64LeU Opcode = 0x58
   123  	OpcodeI64GeS Opcode = 0x59
   124  	OpcodeI64GeU Opcode = 0x5a
   125  
   126  	OpcodeF32Eq Opcode = 0x5b
   127  	OpcodeF32Ne Opcode = 0x5c
   128  	OpcodeF32Lt Opcode = 0x5d
   129  	OpcodeF32Gt Opcode = 0x5e
   130  	OpcodeF32Le Opcode = 0x5f
   131  	OpcodeF32Ge Opcode = 0x60
   132  
   133  	OpcodeF64Eq Opcode = 0x61
   134  	OpcodeF64Ne Opcode = 0x62
   135  	OpcodeF64Lt Opcode = 0x63
   136  	OpcodeF64Gt Opcode = 0x64
   137  	OpcodeF64Le Opcode = 0x65
   138  	OpcodeF64Ge Opcode = 0x66
   139  
   140  	OpcodeI32Clz    Opcode = 0x67
   141  	OpcodeI32Ctz    Opcode = 0x68
   142  	OpcodeI32Popcnt Opcode = 0x69
   143  	OpcodeI32Add    Opcode = 0x6a
   144  	OpcodeI32Sub    Opcode = 0x6b
   145  	OpcodeI32Mul    Opcode = 0x6c
   146  	OpcodeI32DivS   Opcode = 0x6d
   147  	OpcodeI32DivU   Opcode = 0x6e
   148  	OpcodeI32RemS   Opcode = 0x6f
   149  	OpcodeI32RemU   Opcode = 0x70
   150  	OpcodeI32And    Opcode = 0x71
   151  	OpcodeI32Or     Opcode = 0x72
   152  	OpcodeI32Xor    Opcode = 0x73
   153  	OpcodeI32Shl    Opcode = 0x74
   154  	OpcodeI32ShrS   Opcode = 0x75
   155  	OpcodeI32ShrU   Opcode = 0x76
   156  	OpcodeI32Rotl   Opcode = 0x77
   157  	OpcodeI32Rotr   Opcode = 0x78
   158  
   159  	OpcodeI64Clz    Opcode = 0x79
   160  	OpcodeI64Ctz    Opcode = 0x7a
   161  	OpcodeI64Popcnt Opcode = 0x7b
   162  	OpcodeI64Add    Opcode = 0x7c
   163  	OpcodeI64Sub    Opcode = 0x7d
   164  	OpcodeI64Mul    Opcode = 0x7e
   165  	OpcodeI64DivS   Opcode = 0x7f
   166  	OpcodeI64DivU   Opcode = 0x80
   167  	OpcodeI64RemS   Opcode = 0x81
   168  	OpcodeI64RemU   Opcode = 0x82
   169  	OpcodeI64And    Opcode = 0x83
   170  	OpcodeI64Or     Opcode = 0x84
   171  	OpcodeI64Xor    Opcode = 0x85
   172  	OpcodeI64Shl    Opcode = 0x86
   173  	OpcodeI64ShrS   Opcode = 0x87
   174  	OpcodeI64ShrU   Opcode = 0x88
   175  	OpcodeI64Rotl   Opcode = 0x89
   176  	OpcodeI64Rotr   Opcode = 0x8a
   177  
   178  	OpcodeF32Abs      Opcode = 0x8b
   179  	OpcodeF32Neg      Opcode = 0x8c
   180  	OpcodeF32Ceil     Opcode = 0x8d
   181  	OpcodeF32Floor    Opcode = 0x8e
   182  	OpcodeF32Trunc    Opcode = 0x8f
   183  	OpcodeF32Nearest  Opcode = 0x90
   184  	OpcodeF32Sqrt     Opcode = 0x91
   185  	OpcodeF32Add      Opcode = 0x92
   186  	OpcodeF32Sub      Opcode = 0x93
   187  	OpcodeF32Mul      Opcode = 0x94
   188  	OpcodeF32Div      Opcode = 0x95
   189  	OpcodeF32Min      Opcode = 0x96
   190  	OpcodeF32Max      Opcode = 0x97
   191  	OpcodeF32Copysign Opcode = 0x98
   192  
   193  	OpcodeF64Abs      Opcode = 0x99
   194  	OpcodeF64Neg      Opcode = 0x9a
   195  	OpcodeF64Ceil     Opcode = 0x9b
   196  	OpcodeF64Floor    Opcode = 0x9c
   197  	OpcodeF64Trunc    Opcode = 0x9d
   198  	OpcodeF64Nearest  Opcode = 0x9e
   199  	OpcodeF64Sqrt     Opcode = 0x9f
   200  	OpcodeF64Add      Opcode = 0xa0
   201  	OpcodeF64Sub      Opcode = 0xa1
   202  	OpcodeF64Mul      Opcode = 0xa2
   203  	OpcodeF64Div      Opcode = 0xa3
   204  	OpcodeF64Min      Opcode = 0xa4
   205  	OpcodeF64Max      Opcode = 0xa5
   206  	OpcodeF64Copysign Opcode = 0xa6
   207  
   208  	OpcodeI32WrapI64   Opcode = 0xa7
   209  	OpcodeI32TruncF32S Opcode = 0xa8
   210  	OpcodeI32TruncF32U Opcode = 0xa9
   211  	OpcodeI32TruncF64S Opcode = 0xaa
   212  	OpcodeI32TruncF64U Opcode = 0xab
   213  
   214  	OpcodeI64ExtendI32S Opcode = 0xac
   215  	OpcodeI64ExtendI32U Opcode = 0xad
   216  	OpcodeI64TruncF32S  Opcode = 0xae
   217  	OpcodeI64TruncF32U  Opcode = 0xaf
   218  	OpcodeI64TruncF64S  Opcode = 0xb0
   219  	OpcodeI64TruncF64U  Opcode = 0xb1
   220  
   221  	OpcodeF32ConvertI32S Opcode = 0xb2
   222  	OpcodeF32ConvertI32U Opcode = 0xb3
   223  	OpcodeF32ConvertI64S Opcode = 0xb4
   224  	OpcodeF32ConvertI64U Opcode = 0xb5
   225  	OpcodeF32DemoteF64   Opcode = 0xb6
   226  
   227  	OpcodeF64ConvertI32S Opcode = 0xb7
   228  	OpcodeF64ConvertI32U Opcode = 0xb8
   229  	OpcodeF64ConvertI64S Opcode = 0xb9
   230  	OpcodeF64ConvertI64U Opcode = 0xba
   231  	OpcodeF64PromoteF32  Opcode = 0xbb
   232  
   233  	OpcodeI32ReinterpretF32 Opcode = 0xbc
   234  	OpcodeI64ReinterpretF64 Opcode = 0xbd
   235  	OpcodeF32ReinterpretI32 Opcode = 0xbe
   236  	OpcodeF64ReinterpretI64 Opcode = 0xbf
   237  
   238  	// OpcodeRefNull pushes a null reference value whose type is specified by immediate to this opcode.
   239  	// This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well.
   240  	//
   241  	// Currently only supported in the constant expression in element segments.
   242  	OpcodeRefNull = 0xd0
   243  	// OpcodeRefIsNull pops a reference value, and pushes 1 if it is null, 0 otherwise.
   244  	// This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well.
   245  	//
   246  	// Currently not supported.
   247  	OpcodeRefIsNull = 0xd1
   248  	// OpcodeRefFunc pushes a funcref value whose index equals the immediate to this opcode.
   249  	// This is defined in the reference-types proposal, but necessary for CoreFeatureBulkMemoryOperations as well.
   250  	//
   251  	// Currently, this is only supported in the constant expression in element segments.
   252  	OpcodeRefFunc = 0xd2
   253  
   254  	// Below are toggled with CoreFeatureSignExtensionOps
   255  
   256  	// OpcodeI32Extend8S extends a signed 8-bit integer to a 32-bit integer.
   257  	// Note: This is dependent on the flag CoreFeatureSignExtensionOps
   258  	OpcodeI32Extend8S Opcode = 0xc0
   259  
   260  	// OpcodeI32Extend16S extends a signed 16-bit integer to a 32-bit integer.
   261  	// Note: This is dependent on the flag CoreFeatureSignExtensionOps
   262  	OpcodeI32Extend16S Opcode = 0xc1
   263  
   264  	// OpcodeI64Extend8S extends a signed 8-bit integer to a 64-bit integer.
   265  	// Note: This is dependent on the flag CoreFeatureSignExtensionOps
   266  	OpcodeI64Extend8S Opcode = 0xc2
   267  
   268  	// OpcodeI64Extend16S extends a signed 16-bit integer to a 64-bit integer.
   269  	// Note: This is dependent on the flag CoreFeatureSignExtensionOps
   270  	OpcodeI64Extend16S Opcode = 0xc3
   271  
   272  	// OpcodeI64Extend32S extends a signed 32-bit integer to a 64-bit integer.
   273  	// Note: This is dependent on the flag CoreFeatureSignExtensionOps
   274  	OpcodeI64Extend32S Opcode = 0xc4
   275  
   276  	// OpcodeMiscPrefix is the prefix of various multi-byte opcodes.
   277  	// Introduced in CoreFeatureNonTrappingFloatToIntConversion, but used in other
   278  	// features, such as CoreFeatureBulkMemoryOperations.
   279  	OpcodeMiscPrefix Opcode = 0xfc
   280  
   281  	// OpcodeVecPrefix is the prefix of all vector isntructions introduced in
   282  	// CoreFeatureSIMD.
   283  	OpcodeVecPrefix Opcode = 0xfd
   284  )
   285  
   286  // OpcodeMisc represents opcodes of the miscellaneous operations.
   287  // Such an operations has multi-byte encoding which is prefixed by OpcodeMiscPrefix.
   288  type OpcodeMisc = byte
   289  
   290  const (
   291  	// Below are toggled with CoreFeatureNonTrappingFloatToIntConversion.
   292  	// https://github.com/WebAssembly/spec/blob/ce4b6c4d47eb06098cc7ab2e81f24748da822f20/proposals/nontrapping-float-to-int-conversion/Overview.md
   293  
   294  	OpcodeMiscI32TruncSatF32S OpcodeMisc = 0x00
   295  	OpcodeMiscI32TruncSatF32U OpcodeMisc = 0x01
   296  	OpcodeMiscI32TruncSatF64S OpcodeMisc = 0x02
   297  	OpcodeMiscI32TruncSatF64U OpcodeMisc = 0x03
   298  	OpcodeMiscI64TruncSatF32S OpcodeMisc = 0x04
   299  	OpcodeMiscI64TruncSatF32U OpcodeMisc = 0x05
   300  	OpcodeMiscI64TruncSatF64S OpcodeMisc = 0x06
   301  	OpcodeMiscI64TruncSatF64U OpcodeMisc = 0x07
   302  
   303  	// Below are toggled with CoreFeatureBulkMemoryOperations.
   304  	// Opcodes are those new in document/core/appendix/index-instructions.rst (the commit that merged the feature).
   305  	// See https://github.com/WebAssembly/spec/commit/7fa2f20a6df4cf1c114582c8cb60f5bfcdbf1be1
   306  	// See https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/appendix/changes.html#bulk-memory-and-table-instructions
   307  
   308  	OpcodeMiscMemoryInit OpcodeMisc = 0x08
   309  	OpcodeMiscDataDrop   OpcodeMisc = 0x09
   310  	OpcodeMiscMemoryCopy OpcodeMisc = 0x0a
   311  	OpcodeMiscMemoryFill OpcodeMisc = 0x0b
   312  	OpcodeMiscTableInit  OpcodeMisc = 0x0c
   313  	OpcodeMiscElemDrop   OpcodeMisc = 0x0d
   314  	OpcodeMiscTableCopy  OpcodeMisc = 0x0e
   315  
   316  	// Below are toggled with CoreFeatureReferenceTypes
   317  
   318  	OpcodeMiscTableGrow OpcodeMisc = 0x0f
   319  	OpcodeMiscTableSize OpcodeMisc = 0x10
   320  	OpcodeMiscTableFill OpcodeMisc = 0x11
   321  )
   322  
   323  // OpcodeVec represents an opcode of a vector instructions which has
   324  // multi-byte encoding and is prefixed by OpcodeMiscPrefix.
   325  //
   326  // These opcodes are toggled with CoreFeatureSIMD.
   327  type OpcodeVec = byte
   328  
   329  const (
   330  	// Loads and stores.
   331  
   332  	OpcodeVecV128Load        OpcodeVec = 0x00
   333  	OpcodeVecV128Load8x8s    OpcodeVec = 0x01
   334  	OpcodeVecV128Load8x8u    OpcodeVec = 0x02
   335  	OpcodeVecV128Load16x4s   OpcodeVec = 0x03
   336  	OpcodeVecV128Load16x4u   OpcodeVec = 0x04
   337  	OpcodeVecV128Load32x2s   OpcodeVec = 0x05
   338  	OpcodeVecV128Load32x2u   OpcodeVec = 0x06
   339  	OpcodeVecV128Load8Splat  OpcodeVec = 0x07
   340  	OpcodeVecV128Load16Splat OpcodeVec = 0x08
   341  	OpcodeVecV128Load32Splat OpcodeVec = 0x09
   342  	OpcodeVecV128Load64Splat OpcodeVec = 0x0a
   343  
   344  	OpcodeVecV128Load32zero OpcodeVec = 0x5c
   345  	OpcodeVecV128Load64zero OpcodeVec = 0x5d
   346  
   347  	OpcodeVecV128Store       OpcodeVec = 0x0b
   348  	OpcodeVecV128Load8Lane   OpcodeVec = 0x54
   349  	OpcodeVecV128Load16Lane  OpcodeVec = 0x55
   350  	OpcodeVecV128Load32Lane  OpcodeVec = 0x56
   351  	OpcodeVecV128Load64Lane  OpcodeVec = 0x57
   352  	OpcodeVecV128Store8Lane  OpcodeVec = 0x58
   353  	OpcodeVecV128Store16Lane OpcodeVec = 0x59
   354  	OpcodeVecV128Store32Lane OpcodeVec = 0x5a
   355  	OpcodeVecV128Store64Lane OpcodeVec = 0x5b
   356  
   357  	// OpcodeVecV128Const is the vector const instruction.
   358  	OpcodeVecV128Const OpcodeVec = 0x0c
   359  
   360  	// OpcodeVecV128i8x16Shuffle is the vector shuffle instruction.
   361  	OpcodeVecV128i8x16Shuffle OpcodeVec = 0x0d
   362  
   363  	// Extrac and replaces.
   364  
   365  	OpcodeVecI8x16ExtractLaneS OpcodeVec = 0x15
   366  	OpcodeVecI8x16ExtractLaneU OpcodeVec = 0x16
   367  	OpcodeVecI8x16ReplaceLane  OpcodeVec = 0x17
   368  	OpcodeVecI16x8ExtractLaneS OpcodeVec = 0x18
   369  	OpcodeVecI16x8ExtractLaneU OpcodeVec = 0x19
   370  	OpcodeVecI16x8ReplaceLane  OpcodeVec = 0x1a
   371  	OpcodeVecI32x4ExtractLane  OpcodeVec = 0x1b
   372  	OpcodeVecI32x4ReplaceLane  OpcodeVec = 0x1c
   373  	OpcodeVecI64x2ExtractLane  OpcodeVec = 0x1d
   374  	OpcodeVecI64x2ReplaceLane  OpcodeVec = 0x1e
   375  	OpcodeVecF32x4ExtractLane  OpcodeVec = 0x1f
   376  	OpcodeVecF32x4ReplaceLane  OpcodeVec = 0x20
   377  	OpcodeVecF64x2ExtractLane  OpcodeVec = 0x21
   378  	OpcodeVecF64x2ReplaceLane  OpcodeVec = 0x22
   379  
   380  	// Splat and swizzle.
   381  
   382  	OpcodeVecI8x16Swizzle OpcodeVec = 0x0e
   383  	OpcodeVecI8x16Splat   OpcodeVec = 0x0f
   384  	OpcodeVecI16x8Splat   OpcodeVec = 0x10
   385  	OpcodeVecI32x4Splat   OpcodeVec = 0x11
   386  	OpcodeVecI64x2Splat   OpcodeVec = 0x12
   387  	OpcodeVecF32x4Splat   OpcodeVec = 0x13
   388  	OpcodeVecF64x2Splat   OpcodeVec = 0x14
   389  
   390  	// i8 comparisons.
   391  
   392  	OpcodeVecI8x16Eq  OpcodeVec = 0x23
   393  	OpcodeVecI8x16Ne  OpcodeVec = 0x24
   394  	OpcodeVecI8x16LtS OpcodeVec = 0x25
   395  	OpcodeVecI8x16LtU OpcodeVec = 0x26
   396  	OpcodeVecI8x16GtS OpcodeVec = 0x27
   397  	OpcodeVecI8x16GtU OpcodeVec = 0x28
   398  	OpcodeVecI8x16LeS OpcodeVec = 0x29
   399  	OpcodeVecI8x16LeU OpcodeVec = 0x2a
   400  	OpcodeVecI8x16GeS OpcodeVec = 0x2b
   401  	OpcodeVecI8x16GeU OpcodeVec = 0x2c
   402  
   403  	// i16 comparisons.
   404  
   405  	OpcodeVecI16x8Eq  OpcodeVec = 0x2d
   406  	OpcodeVecI16x8Ne  OpcodeVec = 0x2e
   407  	OpcodeVecI16x8LtS OpcodeVec = 0x2f
   408  	OpcodeVecI16x8LtU OpcodeVec = 0x30
   409  	OpcodeVecI16x8GtS OpcodeVec = 0x31
   410  	OpcodeVecI16x8GtU OpcodeVec = 0x32
   411  	OpcodeVecI16x8LeS OpcodeVec = 0x33
   412  	OpcodeVecI16x8LeU OpcodeVec = 0x34
   413  	OpcodeVecI16x8GeS OpcodeVec = 0x35
   414  	OpcodeVecI16x8GeU OpcodeVec = 0x36
   415  
   416  	// i32 comparisons.
   417  
   418  	OpcodeVecI32x4Eq  OpcodeVec = 0x37
   419  	OpcodeVecI32x4Ne  OpcodeVec = 0x38
   420  	OpcodeVecI32x4LtS OpcodeVec = 0x39
   421  	OpcodeVecI32x4LtU OpcodeVec = 0x3a
   422  	OpcodeVecI32x4GtS OpcodeVec = 0x3b
   423  	OpcodeVecI32x4GtU OpcodeVec = 0x3c
   424  	OpcodeVecI32x4LeS OpcodeVec = 0x3d
   425  	OpcodeVecI32x4LeU OpcodeVec = 0x3e
   426  	OpcodeVecI32x4GeS OpcodeVec = 0x3f
   427  	OpcodeVecI32x4GeU OpcodeVec = 0x40
   428  
   429  	// i64 comparisons.
   430  
   431  	OpcodeVecI64x2Eq  OpcodeVec = 0xd6
   432  	OpcodeVecI64x2Ne  OpcodeVec = 0xd7
   433  	OpcodeVecI64x2LtS OpcodeVec = 0xd8
   434  	OpcodeVecI64x2GtS OpcodeVec = 0xd9
   435  	OpcodeVecI64x2LeS OpcodeVec = 0xda
   436  	OpcodeVecI64x2GeS OpcodeVec = 0xdb
   437  
   438  	// f32 comparisons.
   439  
   440  	OpcodeVecF32x4Eq OpcodeVec = 0x41
   441  	OpcodeVecF32x4Ne OpcodeVec = 0x42
   442  	OpcodeVecF32x4Lt OpcodeVec = 0x43
   443  	OpcodeVecF32x4Gt OpcodeVec = 0x44
   444  	OpcodeVecF32x4Le OpcodeVec = 0x45
   445  	OpcodeVecF32x4Ge OpcodeVec = 0x46
   446  
   447  	// f64 comparisons.
   448  
   449  	OpcodeVecF64x2Eq OpcodeVec = 0x47
   450  	OpcodeVecF64x2Ne OpcodeVec = 0x48
   451  	OpcodeVecF64x2Lt OpcodeVec = 0x49
   452  	OpcodeVecF64x2Gt OpcodeVec = 0x4a
   453  	OpcodeVecF64x2Le OpcodeVec = 0x4b
   454  	OpcodeVecF64x2Ge OpcodeVec = 0x4c
   455  
   456  	// v128 logical instructions.
   457  
   458  	OpcodeVecV128Not       OpcodeVec = 0x4d
   459  	OpcodeVecV128And       OpcodeVec = 0x4e
   460  	OpcodeVecV128AndNot    OpcodeVec = 0x4f
   461  	OpcodeVecV128Or        OpcodeVec = 0x50
   462  	OpcodeVecV128Xor       OpcodeVec = 0x51
   463  	OpcodeVecV128Bitselect OpcodeVec = 0x52
   464  	OpcodeVecV128AnyTrue   OpcodeVec = 0x53
   465  
   466  	// i8 misc.
   467  
   468  	OpcodeVecI8x16Abs          OpcodeVec = 0x60
   469  	OpcodeVecI8x16Neg          OpcodeVec = 0x61
   470  	OpcodeVecI8x16Popcnt       OpcodeVec = 0x62
   471  	OpcodeVecI8x16AllTrue      OpcodeVec = 0x63
   472  	OpcodeVecI8x16BitMask      OpcodeVec = 0x64
   473  	OpcodeVecI8x16NarrowI16x8S OpcodeVec = 0x65
   474  	OpcodeVecI8x16NarrowI16x8U OpcodeVec = 0x66
   475  
   476  	OpcodeVecI8x16Shl     OpcodeVec = 0x6b
   477  	OpcodeVecI8x16ShrS    OpcodeVec = 0x6c
   478  	OpcodeVecI8x16ShrU    OpcodeVec = 0x6d
   479  	OpcodeVecI8x16Add     OpcodeVec = 0x6e
   480  	OpcodeVecI8x16AddSatS OpcodeVec = 0x6f
   481  
   482  	OpcodeVecI8x16AddSatU OpcodeVec = 0x70
   483  	OpcodeVecI8x16Sub     OpcodeVec = 0x71
   484  	OpcodeVecI8x16SubSatS OpcodeVec = 0x72
   485  	OpcodeVecI8x16SubSatU OpcodeVec = 0x73
   486  	OpcodeVecI8x16MinS    OpcodeVec = 0x76
   487  	OpcodeVecI8x16MinU    OpcodeVec = 0x77
   488  	OpcodeVecI8x16MaxS    OpcodeVec = 0x78
   489  	OpcodeVecI8x16MaxU    OpcodeVec = 0x79
   490  	OpcodeVecI8x16AvgrU   OpcodeVec = 0x7b
   491  
   492  	// i16 misc.
   493  
   494  	OpcodeVecI16x8ExtaddPairwiseI8x16S OpcodeVec = 0x7c
   495  	OpcodeVecI16x8ExtaddPairwiseI8x16U OpcodeVec = 0x7d
   496  	OpcodeVecI16x8Abs                  OpcodeVec = 0x80
   497  	OpcodeVecI16x8Neg                  OpcodeVec = 0x81
   498  	OpcodeVecI16x8Q15mulrSatS          OpcodeVec = 0x82
   499  	OpcodeVecI16x8AllTrue              OpcodeVec = 0x83
   500  	OpcodeVecI16x8BitMask              OpcodeVec = 0x84
   501  	OpcodeVecI16x8NarrowI32x4S         OpcodeVec = 0x85
   502  	OpcodeVecI16x8NarrowI32x4U         OpcodeVec = 0x86
   503  	OpcodeVecI16x8ExtendLowI8x16S      OpcodeVec = 0x87
   504  	OpcodeVecI16x8ExtendHighI8x16S     OpcodeVec = 0x88
   505  	OpcodeVecI16x8ExtendLowI8x16U      OpcodeVec = 0x89
   506  	OpcodeVecI16x8ExtendHighI8x16U     OpcodeVec = 0x8a
   507  	OpcodeVecI16x8Shl                  OpcodeVec = 0x8b
   508  	OpcodeVecI16x8ShrS                 OpcodeVec = 0x8c
   509  	OpcodeVecI16x8ShrU                 OpcodeVec = 0x8d
   510  	OpcodeVecI16x8Add                  OpcodeVec = 0x8e
   511  	OpcodeVecI16x8AddSatS              OpcodeVec = 0x8f
   512  	OpcodeVecI16x8AddSatU              OpcodeVec = 0x90
   513  	OpcodeVecI16x8Sub                  OpcodeVec = 0x91
   514  	OpcodeVecI16x8SubSatS              OpcodeVec = 0x92
   515  	OpcodeVecI16x8SubSatU              OpcodeVec = 0x93
   516  	OpcodeVecI16x8Mul                  OpcodeVec = 0x95
   517  	OpcodeVecI16x8MinS                 OpcodeVec = 0x96
   518  	OpcodeVecI16x8MinU                 OpcodeVec = 0x97
   519  	OpcodeVecI16x8MaxS                 OpcodeVec = 0x98
   520  	OpcodeVecI16x8MaxU                 OpcodeVec = 0x99
   521  	OpcodeVecI16x8AvgrU                OpcodeVec = 0x9b
   522  	OpcodeVecI16x8ExtMulLowI8x16S      OpcodeVec = 0x9c
   523  	OpcodeVecI16x8ExtMulHighI8x16S     OpcodeVec = 0x9d
   524  	OpcodeVecI16x8ExtMulLowI8x16U      OpcodeVec = 0x9e
   525  	OpcodeVecI16x8ExtMulHighI8x16U     OpcodeVec = 0x9f
   526  
   527  	// i32 misc.
   528  
   529  	OpcodeVecI32x4ExtaddPairwiseI16x8S OpcodeVec = 0x7e
   530  	OpcodeVecI32x4ExtaddPairwiseI16x8U OpcodeVec = 0x7f
   531  	OpcodeVecI32x4Abs                  OpcodeVec = 0xa0
   532  	OpcodeVecI32x4Neg                  OpcodeVec = 0xa1
   533  	OpcodeVecI32x4AllTrue              OpcodeVec = 0xa3
   534  	OpcodeVecI32x4BitMask              OpcodeVec = 0xa4
   535  	OpcodeVecI32x4ExtendLowI16x8S      OpcodeVec = 0xa7
   536  	OpcodeVecI32x4ExtendHighI16x8S     OpcodeVec = 0xa8
   537  	OpcodeVecI32x4ExtendLowI16x8U      OpcodeVec = 0xa9
   538  	OpcodeVecI32x4ExtendHighI16x8U     OpcodeVec = 0xaa
   539  	OpcodeVecI32x4Shl                  OpcodeVec = 0xab
   540  	OpcodeVecI32x4ShrS                 OpcodeVec = 0xac
   541  	OpcodeVecI32x4ShrU                 OpcodeVec = 0xad
   542  	OpcodeVecI32x4Add                  OpcodeVec = 0xae
   543  	OpcodeVecI32x4Sub                  OpcodeVec = 0xb1
   544  	OpcodeVecI32x4Mul                  OpcodeVec = 0xb5
   545  	OpcodeVecI32x4MinS                 OpcodeVec = 0xb6
   546  	OpcodeVecI32x4MinU                 OpcodeVec = 0xb7
   547  	OpcodeVecI32x4MaxS                 OpcodeVec = 0xb8
   548  	OpcodeVecI32x4MaxU                 OpcodeVec = 0xb9
   549  	OpcodeVecI32x4DotI16x8S            OpcodeVec = 0xba
   550  	OpcodeVecI32x4ExtMulLowI16x8S      OpcodeVec = 0xbc
   551  	OpcodeVecI32x4ExtMulHighI16x8S     OpcodeVec = 0xbd
   552  	OpcodeVecI32x4ExtMulLowI16x8U      OpcodeVec = 0xbe
   553  	OpcodeVecI32x4ExtMulHighI16x8U     OpcodeVec = 0xbf
   554  
   555  	// i64 misc.
   556  
   557  	OpcodeVecI64x2Abs              OpcodeVec = 0xc0
   558  	OpcodeVecI64x2Neg              OpcodeVec = 0xc1
   559  	OpcodeVecI64x2AllTrue          OpcodeVec = 0xc3
   560  	OpcodeVecI64x2BitMask          OpcodeVec = 0xc4
   561  	OpcodeVecI64x2ExtendLowI32x4S  OpcodeVec = 0xc7
   562  	OpcodeVecI64x2ExtendHighI32x4S OpcodeVec = 0xc8
   563  	OpcodeVecI64x2ExtendLowI32x4U  OpcodeVec = 0xc9
   564  	OpcodeVecI64x2ExtendHighI32x4U OpcodeVec = 0xca
   565  	OpcodeVecI64x2Shl              OpcodeVec = 0xcb
   566  	OpcodeVecI64x2ShrS             OpcodeVec = 0xcc
   567  	OpcodeVecI64x2ShrU             OpcodeVec = 0xcd
   568  	OpcodeVecI64x2Add              OpcodeVec = 0xce
   569  	OpcodeVecI64x2Sub              OpcodeVec = 0xd1
   570  	OpcodeVecI64x2Mul              OpcodeVec = 0xd5
   571  	OpcodeVecI64x2ExtMulLowI32x4S  OpcodeVec = 0xdc
   572  	OpcodeVecI64x2ExtMulHighI32x4S OpcodeVec = 0xdd
   573  	OpcodeVecI64x2ExtMulLowI32x4U  OpcodeVec = 0xde
   574  	OpcodeVecI64x2ExtMulHighI32x4U OpcodeVec = 0xdf
   575  
   576  	// f32 misc.
   577  
   578  	OpcodeVecF32x4Ceil    OpcodeVec = 0x67
   579  	OpcodeVecF32x4Floor   OpcodeVec = 0x68
   580  	OpcodeVecF32x4Trunc   OpcodeVec = 0x69
   581  	OpcodeVecF32x4Nearest OpcodeVec = 0x6a
   582  	OpcodeVecF32x4Abs     OpcodeVec = 0xe0
   583  	OpcodeVecF32x4Neg     OpcodeVec = 0xe1
   584  	OpcodeVecF32x4Sqrt    OpcodeVec = 0xe3
   585  	OpcodeVecF32x4Add     OpcodeVec = 0xe4
   586  	OpcodeVecF32x4Sub     OpcodeVec = 0xe5
   587  	OpcodeVecF32x4Mul     OpcodeVec = 0xe6
   588  	OpcodeVecF32x4Div     OpcodeVec = 0xe7
   589  	OpcodeVecF32x4Min     OpcodeVec = 0xe8
   590  	OpcodeVecF32x4Max     OpcodeVec = 0xe9
   591  	OpcodeVecF32x4Pmin    OpcodeVec = 0xea
   592  	OpcodeVecF32x4Pmax    OpcodeVec = 0xeb
   593  
   594  	// f64 misc.
   595  
   596  	OpcodeVecF64x2Ceil    OpcodeVec = 0x74
   597  	OpcodeVecF64x2Floor   OpcodeVec = 0x75
   598  	OpcodeVecF64x2Trunc   OpcodeVec = 0x7a
   599  	OpcodeVecF64x2Nearest OpcodeVec = 0x94
   600  	OpcodeVecF64x2Abs     OpcodeVec = 0xec
   601  	OpcodeVecF64x2Neg     OpcodeVec = 0xed
   602  	OpcodeVecF64x2Sqrt    OpcodeVec = 0xef
   603  	OpcodeVecF64x2Add     OpcodeVec = 0xf0
   604  	OpcodeVecF64x2Sub     OpcodeVec = 0xf1
   605  	OpcodeVecF64x2Mul     OpcodeVec = 0xf2
   606  	OpcodeVecF64x2Div     OpcodeVec = 0xf3
   607  	OpcodeVecF64x2Min     OpcodeVec = 0xf4
   608  	OpcodeVecF64x2Max     OpcodeVec = 0xf5
   609  	OpcodeVecF64x2Pmin    OpcodeVec = 0xf6
   610  	OpcodeVecF64x2Pmax    OpcodeVec = 0xf7
   611  
   612  	// conversions.
   613  
   614  	OpcodeVecI32x4TruncSatF32x4S      OpcodeVec = 0xf8
   615  	OpcodeVecI32x4TruncSatF32x4U      OpcodeVec = 0xf9
   616  	OpcodeVecF32x4ConvertI32x4S       OpcodeVec = 0xfa
   617  	OpcodeVecF32x4ConvertI32x4U       OpcodeVec = 0xfb
   618  	OpcodeVecI32x4TruncSatF64x2SZero  OpcodeVec = 0xfc
   619  	OpcodeVecI32x4TruncSatF64x2UZero  OpcodeVec = 0xfd
   620  	OpcodeVecF64x2ConvertLowI32x4S    OpcodeVec = 0xfe
   621  	OpcodeVecF64x2ConvertLowI32x4U    OpcodeVec = 0xff
   622  	OpcodeVecF32x4DemoteF64x2Zero     OpcodeVec = 0x5e
   623  	OpcodeVecF64x2PromoteLowF32x4Zero OpcodeVec = 0x5f
   624  )
   625  
   626  const (
   627  	OpcodeUnreachableName       = "unreachable"
   628  	OpcodeNopName               = "nop"
   629  	OpcodeBlockName             = "block"
   630  	OpcodeLoopName              = "loop"
   631  	OpcodeIfName                = "if"
   632  	OpcodeElseName              = "else"
   633  	OpcodeEndName               = "end"
   634  	OpcodeBrName                = "br"
   635  	OpcodeBrIfName              = "br_if"
   636  	OpcodeBrTableName           = "br_table"
   637  	OpcodeReturnName            = "return"
   638  	OpcodeCallName              = "call"
   639  	OpcodeCallIndirectName      = "call_indirect"
   640  	OpcodeDropName              = "drop"
   641  	OpcodeSelectName            = "select"
   642  	OpcodeTypedSelectName       = "typed_select"
   643  	OpcodeLocalGetName          = "local.get"
   644  	OpcodeLocalSetName          = "local.set"
   645  	OpcodeLocalTeeName          = "local.tee"
   646  	OpcodeGlobalGetName         = "global.get"
   647  	OpcodeGlobalSetName         = "global.set"
   648  	OpcodeI32LoadName           = "i32.load"
   649  	OpcodeI64LoadName           = "i64.load"
   650  	OpcodeF32LoadName           = "f32.load"
   651  	OpcodeF64LoadName           = "f64.load"
   652  	OpcodeI32Load8SName         = "i32.load8_s"
   653  	OpcodeI32Load8UName         = "i32.load8_u"
   654  	OpcodeI32Load16SName        = "i32.load16_s"
   655  	OpcodeI32Load16UName        = "i32.load16_u"
   656  	OpcodeI64Load8SName         = "i64.load8_s"
   657  	OpcodeI64Load8UName         = "i64.load8_u"
   658  	OpcodeI64Load16SName        = "i64.load16_s"
   659  	OpcodeI64Load16UName        = "i64.load16_u"
   660  	OpcodeI64Load32SName        = "i64.load32_s"
   661  	OpcodeI64Load32UName        = "i64.load32_u"
   662  	OpcodeI32StoreName          = "i32.store"
   663  	OpcodeI64StoreName          = "i64.store"
   664  	OpcodeF32StoreName          = "f32.store"
   665  	OpcodeF64StoreName          = "f64.store"
   666  	OpcodeI32Store8Name         = "i32.store8"
   667  	OpcodeI32Store16Name        = "i32.store16"
   668  	OpcodeI64Store8Name         = "i64.store8"
   669  	OpcodeI64Store16Name        = "i64.store16"
   670  	OpcodeI64Store32Name        = "i64.store32"
   671  	OpcodeMemorySizeName        = "memory.size"
   672  	OpcodeMemoryGrowName        = "memory.grow"
   673  	OpcodeI32ConstName          = "i32.const"
   674  	OpcodeI64ConstName          = "i64.const"
   675  	OpcodeF32ConstName          = "f32.const"
   676  	OpcodeF64ConstName          = "f64.const"
   677  	OpcodeI32EqzName            = "i32.eqz"
   678  	OpcodeI32EqName             = "i32.eq"
   679  	OpcodeI32NeName             = "i32.ne"
   680  	OpcodeI32LtSName            = "i32.lt_s"
   681  	OpcodeI32LtUName            = "i32.lt_u"
   682  	OpcodeI32GtSName            = "i32.gt_s"
   683  	OpcodeI32GtUName            = "i32.gt_u"
   684  	OpcodeI32LeSName            = "i32.le_s"
   685  	OpcodeI32LeUName            = "i32.le_u"
   686  	OpcodeI32GeSName            = "i32.ge_s"
   687  	OpcodeI32GeUName            = "i32.ge_u"
   688  	OpcodeI64EqzName            = "i64.eqz"
   689  	OpcodeI64EqName             = "i64.eq"
   690  	OpcodeI64NeName             = "i64.ne"
   691  	OpcodeI64LtSName            = "i64.lt_s"
   692  	OpcodeI64LtUName            = "i64.lt_u"
   693  	OpcodeI64GtSName            = "i64.gt_s"
   694  	OpcodeI64GtUName            = "i64.gt_u"
   695  	OpcodeI64LeSName            = "i64.le_s"
   696  	OpcodeI64LeUName            = "i64.le_u"
   697  	OpcodeI64GeSName            = "i64.ge_s"
   698  	OpcodeI64GeUName            = "i64.ge_u"
   699  	OpcodeF32EqName             = "f32.eq"
   700  	OpcodeF32NeName             = "f32.ne"
   701  	OpcodeF32LtName             = "f32.lt"
   702  	OpcodeF32GtName             = "f32.gt"
   703  	OpcodeF32LeName             = "f32.le"
   704  	OpcodeF32GeName             = "f32.ge"
   705  	OpcodeF64EqName             = "f64.eq"
   706  	OpcodeF64NeName             = "f64.ne"
   707  	OpcodeF64LtName             = "f64.lt"
   708  	OpcodeF64GtName             = "f64.gt"
   709  	OpcodeF64LeName             = "f64.le"
   710  	OpcodeF64GeName             = "f64.ge"
   711  	OpcodeI32ClzName            = "i32.clz"
   712  	OpcodeI32CtzName            = "i32.ctz"
   713  	OpcodeI32PopcntName         = "i32.popcnt"
   714  	OpcodeI32AddName            = "i32.add"
   715  	OpcodeI32SubName            = "i32.sub"
   716  	OpcodeI32MulName            = "i32.mul"
   717  	OpcodeI32DivSName           = "i32.div_s"
   718  	OpcodeI32DivUName           = "i32.div_u"
   719  	OpcodeI32RemSName           = "i32.rem_s"
   720  	OpcodeI32RemUName           = "i32.rem_u"
   721  	OpcodeI32AndName            = "i32.and"
   722  	OpcodeI32OrName             = "i32.or"
   723  	OpcodeI32XorName            = "i32.xor"
   724  	OpcodeI32ShlName            = "i32.shl"
   725  	OpcodeI32ShrSName           = "i32.shr_s"
   726  	OpcodeI32ShrUName           = "i32.shr_u"
   727  	OpcodeI32RotlName           = "i32.rotl"
   728  	OpcodeI32RotrName           = "i32.rotr"
   729  	OpcodeI64ClzName            = "i64.clz"
   730  	OpcodeI64CtzName            = "i64.ctz"
   731  	OpcodeI64PopcntName         = "i64.popcnt"
   732  	OpcodeI64AddName            = "i64.add"
   733  	OpcodeI64SubName            = "i64.sub"
   734  	OpcodeI64MulName            = "i64.mul"
   735  	OpcodeI64DivSName           = "i64.div_s"
   736  	OpcodeI64DivUName           = "i64.div_u"
   737  	OpcodeI64RemSName           = "i64.rem_s"
   738  	OpcodeI64RemUName           = "i64.rem_u"
   739  	OpcodeI64AndName            = "i64.and"
   740  	OpcodeI64OrName             = "i64.or"
   741  	OpcodeI64XorName            = "i64.xor"
   742  	OpcodeI64ShlName            = "i64.shl"
   743  	OpcodeI64ShrSName           = "i64.shr_s"
   744  	OpcodeI64ShrUName           = "i64.shr_u"
   745  	OpcodeI64RotlName           = "i64.rotl"
   746  	OpcodeI64RotrName           = "i64.rotr"
   747  	OpcodeF32AbsName            = "f32.abs"
   748  	OpcodeF32NegName            = "f32.neg"
   749  	OpcodeF32CeilName           = "f32.ceil"
   750  	OpcodeF32FloorName          = "f32.floor"
   751  	OpcodeF32TruncName          = "f32.trunc"
   752  	OpcodeF32NearestName        = "f32.nearest"
   753  	OpcodeF32SqrtName           = "f32.sqrt"
   754  	OpcodeF32AddName            = "f32.add"
   755  	OpcodeF32SubName            = "f32.sub"
   756  	OpcodeF32MulName            = "f32.mul"
   757  	OpcodeF32DivName            = "f32.div"
   758  	OpcodeF32MinName            = "f32.min"
   759  	OpcodeF32MaxName            = "f32.max"
   760  	OpcodeF32CopysignName       = "f32.copysign"
   761  	OpcodeF64AbsName            = "f64.abs"
   762  	OpcodeF64NegName            = "f64.neg"
   763  	OpcodeF64CeilName           = "f64.ceil"
   764  	OpcodeF64FloorName          = "f64.floor"
   765  	OpcodeF64TruncName          = "f64.trunc"
   766  	OpcodeF64NearestName        = "f64.nearest"
   767  	OpcodeF64SqrtName           = "f64.sqrt"
   768  	OpcodeF64AddName            = "f64.add"
   769  	OpcodeF64SubName            = "f64.sub"
   770  	OpcodeF64MulName            = "f64.mul"
   771  	OpcodeF64DivName            = "f64.div"
   772  	OpcodeF64MinName            = "f64.min"
   773  	OpcodeF64MaxName            = "f64.max"
   774  	OpcodeF64CopysignName       = "f64.copysign"
   775  	OpcodeI32WrapI64Name        = "i32.wrap_i64"
   776  	OpcodeI32TruncF32SName      = "i32.trunc_f32_s"
   777  	OpcodeI32TruncF32UName      = "i32.trunc_f32_u"
   778  	OpcodeI32TruncF64SName      = "i32.trunc_f64_s"
   779  	OpcodeI32TruncF64UName      = "i32.trunc_f64_u"
   780  	OpcodeI64ExtendI32SName     = "i64.extend_i32_s"
   781  	OpcodeI64ExtendI32UName     = "i64.extend_i32_u"
   782  	OpcodeI64TruncF32SName      = "i64.trunc_f32_s"
   783  	OpcodeI64TruncF32UName      = "i64.trunc_f32_u"
   784  	OpcodeI64TruncF64SName      = "i64.trunc_f64_s"
   785  	OpcodeI64TruncF64UName      = "i64.trunc_f64_u"
   786  	OpcodeF32ConvertI32SName    = "f32.convert_i32_s"
   787  	OpcodeF32ConvertI32UName    = "f32.convert_i32_u"
   788  	OpcodeF32ConvertI64SName    = "f32.convert_i64_s"
   789  	OpcodeF32ConvertI64UName    = "f32.convert_i64u"
   790  	OpcodeF32DemoteF64Name      = "f32.demote_f64"
   791  	OpcodeF64ConvertI32SName    = "f64.convert_i32_s"
   792  	OpcodeF64ConvertI32UName    = "f64.convert_i32_u"
   793  	OpcodeF64ConvertI64SName    = "f64.convert_i64_s"
   794  	OpcodeF64ConvertI64UName    = "f64.convert_i64_u"
   795  	OpcodeF64PromoteF32Name     = "f64.promote_f32"
   796  	OpcodeI32ReinterpretF32Name = "i32.reinterpret_f32"
   797  	OpcodeI64ReinterpretF64Name = "i64.reinterpret_f64"
   798  	OpcodeF32ReinterpretI32Name = "f32.reinterpret_i32"
   799  	OpcodeF64ReinterpretI64Name = "f64.reinterpret_i64"
   800  
   801  	OpcodeRefNullName   = "ref.null"
   802  	OpcodeRefIsNullName = "ref.is_null"
   803  	OpcodeRefFuncName   = "ref.func"
   804  
   805  	OpcodeTableGetName = "table.get"
   806  	OpcodeTableSetName = "table.set"
   807  
   808  	// Below are toggled with CoreFeatureSignExtensionOps
   809  
   810  	OpcodeI32Extend8SName  = "i32.extend8_s"
   811  	OpcodeI32Extend16SName = "i32.extend16_s"
   812  	OpcodeI64Extend8SName  = "i64.extend8_s"
   813  	OpcodeI64Extend16SName = "i64.extend16_s"
   814  	OpcodeI64Extend32SName = "i64.extend32_s"
   815  
   816  	OpcodeMiscPrefixName = "misc_prefix"
   817  	OpcodeVecPrefixName  = "vector_prefix"
   818  )
   819  
   820  var instructionNames = [256]string{
   821  	OpcodeUnreachable:       OpcodeUnreachableName,
   822  	OpcodeNop:               OpcodeNopName,
   823  	OpcodeBlock:             OpcodeBlockName,
   824  	OpcodeLoop:              OpcodeLoopName,
   825  	OpcodeIf:                OpcodeIfName,
   826  	OpcodeElse:              OpcodeElseName,
   827  	OpcodeEnd:               OpcodeEndName,
   828  	OpcodeBr:                OpcodeBrName,
   829  	OpcodeBrIf:              OpcodeBrIfName,
   830  	OpcodeBrTable:           OpcodeBrTableName,
   831  	OpcodeReturn:            OpcodeReturnName,
   832  	OpcodeCall:              OpcodeCallName,
   833  	OpcodeCallIndirect:      OpcodeCallIndirectName,
   834  	OpcodeDrop:              OpcodeDropName,
   835  	OpcodeSelect:            OpcodeSelectName,
   836  	OpcodeTypedSelect:       OpcodeTypedSelectName,
   837  	OpcodeLocalGet:          OpcodeLocalGetName,
   838  	OpcodeLocalSet:          OpcodeLocalSetName,
   839  	OpcodeLocalTee:          OpcodeLocalTeeName,
   840  	OpcodeGlobalGet:         OpcodeGlobalGetName,
   841  	OpcodeGlobalSet:         OpcodeGlobalSetName,
   842  	OpcodeI32Load:           OpcodeI32LoadName,
   843  	OpcodeI64Load:           OpcodeI64LoadName,
   844  	OpcodeF32Load:           OpcodeF32LoadName,
   845  	OpcodeF64Load:           OpcodeF64LoadName,
   846  	OpcodeI32Load8S:         OpcodeI32Load8SName,
   847  	OpcodeI32Load8U:         OpcodeI32Load8UName,
   848  	OpcodeI32Load16S:        OpcodeI32Load16SName,
   849  	OpcodeI32Load16U:        OpcodeI32Load16UName,
   850  	OpcodeI64Load8S:         OpcodeI64Load8SName,
   851  	OpcodeI64Load8U:         OpcodeI64Load8UName,
   852  	OpcodeI64Load16S:        OpcodeI64Load16SName,
   853  	OpcodeI64Load16U:        OpcodeI64Load16UName,
   854  	OpcodeI64Load32S:        OpcodeI64Load32SName,
   855  	OpcodeI64Load32U:        OpcodeI64Load32UName,
   856  	OpcodeI32Store:          OpcodeI32StoreName,
   857  	OpcodeI64Store:          OpcodeI64StoreName,
   858  	OpcodeF32Store:          OpcodeF32StoreName,
   859  	OpcodeF64Store:          OpcodeF64StoreName,
   860  	OpcodeI32Store8:         OpcodeI32Store8Name,
   861  	OpcodeI32Store16:        OpcodeI32Store16Name,
   862  	OpcodeI64Store8:         OpcodeI64Store8Name,
   863  	OpcodeI64Store16:        OpcodeI64Store16Name,
   864  	OpcodeI64Store32:        OpcodeI64Store32Name,
   865  	OpcodeMemorySize:        OpcodeMemorySizeName,
   866  	OpcodeMemoryGrow:        OpcodeMemoryGrowName,
   867  	OpcodeI32Const:          OpcodeI32ConstName,
   868  	OpcodeI64Const:          OpcodeI64ConstName,
   869  	OpcodeF32Const:          OpcodeF32ConstName,
   870  	OpcodeF64Const:          OpcodeF64ConstName,
   871  	OpcodeI32Eqz:            OpcodeI32EqzName,
   872  	OpcodeI32Eq:             OpcodeI32EqName,
   873  	OpcodeI32Ne:             OpcodeI32NeName,
   874  	OpcodeI32LtS:            OpcodeI32LtSName,
   875  	OpcodeI32LtU:            OpcodeI32LtUName,
   876  	OpcodeI32GtS:            OpcodeI32GtSName,
   877  	OpcodeI32GtU:            OpcodeI32GtUName,
   878  	OpcodeI32LeS:            OpcodeI32LeSName,
   879  	OpcodeI32LeU:            OpcodeI32LeUName,
   880  	OpcodeI32GeS:            OpcodeI32GeSName,
   881  	OpcodeI32GeU:            OpcodeI32GeUName,
   882  	OpcodeI64Eqz:            OpcodeI64EqzName,
   883  	OpcodeI64Eq:             OpcodeI64EqName,
   884  	OpcodeI64Ne:             OpcodeI64NeName,
   885  	OpcodeI64LtS:            OpcodeI64LtSName,
   886  	OpcodeI64LtU:            OpcodeI64LtUName,
   887  	OpcodeI64GtS:            OpcodeI64GtSName,
   888  	OpcodeI64GtU:            OpcodeI64GtUName,
   889  	OpcodeI64LeS:            OpcodeI64LeSName,
   890  	OpcodeI64LeU:            OpcodeI64LeUName,
   891  	OpcodeI64GeS:            OpcodeI64GeSName,
   892  	OpcodeI64GeU:            OpcodeI64GeUName,
   893  	OpcodeF32Eq:             OpcodeF32EqName,
   894  	OpcodeF32Ne:             OpcodeF32NeName,
   895  	OpcodeF32Lt:             OpcodeF32LtName,
   896  	OpcodeF32Gt:             OpcodeF32GtName,
   897  	OpcodeF32Le:             OpcodeF32LeName,
   898  	OpcodeF32Ge:             OpcodeF32GeName,
   899  	OpcodeF64Eq:             OpcodeF64EqName,
   900  	OpcodeF64Ne:             OpcodeF64NeName,
   901  	OpcodeF64Lt:             OpcodeF64LtName,
   902  	OpcodeF64Gt:             OpcodeF64GtName,
   903  	OpcodeF64Le:             OpcodeF64LeName,
   904  	OpcodeF64Ge:             OpcodeF64GeName,
   905  	OpcodeI32Clz:            OpcodeI32ClzName,
   906  	OpcodeI32Ctz:            OpcodeI32CtzName,
   907  	OpcodeI32Popcnt:         OpcodeI32PopcntName,
   908  	OpcodeI32Add:            OpcodeI32AddName,
   909  	OpcodeI32Sub:            OpcodeI32SubName,
   910  	OpcodeI32Mul:            OpcodeI32MulName,
   911  	OpcodeI32DivS:           OpcodeI32DivSName,
   912  	OpcodeI32DivU:           OpcodeI32DivUName,
   913  	OpcodeI32RemS:           OpcodeI32RemSName,
   914  	OpcodeI32RemU:           OpcodeI32RemUName,
   915  	OpcodeI32And:            OpcodeI32AndName,
   916  	OpcodeI32Or:             OpcodeI32OrName,
   917  	OpcodeI32Xor:            OpcodeI32XorName,
   918  	OpcodeI32Shl:            OpcodeI32ShlName,
   919  	OpcodeI32ShrS:           OpcodeI32ShrSName,
   920  	OpcodeI32ShrU:           OpcodeI32ShrUName,
   921  	OpcodeI32Rotl:           OpcodeI32RotlName,
   922  	OpcodeI32Rotr:           OpcodeI32RotrName,
   923  	OpcodeI64Clz:            OpcodeI64ClzName,
   924  	OpcodeI64Ctz:            OpcodeI64CtzName,
   925  	OpcodeI64Popcnt:         OpcodeI64PopcntName,
   926  	OpcodeI64Add:            OpcodeI64AddName,
   927  	OpcodeI64Sub:            OpcodeI64SubName,
   928  	OpcodeI64Mul:            OpcodeI64MulName,
   929  	OpcodeI64DivS:           OpcodeI64DivSName,
   930  	OpcodeI64DivU:           OpcodeI64DivUName,
   931  	OpcodeI64RemS:           OpcodeI64RemSName,
   932  	OpcodeI64RemU:           OpcodeI64RemUName,
   933  	OpcodeI64And:            OpcodeI64AndName,
   934  	OpcodeI64Or:             OpcodeI64OrName,
   935  	OpcodeI64Xor:            OpcodeI64XorName,
   936  	OpcodeI64Shl:            OpcodeI64ShlName,
   937  	OpcodeI64ShrS:           OpcodeI64ShrSName,
   938  	OpcodeI64ShrU:           OpcodeI64ShrUName,
   939  	OpcodeI64Rotl:           OpcodeI64RotlName,
   940  	OpcodeI64Rotr:           OpcodeI64RotrName,
   941  	OpcodeF32Abs:            OpcodeF32AbsName,
   942  	OpcodeF32Neg:            OpcodeF32NegName,
   943  	OpcodeF32Ceil:           OpcodeF32CeilName,
   944  	OpcodeF32Floor:          OpcodeF32FloorName,
   945  	OpcodeF32Trunc:          OpcodeF32TruncName,
   946  	OpcodeF32Nearest:        OpcodeF32NearestName,
   947  	OpcodeF32Sqrt:           OpcodeF32SqrtName,
   948  	OpcodeF32Add:            OpcodeF32AddName,
   949  	OpcodeF32Sub:            OpcodeF32SubName,
   950  	OpcodeF32Mul:            OpcodeF32MulName,
   951  	OpcodeF32Div:            OpcodeF32DivName,
   952  	OpcodeF32Min:            OpcodeF32MinName,
   953  	OpcodeF32Max:            OpcodeF32MaxName,
   954  	OpcodeF32Copysign:       OpcodeF32CopysignName,
   955  	OpcodeF64Abs:            OpcodeF64AbsName,
   956  	OpcodeF64Neg:            OpcodeF64NegName,
   957  	OpcodeF64Ceil:           OpcodeF64CeilName,
   958  	OpcodeF64Floor:          OpcodeF64FloorName,
   959  	OpcodeF64Trunc:          OpcodeF64TruncName,
   960  	OpcodeF64Nearest:        OpcodeF64NearestName,
   961  	OpcodeF64Sqrt:           OpcodeF64SqrtName,
   962  	OpcodeF64Add:            OpcodeF64AddName,
   963  	OpcodeF64Sub:            OpcodeF64SubName,
   964  	OpcodeF64Mul:            OpcodeF64MulName,
   965  	OpcodeF64Div:            OpcodeF64DivName,
   966  	OpcodeF64Min:            OpcodeF64MinName,
   967  	OpcodeF64Max:            OpcodeF64MaxName,
   968  	OpcodeF64Copysign:       OpcodeF64CopysignName,
   969  	OpcodeI32WrapI64:        OpcodeI32WrapI64Name,
   970  	OpcodeI32TruncF32S:      OpcodeI32TruncF32SName,
   971  	OpcodeI32TruncF32U:      OpcodeI32TruncF32UName,
   972  	OpcodeI32TruncF64S:      OpcodeI32TruncF64SName,
   973  	OpcodeI32TruncF64U:      OpcodeI32TruncF64UName,
   974  	OpcodeI64ExtendI32S:     OpcodeI64ExtendI32SName,
   975  	OpcodeI64ExtendI32U:     OpcodeI64ExtendI32UName,
   976  	OpcodeI64TruncF32S:      OpcodeI64TruncF32SName,
   977  	OpcodeI64TruncF32U:      OpcodeI64TruncF32UName,
   978  	OpcodeI64TruncF64S:      OpcodeI64TruncF64SName,
   979  	OpcodeI64TruncF64U:      OpcodeI64TruncF64UName,
   980  	OpcodeF32ConvertI32S:    OpcodeF32ConvertI32SName,
   981  	OpcodeF32ConvertI32U:    OpcodeF32ConvertI32UName,
   982  	OpcodeF32ConvertI64S:    OpcodeF32ConvertI64SName,
   983  	OpcodeF32ConvertI64U:    OpcodeF32ConvertI64UName,
   984  	OpcodeF32DemoteF64:      OpcodeF32DemoteF64Name,
   985  	OpcodeF64ConvertI32S:    OpcodeF64ConvertI32SName,
   986  	OpcodeF64ConvertI32U:    OpcodeF64ConvertI32UName,
   987  	OpcodeF64ConvertI64S:    OpcodeF64ConvertI64SName,
   988  	OpcodeF64ConvertI64U:    OpcodeF64ConvertI64UName,
   989  	OpcodeF64PromoteF32:     OpcodeF64PromoteF32Name,
   990  	OpcodeI32ReinterpretF32: OpcodeI32ReinterpretF32Name,
   991  	OpcodeI64ReinterpretF64: OpcodeI64ReinterpretF64Name,
   992  	OpcodeF32ReinterpretI32: OpcodeF32ReinterpretI32Name,
   993  	OpcodeF64ReinterpretI64: OpcodeF64ReinterpretI64Name,
   994  
   995  	OpcodeRefNull:   OpcodeRefNullName,
   996  	OpcodeRefIsNull: OpcodeRefIsNullName,
   997  	OpcodeRefFunc:   OpcodeRefFuncName,
   998  
   999  	OpcodeTableGet: OpcodeTableGetName,
  1000  	OpcodeTableSet: OpcodeTableSetName,
  1001  
  1002  	// Below are toggled with CoreFeatureSignExtensionOps
  1003  
  1004  	OpcodeI32Extend8S:  OpcodeI32Extend8SName,
  1005  	OpcodeI32Extend16S: OpcodeI32Extend16SName,
  1006  	OpcodeI64Extend8S:  OpcodeI64Extend8SName,
  1007  	OpcodeI64Extend16S: OpcodeI64Extend16SName,
  1008  	OpcodeI64Extend32S: OpcodeI64Extend32SName,
  1009  
  1010  	OpcodeMiscPrefix: OpcodeMiscPrefixName,
  1011  	OpcodeVecPrefix:  OpcodeVecPrefixName,
  1012  }
  1013  
  1014  // InstructionName returns the instruction corresponding to this binary Opcode.
  1015  // See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#a7-index-of-instructions
  1016  func InstructionName(oc Opcode) string {
  1017  	return instructionNames[oc]
  1018  }
  1019  
  1020  const (
  1021  	OpcodeI32TruncSatF32SName = "i32.trunc_sat_f32_s"
  1022  	OpcodeI32TruncSatF32UName = "i32.trunc_sat_f32_u"
  1023  	OpcodeI32TruncSatF64SName = "i32.trunc_sat_f64_s"
  1024  	OpcodeI32TruncSatF64UName = "i32.trunc_sat_f64_u"
  1025  	OpcodeI64TruncSatF32SName = "i64.trunc_sat_f32_s"
  1026  	OpcodeI64TruncSatF32UName = "i64.trunc_sat_f32_u"
  1027  	OpcodeI64TruncSatF64SName = "i64.trunc_sat_f64_s"
  1028  	OpcodeI64TruncSatF64UName = "i64.trunc_sat_f64_u"
  1029  
  1030  	OpcodeMemoryInitName = "memory.init"
  1031  	OpcodeDataDropName   = "data.drop"
  1032  	OpcodeMemoryCopyName = "memory.copy"
  1033  	OpcodeMemoryFillName = "memory.fill"
  1034  	OpcodeTableInitName  = "table.init"
  1035  	OpcodeElemDropName   = "elem.drop"
  1036  	OpcodeTableCopyName  = "table.copy"
  1037  	OpcodeTableGrowName  = "table.grow"
  1038  	OpcodeTableSizeName  = "table.size"
  1039  	OpcodeTableFillName  = "table.fill"
  1040  )
  1041  
  1042  var miscInstructionNames = [256]string{
  1043  	OpcodeMiscI32TruncSatF32S: OpcodeI32TruncSatF32SName,
  1044  	OpcodeMiscI32TruncSatF32U: OpcodeI32TruncSatF32UName,
  1045  	OpcodeMiscI32TruncSatF64S: OpcodeI32TruncSatF64SName,
  1046  	OpcodeMiscI32TruncSatF64U: OpcodeI32TruncSatF64UName,
  1047  	OpcodeMiscI64TruncSatF32S: OpcodeI64TruncSatF32SName,
  1048  	OpcodeMiscI64TruncSatF32U: OpcodeI64TruncSatF32UName,
  1049  	OpcodeMiscI64TruncSatF64S: OpcodeI64TruncSatF64SName,
  1050  	OpcodeMiscI64TruncSatF64U: OpcodeI64TruncSatF64UName,
  1051  
  1052  	OpcodeMiscMemoryInit: OpcodeMemoryInitName,
  1053  	OpcodeMiscDataDrop:   OpcodeDataDropName,
  1054  	OpcodeMiscMemoryCopy: OpcodeMemoryCopyName,
  1055  	OpcodeMiscMemoryFill: OpcodeMemoryFillName,
  1056  	OpcodeMiscTableInit:  OpcodeTableInitName,
  1057  	OpcodeMiscElemDrop:   OpcodeElemDropName,
  1058  	OpcodeMiscTableCopy:  OpcodeTableCopyName,
  1059  	OpcodeMiscTableGrow:  OpcodeTableGrowName,
  1060  	OpcodeMiscTableSize:  OpcodeTableSizeName,
  1061  	OpcodeMiscTableFill:  OpcodeTableFillName,
  1062  }
  1063  
  1064  // MiscInstructionName returns the instruction corresponding to this miscellaneous Opcode.
  1065  func MiscInstructionName(oc OpcodeMisc) string {
  1066  	return miscInstructionNames[oc]
  1067  }
  1068  
  1069  const (
  1070  	OpcodeVecV128LoadName                  = "v128.load"
  1071  	OpcodeVecV128Load8x8SName              = "v128.load8x8_s"
  1072  	OpcodeVecV128Load8x8UName              = "v128.load8x8_u"
  1073  	OpcodeVecV128Load16x4SName             = "v128.load16x4_s"
  1074  	OpcodeVecV128Load16x4UName             = "v128.load16x4_u"
  1075  	OpcodeVecV128Load32x2SName             = "v128.load32x2_s"
  1076  	OpcodeVecV128Load32x2UName             = "v128.load32x2_u"
  1077  	OpcodeVecV128Load8SplatName            = "v128.load8_splat"
  1078  	OpcodeVecV128Load16SplatName           = "v128.load16_splat"
  1079  	OpcodeVecV128Load32SplatName           = "v128.load32_splat"
  1080  	OpcodeVecV128Load64SplatName           = "v128.load64_splat"
  1081  	OpcodeVecV128Load32zeroName            = "v128.load32_zero"
  1082  	OpcodeVecV128Load64zeroName            = "v128.load64_zero"
  1083  	OpcodeVecV128StoreName                 = "v128.store"
  1084  	OpcodeVecV128Load8LaneName             = "v128.load8_lane"
  1085  	OpcodeVecV128Load16LaneName            = "v128.load16_lane"
  1086  	OpcodeVecV128Load32LaneName            = "v128.load32_lane"
  1087  	OpcodeVecV128Load64LaneName            = "v128.load64_lane"
  1088  	OpcodeVecV128Store8LaneName            = "v128.store8_lane"
  1089  	OpcodeVecV128Store16LaneName           = "v128.store16_lane"
  1090  	OpcodeVecV128Store32LaneName           = "v128.store32_lane"
  1091  	OpcodeVecV128Store64LaneName           = "v128.store64_lane"
  1092  	OpcodeVecV128ConstName                 = "v128.const"
  1093  	OpcodeVecV128i8x16ShuffleName          = "v128.shuffle"
  1094  	OpcodeVecI8x16ExtractLaneSName         = "i8x16.extract_lane_s"
  1095  	OpcodeVecI8x16ExtractLaneUName         = "i8x16.extract_lane_u"
  1096  	OpcodeVecI8x16ReplaceLaneName          = "i8x16.replace_lane"
  1097  	OpcodeVecI16x8ExtractLaneSName         = "i16x8.extract_lane_s"
  1098  	OpcodeVecI16x8ExtractLaneUName         = "i16x8.extract_lane_u"
  1099  	OpcodeVecI16x8ReplaceLaneName          = "i16x8.replace_lane"
  1100  	OpcodeVecI32x4ExtractLaneName          = "i32x4.extract_lane"
  1101  	OpcodeVecI32x4ReplaceLaneName          = "i32x4.replace_lane"
  1102  	OpcodeVecI64x2ExtractLaneName          = "i64x2.extract_lane"
  1103  	OpcodeVecI64x2ReplaceLaneName          = "i64x2.replace_lane"
  1104  	OpcodeVecF32x4ExtractLaneName          = "f32x4.extract_lane"
  1105  	OpcodeVecF32x4ReplaceLaneName          = "f32x4.replace_lane"
  1106  	OpcodeVecF64x2ExtractLaneName          = "f64x2.extract_lane"
  1107  	OpcodeVecF64x2ReplaceLaneName          = "f64x2.replace_lane"
  1108  	OpcodeVecI8x16SwizzleName              = "i8x16.swizzle"
  1109  	OpcodeVecI8x16SplatName                = "i8x16.splat"
  1110  	OpcodeVecI16x8SplatName                = "i16x8.splat"
  1111  	OpcodeVecI32x4SplatName                = "i32x4.splat"
  1112  	OpcodeVecI64x2SplatName                = "i64x2.splat"
  1113  	OpcodeVecF32x4SplatName                = "f32x4.splat"
  1114  	OpcodeVecF64x2SplatName                = "f64x2.splat"
  1115  	OpcodeVecI8x16EqName                   = "i8x16.eq"
  1116  	OpcodeVecI8x16NeName                   = "i8x16.ne"
  1117  	OpcodeVecI8x16LtSName                  = "i8x16.lt_s"
  1118  	OpcodeVecI8x16LtUName                  = "i8x16.lt_u"
  1119  	OpcodeVecI8x16GtSName                  = "i8x16.gt_s"
  1120  	OpcodeVecI8x16GtUName                  = "i8x16.gt_u"
  1121  	OpcodeVecI8x16LeSName                  = "i8x16.le_s"
  1122  	OpcodeVecI8x16LeUName                  = "i8x16.le_u"
  1123  	OpcodeVecI8x16GeSName                  = "i8x16.ge_s"
  1124  	OpcodeVecI8x16GeUName                  = "i8x16.ge_u"
  1125  	OpcodeVecI16x8EqName                   = "i16x8.eq"
  1126  	OpcodeVecI16x8NeName                   = "i16x8.ne"
  1127  	OpcodeVecI16x8LtSName                  = "i16x8.lt_s"
  1128  	OpcodeVecI16x8LtUName                  = "i16x8.lt_u"
  1129  	OpcodeVecI16x8GtSName                  = "i16x8.gt_s"
  1130  	OpcodeVecI16x8GtUName                  = "i16x8.gt_u"
  1131  	OpcodeVecI16x8LeSName                  = "i16x8.le_s"
  1132  	OpcodeVecI16x8LeUName                  = "i16x8.le_u"
  1133  	OpcodeVecI16x8GeSName                  = "i16x8.ge_s"
  1134  	OpcodeVecI16x8GeUName                  = "i16x8.ge_u"
  1135  	OpcodeVecI32x4EqName                   = "i32x4.eq"
  1136  	OpcodeVecI32x4NeName                   = "i32x4.ne"
  1137  	OpcodeVecI32x4LtSName                  = "i32x4.lt_s"
  1138  	OpcodeVecI32x4LtUName                  = "i32x4.lt_u"
  1139  	OpcodeVecI32x4GtSName                  = "i32x4.gt_s"
  1140  	OpcodeVecI32x4GtUName                  = "i32x4.gt_u"
  1141  	OpcodeVecI32x4LeSName                  = "i32x4.le_s"
  1142  	OpcodeVecI32x4LeUName                  = "i32x4.le_u"
  1143  	OpcodeVecI32x4GeSName                  = "i32x4.ge_s"
  1144  	OpcodeVecI32x4GeUName                  = "i32x4.ge_u"
  1145  	OpcodeVecI64x2EqName                   = "i64x2.eq"
  1146  	OpcodeVecI64x2NeName                   = "i64x2.ne"
  1147  	OpcodeVecI64x2LtSName                  = "i64x2.lt"
  1148  	OpcodeVecI64x2GtSName                  = "i64x2.gt"
  1149  	OpcodeVecI64x2LeSName                  = "i64x2.le"
  1150  	OpcodeVecI64x2GeSName                  = "i64x2.ge"
  1151  	OpcodeVecF32x4EqName                   = "f32x4.eq"
  1152  	OpcodeVecF32x4NeName                   = "f32x4.ne"
  1153  	OpcodeVecF32x4LtName                   = "f32x4.lt"
  1154  	OpcodeVecF32x4GtName                   = "f32x4.gt"
  1155  	OpcodeVecF32x4LeName                   = "f32x4.le"
  1156  	OpcodeVecF32x4GeName                   = "f32x4.ge"
  1157  	OpcodeVecF64x2EqName                   = "f64x2.eq"
  1158  	OpcodeVecF64x2NeName                   = "f64x2.ne"
  1159  	OpcodeVecF64x2LtName                   = "f64x2.lt"
  1160  	OpcodeVecF64x2GtName                   = "f64x2.gt"
  1161  	OpcodeVecF64x2LeName                   = "f64x2.le"
  1162  	OpcodeVecF64x2GeName                   = "f64x2.ge"
  1163  	OpcodeVecV128NotName                   = "v128.not"
  1164  	OpcodeVecV128AndName                   = "v128.and"
  1165  	OpcodeVecV128AndNotName                = "v128.andnot"
  1166  	OpcodeVecV128OrName                    = "v128.or"
  1167  	OpcodeVecV128XorName                   = "v128.xor"
  1168  	OpcodeVecV128BitselectName             = "v128.bitselect"
  1169  	OpcodeVecV128AnyTrueName               = "v128.any_true"
  1170  	OpcodeVecI8x16AbsName                  = "i8x16.abs"
  1171  	OpcodeVecI8x16NegName                  = "i8x16.neg"
  1172  	OpcodeVecI8x16PopcntName               = "i8x16.popcnt"
  1173  	OpcodeVecI8x16AllTrueName              = "i8x16.all_true"
  1174  	OpcodeVecI8x16BitMaskName              = "i8x16.bitmask"
  1175  	OpcodeVecI8x16NarrowI16x8SName         = "i8x16.narrow_i16x8_s"
  1176  	OpcodeVecI8x16NarrowI16x8UName         = "i8x16.narrow_i16x8_u"
  1177  	OpcodeVecI8x16ShlName                  = "i8x16.shl"
  1178  	OpcodeVecI8x16ShrSName                 = "i8x16.shr_s"
  1179  	OpcodeVecI8x16ShrUName                 = "i8x16.shr_u"
  1180  	OpcodeVecI8x16AddName                  = "i8x16.add"
  1181  	OpcodeVecI8x16AddSatSName              = "i8x16.add_sat_s"
  1182  	OpcodeVecI8x16AddSatUName              = "i8x16.add_sat_u"
  1183  	OpcodeVecI8x16SubName                  = "i8x16.sub"
  1184  	OpcodeVecI8x16SubSatSName              = "i8x16.sub_s"
  1185  	OpcodeVecI8x16SubSatUName              = "i8x16.sub_u"
  1186  	OpcodeVecI8x16MinSName                 = "i8x16.min_s"
  1187  	OpcodeVecI8x16MinUName                 = "i8x16.min_u"
  1188  	OpcodeVecI8x16MaxSName                 = "i8x16.max_s"
  1189  	OpcodeVecI8x16MaxUName                 = "i8x16.max_u"
  1190  	OpcodeVecI8x16AvgrUName                = "i8x16.avgr_u"
  1191  	OpcodeVecI16x8ExtaddPairwiseI8x16SName = "i16x8.extadd_pairwise_i8x16_s"
  1192  	OpcodeVecI16x8ExtaddPairwiseI8x16UName = "i16x8.extadd_pairwise_i8x16_u"
  1193  	OpcodeVecI16x8AbsName                  = "i16x8.abs"
  1194  	OpcodeVecI16x8NegName                  = "i16x8.neg"
  1195  	OpcodeVecI16x8Q15mulrSatSName          = "i16x8.q15mulr_sat_s"
  1196  	OpcodeVecI16x8AllTrueName              = "i16x8.all_true"
  1197  	OpcodeVecI16x8BitMaskName              = "i16x8.bitmask"
  1198  	OpcodeVecI16x8NarrowI32x4SName         = "i16x8.narrow_i32x4_s"
  1199  	OpcodeVecI16x8NarrowI32x4UName         = "i16x8.narrow_i32x4_u"
  1200  	OpcodeVecI16x8ExtendLowI8x16SName      = "i16x8.extend_low_i8x16_s"
  1201  	OpcodeVecI16x8ExtendHighI8x16SName     = "i16x8.extend_high_i8x16_s"
  1202  	OpcodeVecI16x8ExtendLowI8x16UName      = "i16x8.extend_low_i8x16_u"
  1203  	OpcodeVecI16x8ExtendHighI8x16UName     = "i16x8.extend_high_i8x16_u"
  1204  	OpcodeVecI16x8ShlName                  = "i16x8.shl"
  1205  	OpcodeVecI16x8ShrSName                 = "i16x8.shr_s"
  1206  	OpcodeVecI16x8ShrUName                 = "i16x8.shr_u"
  1207  	OpcodeVecI16x8AddName                  = "i16x8.add"
  1208  	OpcodeVecI16x8AddSatSName              = "i16x8.add_sat_s"
  1209  	OpcodeVecI16x8AddSatUName              = "i16x8.add_sat_u"
  1210  	OpcodeVecI16x8SubName                  = "i16x8.sub"
  1211  	OpcodeVecI16x8SubSatSName              = "i16x8.sub_sat_s"
  1212  	OpcodeVecI16x8SubSatUName              = "i16x8.sub_sat_u"
  1213  	OpcodeVecI16x8MulName                  = "i16x8.mul"
  1214  	OpcodeVecI16x8MinSName                 = "i16x8.min_s"
  1215  	OpcodeVecI16x8MinUName                 = "i16x8.min_u"
  1216  	OpcodeVecI16x8MaxSName                 = "i16x8.max_s"
  1217  	OpcodeVecI16x8MaxUName                 = "i16x8.max_u"
  1218  	OpcodeVecI16x8AvgrUName                = "i16x8.avgr_u"
  1219  	OpcodeVecI16x8ExtMulLowI8x16SName      = "i16x8.extmul_low_i8x16_s"
  1220  	OpcodeVecI16x8ExtMulHighI8x16SName     = "i16x8.extmul_high_i8x16_s"
  1221  	OpcodeVecI16x8ExtMulLowI8x16UName      = "i16x8.extmul_low_i8x16_u"
  1222  	OpcodeVecI16x8ExtMulHighI8x16UName     = "i16x8.extmul_high_i8x16_u"
  1223  	OpcodeVecI32x4ExtaddPairwiseI16x8SName = "i32x4.extadd_pairwise_i16x8_s"
  1224  	OpcodeVecI32x4ExtaddPairwiseI16x8UName = "i32x4.extadd_pairwise_i16x8_u"
  1225  	OpcodeVecI32x4AbsName                  = "i32x4.abs"
  1226  	OpcodeVecI32x4NegName                  = "i32x4.neg"
  1227  	OpcodeVecI32x4AllTrueName              = "i32x4.all_true"
  1228  	OpcodeVecI32x4BitMaskName              = "i32x4.bitmask"
  1229  	OpcodeVecI32x4ExtendLowI16x8SName      = "i32x4.extend_low_i16x8_s"
  1230  	OpcodeVecI32x4ExtendHighI16x8SName     = "i32x4.extend_high_i16x8_s"
  1231  	OpcodeVecI32x4ExtendLowI16x8UName      = "i32x4.extend_low_i16x8_u"
  1232  	OpcodeVecI32x4ExtendHighI16x8UName     = "i32x4.extend_high_i16x8_u"
  1233  	OpcodeVecI32x4ShlName                  = "i32x4.shl"
  1234  	OpcodeVecI32x4ShrSName                 = "i32x4.shr_s"
  1235  	OpcodeVecI32x4ShrUName                 = "i32x4.shr_u"
  1236  	OpcodeVecI32x4AddName                  = "i32x4.add"
  1237  	OpcodeVecI32x4SubName                  = "i32x4.sub"
  1238  	OpcodeVecI32x4MulName                  = "i32x4.mul"
  1239  	OpcodeVecI32x4MinSName                 = "i32x4.min_s"
  1240  	OpcodeVecI32x4MinUName                 = "i32x4.min_u"
  1241  	OpcodeVecI32x4MaxSName                 = "i32x4.max_s"
  1242  	OpcodeVecI32x4MaxUName                 = "i32x4.max_u"
  1243  	OpcodeVecI32x4DotI16x8SName            = "i32x4.dot_i16x8_s"
  1244  	OpcodeVecI32x4ExtMulLowI16x8SName      = "i32x4.extmul_low_i16x8_s"
  1245  	OpcodeVecI32x4ExtMulHighI16x8SName     = "i32x4.extmul_high_i16x8_s"
  1246  	OpcodeVecI32x4ExtMulLowI16x8UName      = "i32x4.extmul_low_i16x8_u"
  1247  	OpcodeVecI32x4ExtMulHighI16x8UName     = "i32x4.extmul_high_i16x8_u"
  1248  	OpcodeVecI64x2AbsName                  = "i64x2.abs"
  1249  	OpcodeVecI64x2NegName                  = "i64x2.neg"
  1250  	OpcodeVecI64x2AllTrueName              = "i64x2.all_true"
  1251  	OpcodeVecI64x2BitMaskName              = "i64x2.bitmask"
  1252  	OpcodeVecI64x2ExtendLowI32x4SName      = "i64x2.extend_low_i32x4_s"
  1253  	OpcodeVecI64x2ExtendHighI32x4SName     = "i64x2.extend_high_i32x4_s"
  1254  	OpcodeVecI64x2ExtendLowI32x4UName      = "i64x2.extend_low_i32x4_u"
  1255  	OpcodeVecI64x2ExtendHighI32x4UName     = "i64x2.extend_high_i32x4_u"
  1256  	OpcodeVecI64x2ShlName                  = "i64x2.shl"
  1257  	OpcodeVecI64x2ShrSName                 = "i64x2.shr_s"
  1258  	OpcodeVecI64x2ShrUName                 = "i64x2.shr_u"
  1259  	OpcodeVecI64x2AddName                  = "i64x2.add"
  1260  	OpcodeVecI64x2SubName                  = "i64x2.sub"
  1261  	OpcodeVecI64x2MulName                  = "i64x2.mul"
  1262  	OpcodeVecI64x2ExtMulLowI32x4SName      = "i64x2.extmul_low_i32x4_s"
  1263  	OpcodeVecI64x2ExtMulHighI32x4SName     = "i64x2.extmul_high_i32x4_s"
  1264  	OpcodeVecI64x2ExtMulLowI32x4UName      = "i64x2.extmul_low_i32x4_u"
  1265  	OpcodeVecI64x2ExtMulHighI32x4UName     = "i64x2.extmul_high_i32x4_u"
  1266  	OpcodeVecF32x4CeilName                 = "f32x4.ceil"
  1267  	OpcodeVecF32x4FloorName                = "f32x4.floor"
  1268  	OpcodeVecF32x4TruncName                = "f32x4.trunc"
  1269  	OpcodeVecF32x4NearestName              = "f32x4.nearest"
  1270  	OpcodeVecF32x4AbsName                  = "f32x4.abs"
  1271  	OpcodeVecF32x4NegName                  = "f32x4.neg"
  1272  	OpcodeVecF32x4SqrtName                 = "f32x4.sqrt"
  1273  	OpcodeVecF32x4AddName                  = "f32x4.add"
  1274  	OpcodeVecF32x4SubName                  = "f32x4.sub"
  1275  	OpcodeVecF32x4MulName                  = "f32x4.mul"
  1276  	OpcodeVecF32x4DivName                  = "f32x4.div"
  1277  	OpcodeVecF32x4MinName                  = "f32x4.min"
  1278  	OpcodeVecF32x4MaxName                  = "f32x4.max"
  1279  	OpcodeVecF32x4PminName                 = "f32x4.pmin"
  1280  	OpcodeVecF32x4PmaxName                 = "f32x4.pmax"
  1281  	OpcodeVecF64x2CeilName                 = "f64x2.ceil"
  1282  	OpcodeVecF64x2FloorName                = "f64x2.floor"
  1283  	OpcodeVecF64x2TruncName                = "f64x2.trunc"
  1284  	OpcodeVecF64x2NearestName              = "f64x2.nearest"
  1285  	OpcodeVecF64x2AbsName                  = "f64x2.abs"
  1286  	OpcodeVecF64x2NegName                  = "f64x2.neg"
  1287  	OpcodeVecF64x2SqrtName                 = "f64x2.sqrt"
  1288  	OpcodeVecF64x2AddName                  = "f64x2.add"
  1289  	OpcodeVecF64x2SubName                  = "f64x2.sub"
  1290  	OpcodeVecF64x2MulName                  = "f64x2.mul"
  1291  	OpcodeVecF64x2DivName                  = "f64x2.div"
  1292  	OpcodeVecF64x2MinName                  = "f64x2.min"
  1293  	OpcodeVecF64x2MaxName                  = "f64x2.max"
  1294  	OpcodeVecF64x2PminName                 = "f64x2.pmin"
  1295  	OpcodeVecF64x2PmaxName                 = "f64x2.pmax"
  1296  	OpcodeVecI32x4TruncSatF32x4SName       = "i32x4.trunc_sat_f32x4_s"
  1297  	OpcodeVecI32x4TruncSatF32x4UName       = "i32x4.trunc_sat_f32x4_u"
  1298  	OpcodeVecF32x4ConvertI32x4SName        = "f32x4.convert_i32x4_s"
  1299  	OpcodeVecF32x4ConvertI32x4UName        = "f32x4.convert_i32x4_u"
  1300  	OpcodeVecI32x4TruncSatF64x2SZeroName   = "i32x4.trunc_sat_f64x2_s_zero"
  1301  	OpcodeVecI32x4TruncSatF64x2UZeroName   = "i32x4.trunc_sat_f64x2_u_zero"
  1302  	OpcodeVecF64x2ConvertLowI32x4SName     = "f64x2.convert_low_i32x4_s"
  1303  	OpcodeVecF64x2ConvertLowI32x4UName     = "f64x2.convert_low_i32x4_u"
  1304  	OpcodeVecF32x4DemoteF64x2ZeroName      = "f32x4.demote_f64x2_zero"
  1305  	OpcodeVecF64x2PromoteLowF32x4ZeroName  = "f64x2.promote_low_f32x4"
  1306  )
  1307  
  1308  var vectorInstructionName = map[OpcodeVec]string{
  1309  	OpcodeVecV128Load:                  OpcodeVecV128LoadName,
  1310  	OpcodeVecV128Load8x8s:              OpcodeVecV128Load8x8SName,
  1311  	OpcodeVecV128Load8x8u:              OpcodeVecV128Load8x8UName,
  1312  	OpcodeVecV128Load16x4s:             OpcodeVecV128Load16x4SName,
  1313  	OpcodeVecV128Load16x4u:             OpcodeVecV128Load16x4UName,
  1314  	OpcodeVecV128Load32x2s:             OpcodeVecV128Load32x2SName,
  1315  	OpcodeVecV128Load32x2u:             OpcodeVecV128Load32x2UName,
  1316  	OpcodeVecV128Load8Splat:            OpcodeVecV128Load8SplatName,
  1317  	OpcodeVecV128Load16Splat:           OpcodeVecV128Load16SplatName,
  1318  	OpcodeVecV128Load32Splat:           OpcodeVecV128Load32SplatName,
  1319  	OpcodeVecV128Load64Splat:           OpcodeVecV128Load64SplatName,
  1320  	OpcodeVecV128Load32zero:            OpcodeVecV128Load32zeroName,
  1321  	OpcodeVecV128Load64zero:            OpcodeVecV128Load64zeroName,
  1322  	OpcodeVecV128Store:                 OpcodeVecV128StoreName,
  1323  	OpcodeVecV128Load8Lane:             OpcodeVecV128Load8LaneName,
  1324  	OpcodeVecV128Load16Lane:            OpcodeVecV128Load16LaneName,
  1325  	OpcodeVecV128Load32Lane:            OpcodeVecV128Load32LaneName,
  1326  	OpcodeVecV128Load64Lane:            OpcodeVecV128Load64LaneName,
  1327  	OpcodeVecV128Store8Lane:            OpcodeVecV128Store8LaneName,
  1328  	OpcodeVecV128Store16Lane:           OpcodeVecV128Store16LaneName,
  1329  	OpcodeVecV128Store32Lane:           OpcodeVecV128Store32LaneName,
  1330  	OpcodeVecV128Store64Lane:           OpcodeVecV128Store64LaneName,
  1331  	OpcodeVecV128Const:                 OpcodeVecV128ConstName,
  1332  	OpcodeVecV128i8x16Shuffle:          OpcodeVecV128i8x16ShuffleName,
  1333  	OpcodeVecI8x16ExtractLaneS:         OpcodeVecI8x16ExtractLaneSName,
  1334  	OpcodeVecI8x16ExtractLaneU:         OpcodeVecI8x16ExtractLaneUName,
  1335  	OpcodeVecI8x16ReplaceLane:          OpcodeVecI8x16ReplaceLaneName,
  1336  	OpcodeVecI16x8ExtractLaneS:         OpcodeVecI16x8ExtractLaneSName,
  1337  	OpcodeVecI16x8ExtractLaneU:         OpcodeVecI16x8ExtractLaneUName,
  1338  	OpcodeVecI16x8ReplaceLane:          OpcodeVecI16x8ReplaceLaneName,
  1339  	OpcodeVecI32x4ExtractLane:          OpcodeVecI32x4ExtractLaneName,
  1340  	OpcodeVecI32x4ReplaceLane:          OpcodeVecI32x4ReplaceLaneName,
  1341  	OpcodeVecI64x2ExtractLane:          OpcodeVecI64x2ExtractLaneName,
  1342  	OpcodeVecI64x2ReplaceLane:          OpcodeVecI64x2ReplaceLaneName,
  1343  	OpcodeVecF32x4ExtractLane:          OpcodeVecF32x4ExtractLaneName,
  1344  	OpcodeVecF32x4ReplaceLane:          OpcodeVecF32x4ReplaceLaneName,
  1345  	OpcodeVecF64x2ExtractLane:          OpcodeVecF64x2ExtractLaneName,
  1346  	OpcodeVecF64x2ReplaceLane:          OpcodeVecF64x2ReplaceLaneName,
  1347  	OpcodeVecI8x16Swizzle:              OpcodeVecI8x16SwizzleName,
  1348  	OpcodeVecI8x16Splat:                OpcodeVecI8x16SplatName,
  1349  	OpcodeVecI16x8Splat:                OpcodeVecI16x8SplatName,
  1350  	OpcodeVecI32x4Splat:                OpcodeVecI32x4SplatName,
  1351  	OpcodeVecI64x2Splat:                OpcodeVecI64x2SplatName,
  1352  	OpcodeVecF32x4Splat:                OpcodeVecF32x4SplatName,
  1353  	OpcodeVecF64x2Splat:                OpcodeVecF64x2SplatName,
  1354  	OpcodeVecI8x16Eq:                   OpcodeVecI8x16EqName,
  1355  	OpcodeVecI8x16Ne:                   OpcodeVecI8x16NeName,
  1356  	OpcodeVecI8x16LtS:                  OpcodeVecI8x16LtSName,
  1357  	OpcodeVecI8x16LtU:                  OpcodeVecI8x16LtUName,
  1358  	OpcodeVecI8x16GtS:                  OpcodeVecI8x16GtSName,
  1359  	OpcodeVecI8x16GtU:                  OpcodeVecI8x16GtUName,
  1360  	OpcodeVecI8x16LeS:                  OpcodeVecI8x16LeSName,
  1361  	OpcodeVecI8x16LeU:                  OpcodeVecI8x16LeUName,
  1362  	OpcodeVecI8x16GeS:                  OpcodeVecI8x16GeSName,
  1363  	OpcodeVecI8x16GeU:                  OpcodeVecI8x16GeUName,
  1364  	OpcodeVecI16x8Eq:                   OpcodeVecI16x8EqName,
  1365  	OpcodeVecI16x8Ne:                   OpcodeVecI16x8NeName,
  1366  	OpcodeVecI16x8LtS:                  OpcodeVecI16x8LtSName,
  1367  	OpcodeVecI16x8LtU:                  OpcodeVecI16x8LtUName,
  1368  	OpcodeVecI16x8GtS:                  OpcodeVecI16x8GtSName,
  1369  	OpcodeVecI16x8GtU:                  OpcodeVecI16x8GtUName,
  1370  	OpcodeVecI16x8LeS:                  OpcodeVecI16x8LeSName,
  1371  	OpcodeVecI16x8LeU:                  OpcodeVecI16x8LeUName,
  1372  	OpcodeVecI16x8GeS:                  OpcodeVecI16x8GeSName,
  1373  	OpcodeVecI16x8GeU:                  OpcodeVecI16x8GeUName,
  1374  	OpcodeVecI32x4Eq:                   OpcodeVecI32x4EqName,
  1375  	OpcodeVecI32x4Ne:                   OpcodeVecI32x4NeName,
  1376  	OpcodeVecI32x4LtS:                  OpcodeVecI32x4LtSName,
  1377  	OpcodeVecI32x4LtU:                  OpcodeVecI32x4LtUName,
  1378  	OpcodeVecI32x4GtS:                  OpcodeVecI32x4GtSName,
  1379  	OpcodeVecI32x4GtU:                  OpcodeVecI32x4GtUName,
  1380  	OpcodeVecI32x4LeS:                  OpcodeVecI32x4LeSName,
  1381  	OpcodeVecI32x4LeU:                  OpcodeVecI32x4LeUName,
  1382  	OpcodeVecI32x4GeS:                  OpcodeVecI32x4GeSName,
  1383  	OpcodeVecI32x4GeU:                  OpcodeVecI32x4GeUName,
  1384  	OpcodeVecI64x2Eq:                   OpcodeVecI64x2EqName,
  1385  	OpcodeVecI64x2Ne:                   OpcodeVecI64x2NeName,
  1386  	OpcodeVecI64x2LtS:                  OpcodeVecI64x2LtSName,
  1387  	OpcodeVecI64x2GtS:                  OpcodeVecI64x2GtSName,
  1388  	OpcodeVecI64x2LeS:                  OpcodeVecI64x2LeSName,
  1389  	OpcodeVecI64x2GeS:                  OpcodeVecI64x2GeSName,
  1390  	OpcodeVecF32x4Eq:                   OpcodeVecF32x4EqName,
  1391  	OpcodeVecF32x4Ne:                   OpcodeVecF32x4NeName,
  1392  	OpcodeVecF32x4Lt:                   OpcodeVecF32x4LtName,
  1393  	OpcodeVecF32x4Gt:                   OpcodeVecF32x4GtName,
  1394  	OpcodeVecF32x4Le:                   OpcodeVecF32x4LeName,
  1395  	OpcodeVecF32x4Ge:                   OpcodeVecF32x4GeName,
  1396  	OpcodeVecF64x2Eq:                   OpcodeVecF64x2EqName,
  1397  	OpcodeVecF64x2Ne:                   OpcodeVecF64x2NeName,
  1398  	OpcodeVecF64x2Lt:                   OpcodeVecF64x2LtName,
  1399  	OpcodeVecF64x2Gt:                   OpcodeVecF64x2GtName,
  1400  	OpcodeVecF64x2Le:                   OpcodeVecF64x2LeName,
  1401  	OpcodeVecF64x2Ge:                   OpcodeVecF64x2GeName,
  1402  	OpcodeVecV128Not:                   OpcodeVecV128NotName,
  1403  	OpcodeVecV128And:                   OpcodeVecV128AndName,
  1404  	OpcodeVecV128AndNot:                OpcodeVecV128AndNotName,
  1405  	OpcodeVecV128Or:                    OpcodeVecV128OrName,
  1406  	OpcodeVecV128Xor:                   OpcodeVecV128XorName,
  1407  	OpcodeVecV128Bitselect:             OpcodeVecV128BitselectName,
  1408  	OpcodeVecV128AnyTrue:               OpcodeVecV128AnyTrueName,
  1409  	OpcodeVecI8x16Abs:                  OpcodeVecI8x16AbsName,
  1410  	OpcodeVecI8x16Neg:                  OpcodeVecI8x16NegName,
  1411  	OpcodeVecI8x16Popcnt:               OpcodeVecI8x16PopcntName,
  1412  	OpcodeVecI8x16AllTrue:              OpcodeVecI8x16AllTrueName,
  1413  	OpcodeVecI8x16BitMask:              OpcodeVecI8x16BitMaskName,
  1414  	OpcodeVecI8x16NarrowI16x8S:         OpcodeVecI8x16NarrowI16x8SName,
  1415  	OpcodeVecI8x16NarrowI16x8U:         OpcodeVecI8x16NarrowI16x8UName,
  1416  	OpcodeVecI8x16Shl:                  OpcodeVecI8x16ShlName,
  1417  	OpcodeVecI8x16ShrS:                 OpcodeVecI8x16ShrSName,
  1418  	OpcodeVecI8x16ShrU:                 OpcodeVecI8x16ShrUName,
  1419  	OpcodeVecI8x16Add:                  OpcodeVecI8x16AddName,
  1420  	OpcodeVecI8x16AddSatS:              OpcodeVecI8x16AddSatSName,
  1421  	OpcodeVecI8x16AddSatU:              OpcodeVecI8x16AddSatUName,
  1422  	OpcodeVecI8x16Sub:                  OpcodeVecI8x16SubName,
  1423  	OpcodeVecI8x16SubSatS:              OpcodeVecI8x16SubSatSName,
  1424  	OpcodeVecI8x16SubSatU:              OpcodeVecI8x16SubSatUName,
  1425  	OpcodeVecI8x16MinS:                 OpcodeVecI8x16MinSName,
  1426  	OpcodeVecI8x16MinU:                 OpcodeVecI8x16MinUName,
  1427  	OpcodeVecI8x16MaxS:                 OpcodeVecI8x16MaxSName,
  1428  	OpcodeVecI8x16MaxU:                 OpcodeVecI8x16MaxUName,
  1429  	OpcodeVecI8x16AvgrU:                OpcodeVecI8x16AvgrUName,
  1430  	OpcodeVecI16x8ExtaddPairwiseI8x16S: OpcodeVecI16x8ExtaddPairwiseI8x16SName,
  1431  	OpcodeVecI16x8ExtaddPairwiseI8x16U: OpcodeVecI16x8ExtaddPairwiseI8x16UName,
  1432  	OpcodeVecI16x8Abs:                  OpcodeVecI16x8AbsName,
  1433  	OpcodeVecI16x8Neg:                  OpcodeVecI16x8NegName,
  1434  	OpcodeVecI16x8Q15mulrSatS:          OpcodeVecI16x8Q15mulrSatSName,
  1435  	OpcodeVecI16x8AllTrue:              OpcodeVecI16x8AllTrueName,
  1436  	OpcodeVecI16x8BitMask:              OpcodeVecI16x8BitMaskName,
  1437  	OpcodeVecI16x8NarrowI32x4S:         OpcodeVecI16x8NarrowI32x4SName,
  1438  	OpcodeVecI16x8NarrowI32x4U:         OpcodeVecI16x8NarrowI32x4UName,
  1439  	OpcodeVecI16x8ExtendLowI8x16S:      OpcodeVecI16x8ExtendLowI8x16SName,
  1440  	OpcodeVecI16x8ExtendHighI8x16S:     OpcodeVecI16x8ExtendHighI8x16SName,
  1441  	OpcodeVecI16x8ExtendLowI8x16U:      OpcodeVecI16x8ExtendLowI8x16UName,
  1442  	OpcodeVecI16x8ExtendHighI8x16U:     OpcodeVecI16x8ExtendHighI8x16UName,
  1443  	OpcodeVecI16x8Shl:                  OpcodeVecI16x8ShlName,
  1444  	OpcodeVecI16x8ShrS:                 OpcodeVecI16x8ShrSName,
  1445  	OpcodeVecI16x8ShrU:                 OpcodeVecI16x8ShrUName,
  1446  	OpcodeVecI16x8Add:                  OpcodeVecI16x8AddName,
  1447  	OpcodeVecI16x8AddSatS:              OpcodeVecI16x8AddSatSName,
  1448  	OpcodeVecI16x8AddSatU:              OpcodeVecI16x8AddSatUName,
  1449  	OpcodeVecI16x8Sub:                  OpcodeVecI16x8SubName,
  1450  	OpcodeVecI16x8SubSatS:              OpcodeVecI16x8SubSatSName,
  1451  	OpcodeVecI16x8SubSatU:              OpcodeVecI16x8SubSatUName,
  1452  	OpcodeVecI16x8Mul:                  OpcodeVecI16x8MulName,
  1453  	OpcodeVecI16x8MinS:                 OpcodeVecI16x8MinSName,
  1454  	OpcodeVecI16x8MinU:                 OpcodeVecI16x8MinUName,
  1455  	OpcodeVecI16x8MaxS:                 OpcodeVecI16x8MaxSName,
  1456  	OpcodeVecI16x8MaxU:                 OpcodeVecI16x8MaxUName,
  1457  	OpcodeVecI16x8AvgrU:                OpcodeVecI16x8AvgrUName,
  1458  	OpcodeVecI16x8ExtMulLowI8x16S:      OpcodeVecI16x8ExtMulLowI8x16SName,
  1459  	OpcodeVecI16x8ExtMulHighI8x16S:     OpcodeVecI16x8ExtMulHighI8x16SName,
  1460  	OpcodeVecI16x8ExtMulLowI8x16U:      OpcodeVecI16x8ExtMulLowI8x16UName,
  1461  	OpcodeVecI16x8ExtMulHighI8x16U:     OpcodeVecI16x8ExtMulHighI8x16UName,
  1462  	OpcodeVecI32x4ExtaddPairwiseI16x8S: OpcodeVecI32x4ExtaddPairwiseI16x8SName,
  1463  	OpcodeVecI32x4ExtaddPairwiseI16x8U: OpcodeVecI32x4ExtaddPairwiseI16x8UName,
  1464  	OpcodeVecI32x4Abs:                  OpcodeVecI32x4AbsName,
  1465  	OpcodeVecI32x4Neg:                  OpcodeVecI32x4NegName,
  1466  	OpcodeVecI32x4AllTrue:              OpcodeVecI32x4AllTrueName,
  1467  	OpcodeVecI32x4BitMask:              OpcodeVecI32x4BitMaskName,
  1468  	OpcodeVecI32x4ExtendLowI16x8S:      OpcodeVecI32x4ExtendLowI16x8SName,
  1469  	OpcodeVecI32x4ExtendHighI16x8S:     OpcodeVecI32x4ExtendHighI16x8SName,
  1470  	OpcodeVecI32x4ExtendLowI16x8U:      OpcodeVecI32x4ExtendLowI16x8UName,
  1471  	OpcodeVecI32x4ExtendHighI16x8U:     OpcodeVecI32x4ExtendHighI16x8UName,
  1472  	OpcodeVecI32x4Shl:                  OpcodeVecI32x4ShlName,
  1473  	OpcodeVecI32x4ShrS:                 OpcodeVecI32x4ShrSName,
  1474  	OpcodeVecI32x4ShrU:                 OpcodeVecI32x4ShrUName,
  1475  	OpcodeVecI32x4Add:                  OpcodeVecI32x4AddName,
  1476  	OpcodeVecI32x4Sub:                  OpcodeVecI32x4SubName,
  1477  	OpcodeVecI32x4Mul:                  OpcodeVecI32x4MulName,
  1478  	OpcodeVecI32x4MinS:                 OpcodeVecI32x4MinSName,
  1479  	OpcodeVecI32x4MinU:                 OpcodeVecI32x4MinUName,
  1480  	OpcodeVecI32x4MaxS:                 OpcodeVecI32x4MaxSName,
  1481  	OpcodeVecI32x4MaxU:                 OpcodeVecI32x4MaxUName,
  1482  	OpcodeVecI32x4DotI16x8S:            OpcodeVecI32x4DotI16x8SName,
  1483  	OpcodeVecI32x4ExtMulLowI16x8S:      OpcodeVecI32x4ExtMulLowI16x8SName,
  1484  	OpcodeVecI32x4ExtMulHighI16x8S:     OpcodeVecI32x4ExtMulHighI16x8SName,
  1485  	OpcodeVecI32x4ExtMulLowI16x8U:      OpcodeVecI32x4ExtMulLowI16x8UName,
  1486  	OpcodeVecI32x4ExtMulHighI16x8U:     OpcodeVecI32x4ExtMulHighI16x8UName,
  1487  	OpcodeVecI64x2Abs:                  OpcodeVecI64x2AbsName,
  1488  	OpcodeVecI64x2Neg:                  OpcodeVecI64x2NegName,
  1489  	OpcodeVecI64x2AllTrue:              OpcodeVecI64x2AllTrueName,
  1490  	OpcodeVecI64x2BitMask:              OpcodeVecI64x2BitMaskName,
  1491  	OpcodeVecI64x2ExtendLowI32x4S:      OpcodeVecI64x2ExtendLowI32x4SName,
  1492  	OpcodeVecI64x2ExtendHighI32x4S:     OpcodeVecI64x2ExtendHighI32x4SName,
  1493  	OpcodeVecI64x2ExtendLowI32x4U:      OpcodeVecI64x2ExtendLowI32x4UName,
  1494  	OpcodeVecI64x2ExtendHighI32x4U:     OpcodeVecI64x2ExtendHighI32x4UName,
  1495  	OpcodeVecI64x2Shl:                  OpcodeVecI64x2ShlName,
  1496  	OpcodeVecI64x2ShrS:                 OpcodeVecI64x2ShrSName,
  1497  	OpcodeVecI64x2ShrU:                 OpcodeVecI64x2ShrUName,
  1498  	OpcodeVecI64x2Add:                  OpcodeVecI64x2AddName,
  1499  	OpcodeVecI64x2Sub:                  OpcodeVecI64x2SubName,
  1500  	OpcodeVecI64x2Mul:                  OpcodeVecI64x2MulName,
  1501  	OpcodeVecI64x2ExtMulLowI32x4S:      OpcodeVecI64x2ExtMulLowI32x4SName,
  1502  	OpcodeVecI64x2ExtMulHighI32x4S:     OpcodeVecI64x2ExtMulHighI32x4SName,
  1503  	OpcodeVecI64x2ExtMulLowI32x4U:      OpcodeVecI64x2ExtMulLowI32x4UName,
  1504  	OpcodeVecI64x2ExtMulHighI32x4U:     OpcodeVecI64x2ExtMulHighI32x4UName,
  1505  	OpcodeVecF32x4Ceil:                 OpcodeVecF32x4CeilName,
  1506  	OpcodeVecF32x4Floor:                OpcodeVecF32x4FloorName,
  1507  	OpcodeVecF32x4Trunc:                OpcodeVecF32x4TruncName,
  1508  	OpcodeVecF32x4Nearest:              OpcodeVecF32x4NearestName,
  1509  	OpcodeVecF32x4Abs:                  OpcodeVecF32x4AbsName,
  1510  	OpcodeVecF32x4Neg:                  OpcodeVecF32x4NegName,
  1511  	OpcodeVecF32x4Sqrt:                 OpcodeVecF32x4SqrtName,
  1512  	OpcodeVecF32x4Add:                  OpcodeVecF32x4AddName,
  1513  	OpcodeVecF32x4Sub:                  OpcodeVecF32x4SubName,
  1514  	OpcodeVecF32x4Mul:                  OpcodeVecF32x4MulName,
  1515  	OpcodeVecF32x4Div:                  OpcodeVecF32x4DivName,
  1516  	OpcodeVecF32x4Min:                  OpcodeVecF32x4MinName,
  1517  	OpcodeVecF32x4Max:                  OpcodeVecF32x4MaxName,
  1518  	OpcodeVecF32x4Pmin:                 OpcodeVecF32x4PminName,
  1519  	OpcodeVecF32x4Pmax:                 OpcodeVecF32x4PmaxName,
  1520  	OpcodeVecF64x2Ceil:                 OpcodeVecF64x2CeilName,
  1521  	OpcodeVecF64x2Floor:                OpcodeVecF64x2FloorName,
  1522  	OpcodeVecF64x2Trunc:                OpcodeVecF64x2TruncName,
  1523  	OpcodeVecF64x2Nearest:              OpcodeVecF64x2NearestName,
  1524  	OpcodeVecF64x2Abs:                  OpcodeVecF64x2AbsName,
  1525  	OpcodeVecF64x2Neg:                  OpcodeVecF64x2NegName,
  1526  	OpcodeVecF64x2Sqrt:                 OpcodeVecF64x2SqrtName,
  1527  	OpcodeVecF64x2Add:                  OpcodeVecF64x2AddName,
  1528  	OpcodeVecF64x2Sub:                  OpcodeVecF64x2SubName,
  1529  	OpcodeVecF64x2Mul:                  OpcodeVecF64x2MulName,
  1530  	OpcodeVecF64x2Div:                  OpcodeVecF64x2DivName,
  1531  	OpcodeVecF64x2Min:                  OpcodeVecF64x2MinName,
  1532  	OpcodeVecF64x2Max:                  OpcodeVecF64x2MaxName,
  1533  	OpcodeVecF64x2Pmin:                 OpcodeVecF64x2PminName,
  1534  	OpcodeVecF64x2Pmax:                 OpcodeVecF64x2PmaxName,
  1535  	OpcodeVecI32x4TruncSatF32x4S:       OpcodeVecI32x4TruncSatF32x4SName,
  1536  	OpcodeVecI32x4TruncSatF32x4U:       OpcodeVecI32x4TruncSatF32x4UName,
  1537  	OpcodeVecF32x4ConvertI32x4S:        OpcodeVecF32x4ConvertI32x4SName,
  1538  	OpcodeVecF32x4ConvertI32x4U:        OpcodeVecF32x4ConvertI32x4UName,
  1539  	OpcodeVecI32x4TruncSatF64x2SZero:   OpcodeVecI32x4TruncSatF64x2SZeroName,
  1540  	OpcodeVecI32x4TruncSatF64x2UZero:   OpcodeVecI32x4TruncSatF64x2UZeroName,
  1541  	OpcodeVecF64x2ConvertLowI32x4S:     OpcodeVecF64x2ConvertLowI32x4SName,
  1542  	OpcodeVecF64x2ConvertLowI32x4U:     OpcodeVecF64x2ConvertLowI32x4UName,
  1543  	OpcodeVecF32x4DemoteF64x2Zero:      OpcodeVecF32x4DemoteF64x2ZeroName,
  1544  	OpcodeVecF64x2PromoteLowF32x4Zero:  OpcodeVecF64x2PromoteLowF32x4ZeroName,
  1545  }
  1546  
  1547  // VectorInstructionName returns the instruction name corresponding to the vector Opcode.
  1548  func VectorInstructionName(oc OpcodeVec) (ret string) {
  1549  	return vectorInstructionName[oc]
  1550  }