Rizin
unix-like reverse engineering framework and cli tools
wasm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2017 Anton Kochkov <xvilka@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef WASM_ASM_H
5 #define WASM_ASM_H
6 #include <rz_util.h>
7 
8 /***
9  * Core
10  **/
11 typedef enum {
12 
13  // Control flow operators
14  WASM_OP_TRAP = 0x00,
20  WASM_OP_END = 0x0b,
25 
26  // Call operators
27  WASM_OP_CALL = 0x10,
29 
30  // Parametric operators
31  WASM_OP_DROP = 0x1a,
33 
34  // Variable access
40 
41  // Memory-related operators
67 
68  // Constants
73 
74  // Comparison operators
109 
110  // Numeric operators
175 
176  // Conversions
198 
199  // Reinterpretations
204 
205 } WasmOpCodes;
206 
207 /***
208  * Thread extension (0xFE ...)
209  **/
210 typedef enum {
211 
212  // Wait and notify
216 
217  // Load/Store
232 
233  // Read-Modify-Write
276 
277  // Compare exchange
285 
287 
288 /***
289  * SIMD extension (0xFD ...)
290  **/
291 typedef enum {
292  // load ops
306 
307  // lane ops
330 
331  // cmp ops
374 
375  // bitwise
382 
383  // arithmetic
472 
473  // conversion
479 
480 typedef enum {
484 } WasmTypeOp;
485 
486 typedef struct {
487  union {
491  } op;
493  int len;
494  char *txt;
495 } WasmOp;
496 
497 typedef struct {
498  const char *txt;
499  size_t min, max;
500 } WasmOpDef;
501 
502 #ifndef WASM_NO_ASM
503 RZ_IPI int wasm_asm(const char *str, unsigned char *buf, int buf_len);
504 #endif
505 RZ_IPI int wasm_dis(WasmOp *op, const unsigned char *buf, int buf_len);
506 
507 #endif
ut8 op
Definition: 6502dis.c:13
#define RZ_IPI
Definition: analysis_wasm.c:11
WasmOpCodes
Definition: wasm.h:11
@ WASM_OP_CALL
Definition: wasm.h:27
@ WASM_OP_F32LOAD
Definition: wasm.h:44
@ WASM_OP_I32TRUNCUF64
Definition: wasm.h:181
@ WASM_OP_I64LES
Definition: wasm.h:93
@ WASM_OP_F64CONVERTUI32
Definition: wasm.h:194
@ WASM_OP_LOOP
Definition: wasm.h:17
@ WASM_OP_I32REMU
Definition: wasm.h:120
@ WASM_OP_I64EQ
Definition: wasm.h:87
@ WASM_OP_SELECT
Definition: wasm.h:32
@ WASM_OP_F32SUB
Definition: wasm.h:155
@ WASM_OP_I64LOAD
Definition: wasm.h:43
@ WASM_OP_I32LOAD16S
Definition: wasm.h:48
@ WASM_OP_GROWMEMORY
Definition: wasm.h:66
@ WASM_OP_I64DIVU
Definition: wasm.h:136
@ WASM_OP_I64GTU
Definition: wasm.h:92
@ WASM_OP_F32NEG
Definition: wasm.h:148
@ WASM_OP_I64LTS
Definition: wasm.h:89
@ WASM_OP_I64LOAD8S
Definition: wasm.h:50
@ WASM_OP_I32GTS
Definition: wasm.h:80
@ WASM_OP_F32EQ
Definition: wasm.h:97
@ WASM_OP_F64REINTERPRETI64
Definition: wasm.h:203
@ WASM_OP_I64STORE
Definition: wasm.h:57
@ WASM_OP_I64LOAD32U
Definition: wasm.h:55
@ WASM_OP_I64SHL
Definition: wasm.h:142
@ WASM_OP_BLOCK
Definition: wasm.h:16
@ WASM_OP_F32REINTERPRETI32
Definition: wasm.h:202
@ WASM_OP_I64ROTR
Definition: wasm.h:146
@ WASM_OP_F32FLOOR
Definition: wasm.h:150
@ WASM_OP_TRAP
Definition: wasm.h:14
@ WASM_OP_I64ROTL
Definition: wasm.h:145
@ WASM_OP_F64FLOOR
Definition: wasm.h:164
@ WASM_OP_F64LOAD
Definition: wasm.h:45
@ WASM_OP_F64GT
Definition: wasm.h:106
@ WASM_OP_I32SUB
Definition: wasm.h:115
@ WASM_OP_BRIF
Definition: wasm.h:22
@ WASM_OP_F32MIN
Definition: wasm.h:158
@ WASM_OP_I32MUL
Definition: wasm.h:116
@ WASM_OP_SETGLOBAL
Definition: wasm.h:39
@ WASM_OP_I32LTS
Definition: wasm.h:78
@ WASM_OP_F32ADD
Definition: wasm.h:154
@ WASM_OP_I32LOAD16U
Definition: wasm.h:49
@ WASM_OP_F64SUB
Definition: wasm.h:169
@ WASM_OP_F32CONVERTUI32
Definition: wasm.h:189
@ WASM_OP_F32CONVERTSI32
Definition: wasm.h:188
@ WASM_OP_I64DIVS
Definition: wasm.h:135
@ WASM_OP_I32POPCNT
Definition: wasm.h:113
@ WASM_OP_I32EQ
Definition: wasm.h:76
@ WASM_OP_I32CONST
Definition: wasm.h:69
@ WASM_OP_I32GES
Definition: wasm.h:84
@ WASM_OP_ELSE
Definition: wasm.h:19
@ WASM_OP_F32CEIL
Definition: wasm.h:149
@ WASM_OP_F64CONVERTSI32
Definition: wasm.h:193
@ WASM_OP_I32GTU
Definition: wasm.h:81
@ WASM_OP_I64STORE16
Definition: wasm.h:63
@ WASM_OP_F64MUL
Definition: wasm.h:170
@ WASM_OP_I64REINTERPRETF64
Definition: wasm.h:201
@ WASM_OP_I64REMS
Definition: wasm.h:137
@ WASM_OP_I64LOAD16U
Definition: wasm.h:53
@ WASM_OP_F64STORE
Definition: wasm.h:59
@ WASM_OP_I64AND
Definition: wasm.h:139
@ WASM_OP_I32AND
Definition: wasm.h:121
@ WASM_OP_F32DIV
Definition: wasm.h:157
@ WASM_OP_CURRENTMEMORY
Definition: wasm.h:65
@ WASM_OP_F32DEMOTEF64
Definition: wasm.h:192
@ WASM_OP_I32LOAD8S
Definition: wasm.h:46
@ WASM_OP_I64EXTENDUI32
Definition: wasm.h:183
@ WASM_OP_F32TRUNC
Definition: wasm.h:151
@ WASM_OP_F32NEAREST
Definition: wasm.h:152
@ WASM_OP_I32EQZ
Definition: wasm.h:75
@ WASM_OP_END
Definition: wasm.h:20
@ WASM_OP_I64SUB
Definition: wasm.h:133
@ WASM_OP_I64SHRU
Definition: wasm.h:144
@ WASM_OP_I32LOAD8U
Definition: wasm.h:47
@ WASM_OP_GETLOCAL
Definition: wasm.h:35
@ WASM_OP_I64CONST
Definition: wasm.h:70
@ WASM_OP_CALLINDIRECT
Definition: wasm.h:28
@ WASM_OP_F64SQRT
Definition: wasm.h:167
@ WASM_OP_GETGLOBAL
Definition: wasm.h:38
@ WASM_OP_I64LOAD32S
Definition: wasm.h:54
@ WASM_OP_I32STORE8
Definition: wasm.h:60
@ WASM_OP_I32NE
Definition: wasm.h:77
@ WASM_OP_I32LEU
Definition: wasm.h:83
@ WASM_OP_I32TRUNCUF32
Definition: wasm.h:179
@ WASM_OP_F32LE
Definition: wasm.h:101
@ WASM_OP_I32ROTR
Definition: wasm.h:128
@ WASM_OP_I64SHRS
Definition: wasm.h:143
@ WASM_OP_I32TRUNCSF64
Definition: wasm.h:180
@ WASM_OP_F32GT
Definition: wasm.h:100
@ WASM_OP_F64CEIL
Definition: wasm.h:163
@ WASM_OP_I64NE
Definition: wasm.h:88
@ WASM_OP_F32CONVERTUI64
Definition: wasm.h:191
@ WASM_OP_I32CTZ
Definition: wasm.h:112
@ WASM_OP_I64GES
Definition: wasm.h:95
@ WASM_OP_I32ROTL
Definition: wasm.h:127
@ WASM_OP_I32LOAD
Definition: wasm.h:42
@ WASM_OP_NOP
Definition: wasm.h:15
@ WASM_OP_F64CONST
Definition: wasm.h:72
@ WASM_OP_F64LE
Definition: wasm.h:107
@ WASM_OP_I64GEU
Definition: wasm.h:96
@ WASM_OP_I64TRUNCUF32
Definition: wasm.h:185
@ WASM_OP_I32OR
Definition: wasm.h:122
@ WASM_OP_I32ADD
Definition: wasm.h:114
@ WASM_OP_I64TRUNCSF64
Definition: wasm.h:186
@ WASM_OP_F32CONST
Definition: wasm.h:71
@ WASM_OP_I32SHRS
Definition: wasm.h:125
@ WASM_OP_F64NEG
Definition: wasm.h:162
@ WASM_OP_F32SQRT
Definition: wasm.h:153
@ WASM_OP_I64MUL
Definition: wasm.h:134
@ WASM_OP_F32STORE
Definition: wasm.h:58
@ WASM_OP_F32GE
Definition: wasm.h:102
@ WASM_OP_I64REMU
Definition: wasm.h:138
@ WASM_OP_F32ABS
Definition: wasm.h:147
@ WASM_OP_F64NE
Definition: wasm.h:104
@ WASM_OP_F64PROMOTEF32
Definition: wasm.h:197
@ WASM_OP_I64STORE8
Definition: wasm.h:62
@ WASM_OP_I32REMS
Definition: wasm.h:119
@ WASM_OP_F64CONVERTSI64
Definition: wasm.h:195
@ WASM_OP_F64EQ
Definition: wasm.h:103
@ WASM_OP_I32CLZ
Definition: wasm.h:111
@ WASM_OP_I32XOR
Definition: wasm.h:123
@ WASM_OP_SETLOCAL
Definition: wasm.h:36
@ WASM_OP_F64ADD
Definition: wasm.h:168
@ WASM_OP_BRTABLE
Definition: wasm.h:23
@ WASM_OP_I32REINTERPRETF32
Definition: wasm.h:200
@ WASM_OP_F32MAX
Definition: wasm.h:159
@ WASM_OP_F64DIV
Definition: wasm.h:171
@ WASM_OP_F64LT
Definition: wasm.h:105
@ WASM_OP_I32STORE16
Definition: wasm.h:61
@ WASM_OP_BR
Definition: wasm.h:21
@ WASM_OP_I32STORE
Definition: wasm.h:56
@ WASM_OP_F32LT
Definition: wasm.h:99
@ WASM_OP_I64CTZ
Definition: wasm.h:130
@ WASM_OP_I64ADD
Definition: wasm.h:132
@ WASM_OP_I64LEU
Definition: wasm.h:94
@ WASM_OP_I32LTU
Definition: wasm.h:79
@ WASM_OP_I64POPCNT
Definition: wasm.h:131
@ WASM_OP_I64TRUNCSF32
Definition: wasm.h:184
@ WASM_OP_F32MUL
Definition: wasm.h:156
@ WASM_OP_I32DIVS
Definition: wasm.h:117
@ WASM_OP_I64STORE32
Definition: wasm.h:64
@ WASM_OP_F64ABS
Definition: wasm.h:161
@ WASM_OP_F32NE
Definition: wasm.h:98
@ WASM_OP_I32TRUNCSF32
Definition: wasm.h:178
@ WASM_OP_F64MAX
Definition: wasm.h:173
@ WASM_OP_I64GTS
Definition: wasm.h:91
@ WASM_OP_I64TRUNCUF64
Definition: wasm.h:187
@ WASM_OP_I32LES
Definition: wasm.h:82
@ WASM_OP_F64GE
Definition: wasm.h:108
@ WASM_OP_I32DIVU
Definition: wasm.h:118
@ WASM_OP_F64MIN
Definition: wasm.h:172
@ WASM_OP_I32GEU
Definition: wasm.h:85
@ WASM_OP_I32SHRU
Definition: wasm.h:126
@ WASM_OP_F64NEAREST
Definition: wasm.h:166
@ WASM_OP_I64LOAD16S
Definition: wasm.h:52
@ WASM_OP_I64OR
Definition: wasm.h:140
@ WASM_OP_I64EXTENDSI32
Definition: wasm.h:182
@ WASM_OP_I64LTU
Definition: wasm.h:90
@ WASM_OP_DROP
Definition: wasm.h:31
@ WASM_OP_I64XOR
Definition: wasm.h:141
@ WASM_OP_I32WRAPI64
Definition: wasm.h:177
@ WASM_OP_TEELOCAL
Definition: wasm.h:37
@ WASM_OP_F32COPYSIGN
Definition: wasm.h:160
@ WASM_OP_I64EQZ
Definition: wasm.h:86
@ WASM_OP_F32CONVERTSI64
Definition: wasm.h:190
@ WASM_OP_I64LOAD8U
Definition: wasm.h:51
@ WASM_OP_I64CLZ
Definition: wasm.h:129
@ WASM_OP_F64TRUNC
Definition: wasm.h:165
@ WASM_OP_F64COPYSIGN
Definition: wasm.h:174
@ WASM_OP_IF
Definition: wasm.h:18
@ WASM_OP_F64CONVERTUI64
Definition: wasm.h:196
@ WASM_OP_I32SHL
Definition: wasm.h:124
@ WASM_OP_RETURN
Definition: wasm.h:24
WasmOpSimdCodes
Definition: wasm.h:291
@ WASM_OP_I16X8ADDSATURATEU
Definition: wasm.h:419
@ WASM_OP_I8X16SUBSATURATEU
Definition: wasm.h:398
@ WASM_OP_F64X2SPLAT
Definition: wasm.h:315
@ WASM_OP_I32X4MAXS
Definition: wasm.h:445
@ WASM_OP_I32X4WIDENLOWI16X8U
Definition: wasm.h:435
@ WASM_OP_I16X8GTU
Definition: wasm.h:347
@ WASM_OP_I32X4MINU
Definition: wasm.h:444
@ WASM_OP_I32X4ADD
Definition: wasm.h:440
@ WASM_OP_I16X8SHL
Definition: wasm.h:414
@ WASM_OP_I32X4SHRU
Definition: wasm.h:439
@ WASM_OP_I64X2NEG
Definition: wasm.h:447
@ WASM_OP_V128BITSELECT
Definition: wasm.h:381
@ WASM_OP_F32X4SPLAT
Definition: wasm.h:314
@ WASM_OP_I8X16LTU
Definition: wasm.h:335
@ WASM_OP_F32X4GT
Definition: wasm.h:365
@ WASM_OP_I16X8NARROWI32X4U
Definition: wasm.h:409
@ WASM_OP_F64X2NE
Definition: wasm.h:369
@ WASM_OP_I8X16SPLAT
Definition: wasm.h:310
@ WASM_OP_I32X4MINS
Definition: wasm.h:443
@ WASM_OP_V128STORE
Definition: wasm.h:304
@ WASM_OP_F32X4MUL
Definition: wasm.h:459
@ WASM_OP_I8X16GEU
Definition: wasm.h:341
@ WASM_OP_I32X4SUB
Definition: wasm.h:441
@ WASM_OP_I16X8LOAD8X8U
Definition: wasm.h:295
@ WASM_OP_F32X4ADD
Definition: wasm.h:457
@ WASM_OP_F64X2MUL
Definition: wasm.h:468
@ WASM_OP_V32X4LOADSPLAT
Definition: wasm.h:302
@ WASM_OP_V128AND
Definition: wasm.h:377
@ WASM_OP_I8X16EXTRACTLANES
Definition: wasm.h:316
@ WASM_OP_I64X2EXTRACTLANE
Definition: wasm.h:324
@ WASM_OP_I8X16ANYTRUE
Definition: wasm.h:386
@ WASM_OP_I16X8SUB
Definition: wasm.h:420
@ WASM_OP_I32X4ALLTRUE
Definition: wasm.h:432
@ WASM_OP_F64X2NEG
Definition: wasm.h:464
@ WASM_OP_I32X4GEU
Definition: wasm.h:361
@ WASM_OP_I64X2SHRS
Definition: wasm.h:449
@ WASM_OP_F32X4ABS
Definition: wasm.h:454
@ WASM_OP_I8X16SHL
Definition: wasm.h:390
@ WASM_OP_F32X4CONVERTI32X4U
Definition: wasm.h:477
@ WASM_OP_F64X2REPLACELANE
Definition: wasm.h:329
@ WASM_OP_I8X16EXTRACTLANEU
Definition: wasm.h:317
@ WASM_OP_I16X8ABS
Definition: wasm.h:404
@ WASM_OP_F64X2SQRT
Definition: wasm.h:465
@ WASM_OP_V16X8LOADSPLAT
Definition: wasm.h:301
@ WASM_OP_V128CONST
Definition: wasm.h:305
@ WASM_OP_F32X4NE
Definition: wasm.h:363
@ WASM_OP_V8X16LOADSPLAT
Definition: wasm.h:300
@ WASM_OP_F64X2MAX
Definition: wasm.h:471
@ WASM_OP_I32X4ABS
Definition: wasm.h:429
@ WASM_OP_I8X16LTS
Definition: wasm.h:334
@ WASM_OP_I8X16AVGRU
Definition: wasm.h:403
@ WASM_OP_I16X8ANYTRUE
Definition: wasm.h:406
@ WASM_OP_F32X4DIV
Definition: wasm.h:460
@ WASM_OP_I32X4LTU
Definition: wasm.h:355
@ WASM_OP_V8X16SHUFFLE
Definition: wasm.h:308
@ WASM_OP_F32X4MAX
Definition: wasm.h:462
@ WASM_OP_I16X8WIDENLOWI8X16S
Definition: wasm.h:410
@ WASM_OP_I8X16NEG
Definition: wasm.h:385
@ WASM_OP_I16X8AVGRU
Definition: wasm.h:428
@ WASM_OP_I32X4ANYTRUE
Definition: wasm.h:431
@ WASM_OP_F32X4CONVERTI32X4S
Definition: wasm.h:476
@ WASM_OP_I64X2SHL
Definition: wasm.h:448
@ WASM_OP_I32X4TRUNCSATF32X4S
Definition: wasm.h:474
@ WASM_OP_I8X16GES
Definition: wasm.h:340
@ WASM_OP_V128LOAD
Definition: wasm.h:293
@ WASM_OP_I8X16EQ
Definition: wasm.h:332
@ WASM_OP_V128NOT
Definition: wasm.h:376
@ WASM_OP_I16X8EXTRACTLANEU
Definition: wasm.h:320
@ WASM_OP_I16X8MAXU
Definition: wasm.h:427
@ WASM_OP_I64X2REPLACELANE
Definition: wasm.h:325
@ WASM_OP_I32X4MAXU
Definition: wasm.h:446
@ WASM_OP_F32X4SQRT
Definition: wasm.h:456
@ WASM_OP_I32X4SHL
Definition: wasm.h:437
@ WASM_OP_F64X2ABS
Definition: wasm.h:463
@ WASM_OP_I32X4SHRS
Definition: wasm.h:438
@ WASM_OP_F32X4SUB
Definition: wasm.h:458
@ WASM_OP_F32X4EQ
Definition: wasm.h:362
@ WASM_OP_I16X8MINS
Definition: wasm.h:424
@ WASM_OP_I16X8ALLTRUE
Definition: wasm.h:407
@ WASM_OP_I64X2LOAD32X2U
Definition: wasm.h:299
@ WASM_OP_I8X16NARROWI16X8S
Definition: wasm.h:388
@ WASM_OP_F64X2LT
Definition: wasm.h:370
@ WASM_OP_I64X2SUB
Definition: wasm.h:452
@ WASM_OP_I64X2LOAD32X2S
Definition: wasm.h:298
@ WASM_OP_I8X16ADD
Definition: wasm.h:393
@ WASM_OP_I8X16ADDSATURATES
Definition: wasm.h:394
@ WASM_OP_I32X4TRUNCSATF32X4U
Definition: wasm.h:475
@ WASM_OP_F32X4REPLACELANE
Definition: wasm.h:327
@ WASM_OP_I16X8SPLAT
Definition: wasm.h:311
@ WASM_OP_I8X16NARROWI16X8U
Definition: wasm.h:389
@ WASM_OP_I16X8ADD
Definition: wasm.h:417
@ WASM_OP_I32X4WIDENHIGHI16X8U
Definition: wasm.h:436
@ WASM_OP_F64X2MIN
Definition: wasm.h:470
@ WASM_OP_I16X8SHRU
Definition: wasm.h:416
@ WASM_OP_I64X2SHRU
Definition: wasm.h:450
@ WASM_OP_F64X2LE
Definition: wasm.h:372
@ WASM_OP_F64X2SUB
Definition: wasm.h:467
@ WASM_OP_I32X4LTS
Definition: wasm.h:354
@ WASM_OP_I32X4REPLACELANE
Definition: wasm.h:323
@ WASM_OP_I32X4MUL
Definition: wasm.h:442
@ WASM_OP_I32X4NEG
Definition: wasm.h:430
@ WASM_OP_I16X8SUBSATURATEU
Definition: wasm.h:422
@ WASM_OP_I16X8EXTRACTLANES
Definition: wasm.h:319
@ WASM_OP_I8X16SHRU
Definition: wasm.h:392
@ WASM_OP_I8X16ADDSATURATEU
Definition: wasm.h:395
@ WASM_OP_F32X4NEG
Definition: wasm.h:455
@ WASM_OP_I32X4GTU
Definition: wasm.h:357
@ WASM_OP_F64X2DIV
Definition: wasm.h:469
@ WASM_OP_I16X8LEU
Definition: wasm.h:349
@ WASM_OP_I32X4GES
Definition: wasm.h:360
@ WASM_OP_V128XOR
Definition: wasm.h:380
@ WASM_OP_I16X8GEU
Definition: wasm.h:351
@ WASM_OP_I8X16SUBSATURATES
Definition: wasm.h:397
@ WASM_OP_I16X8NEG
Definition: wasm.h:405
@ WASM_OP_I16X8MINU
Definition: wasm.h:425
@ WASM_OP_I32X4LOAD16X4U
Definition: wasm.h:297
@ WASM_OP_V64X2LOADSPLAT
Definition: wasm.h:303
@ WASM_OP_I32X4LOAD16X4S
Definition: wasm.h:296
@ WASM_OP_I16X8GES
Definition: wasm.h:350
@ WASM_OP_I16X8LTU
Definition: wasm.h:345
@ WASM_OP_I8X16ALLTRUE
Definition: wasm.h:387
@ WASM_OP_I64X2ADD
Definition: wasm.h:451
@ WASM_OP_I16X8WIDENHIGHI8X16S
Definition: wasm.h:411
@ WASM_OP_I8X16GTS
Definition: wasm.h:336
@ WASM_OP_I8X16REPLACELANE
Definition: wasm.h:318
@ WASM_OP_I32X4EQ
Definition: wasm.h:352
@ WASM_OP_I16X8LES
Definition: wasm.h:348
@ WASM_OP_I16X8LOAD8X8S
Definition: wasm.h:294
@ WASM_OP_V8X16SWIZZLE
Definition: wasm.h:309
@ WASM_OP_I32X4WIDENLOWI16X8S
Definition: wasm.h:433
@ WASM_OP_I16X8GTS
Definition: wasm.h:346
@ WASM_OP_I32X4SPLAT
Definition: wasm.h:312
@ WASM_OP_I16X8MAXS
Definition: wasm.h:426
@ WASM_OP_F64X2GE
Definition: wasm.h:373
@ WASM_OP_I16X8WIDENLOWI8X16U
Definition: wasm.h:412
@ WASM_OP_I16X8ADDSATURATES
Definition: wasm.h:418
@ WASM_OP_I8X16NE
Definition: wasm.h:333
@ WASM_OP_I64X2SPLAT
Definition: wasm.h:313
@ WASM_OP_I8X16LEU
Definition: wasm.h:339
@ WASM_OP_F32X4GE
Definition: wasm.h:367
@ WASM_OP_I8X16SHRS
Definition: wasm.h:391
@ WASM_OP_I32X4GTS
Definition: wasm.h:356
@ WASM_OP_V128ANDNOT
Definition: wasm.h:378
@ WASM_OP_I32X4WIDENHIGHI16X8S
Definition: wasm.h:434
@ WASM_OP_I16X8SUBSATURATES
Definition: wasm.h:421
@ WASM_OP_I8X16LES
Definition: wasm.h:338
@ WASM_OP_F64X2EQ
Definition: wasm.h:368
@ WASM_OP_V128OR
Definition: wasm.h:379
@ WASM_OP_F32X4LE
Definition: wasm.h:366
@ WASM_OP_I32X4LEU
Definition: wasm.h:359
@ WASM_OP_I8X16GTU
Definition: wasm.h:337
@ WASM_OP_F64X2GT
Definition: wasm.h:371
@ WASM_OP_F32X4MIN
Definition: wasm.h:461
@ WASM_OP_I16X8WIDENHIGHI8X16U
Definition: wasm.h:413
@ WASM_OP_F64X2EXTRACTLANE
Definition: wasm.h:328
@ WASM_OP_F32X4EXTRACTLANE
Definition: wasm.h:326
@ WASM_OP_I8X16MAXS
Definition: wasm.h:401
@ WASM_OP_I32X4LES
Definition: wasm.h:358
@ WASM_OP_I8X16MINU
Definition: wasm.h:400
@ WASM_OP_I8X16MINS
Definition: wasm.h:399
@ WASM_OP_I16X8LTS
Definition: wasm.h:344
@ WASM_OP_F64X2ADD
Definition: wasm.h:466
@ WASM_OP_I32X4NE
Definition: wasm.h:353
@ WASM_OP_I16X8MUL
Definition: wasm.h:423
@ WASM_OP_I32X4EXTRACTLANE
Definition: wasm.h:322
@ WASM_OP_F32X4LT
Definition: wasm.h:364
@ WASM_OP_I8X16MAXU
Definition: wasm.h:402
@ WASM_OP_I16X8REPLACELANE
Definition: wasm.h:321
@ WASM_OP_I8X16ABS
Definition: wasm.h:384
@ WASM_OP_I64X2MUL
Definition: wasm.h:453
@ WASM_OP_I8X16SUB
Definition: wasm.h:396
@ WASM_OP_I16X8EQ
Definition: wasm.h:342
@ WASM_OP_I16X8SHRS
Definition: wasm.h:415
@ WASM_OP_I16X8NE
Definition: wasm.h:343
@ WASM_OP_I16X8NARROWI32X4S
Definition: wasm.h:408
WasmOpAtomicCodes
Definition: wasm.h:210
@ WASM_OP_I32ATOMICRMWSUB
Definition: wasm.h:243
@ WASM_OP_I32ATOMICRMW16UOR
Definition: wasm.h:258
@ WASM_OP_I32ATOMICWAIT
Definition: wasm.h:214
@ WASM_OP_I64ATOMICLOAD16U
Definition: wasm.h:223
@ WASM_OP_I32ATOMICRMW16USUB
Definition: wasm.h:242
@ WASM_OP_I64ATOMICLOAD32U
Definition: wasm.h:224
@ WASM_OP_I32ATOMICRMW8UAND
Definition: wasm.h:250
@ WASM_OP_I64ATOMICLOAD8U
Definition: wasm.h:222
@ WASM_OP_I32ATOMICRMW8UXOR
Definition: wasm.h:264
@ WASM_OP_I64ATOMICRMW32UOR
Definition: wasm.h:261
@ WASM_OP_I64ATOMICRMW32UCMPXCHG
Definition: wasm.h:284
@ WASM_OP_I32ATOMICRMW8UOR
Definition: wasm.h:257
@ WASM_OP_I64ATOMICRMW8UAND
Definition: wasm.h:252
@ WASM_OP_I64ATOMICRMW8UOR
Definition: wasm.h:259
@ WASM_OP_I64ATOMICRMW16UADD
Definition: wasm.h:239
@ WASM_OP_I32ATOMICRMWOR
Definition: wasm.h:255
@ WASM_OP_I64ATOMICRMW32UADD
Definition: wasm.h:240
@ WASM_OP_I32ATOMICSTORE16
Definition: wasm.h:228
@ WASM_OP_I32ATOMICRMW8UADD
Definition: wasm.h:236
@ WASM_OP_I64ATOMICLOAD
Definition: wasm.h:219
@ WASM_OP_I64ATOMICSTORE32
Definition: wasm.h:231
@ WASM_OP_ATOMICNOTIFY
Definition: wasm.h:213
@ WASM_OP_I32ATOMICRMW16UCMPXCHG
Definition: wasm.h:281
@ WASM_OP_I64ATOMICRMW8UXCHG
Definition: wasm.h:273
@ WASM_OP_I32ATOMICRMW8USUB
Definition: wasm.h:241
@ WASM_OP_I32ATOMICSTORE
Definition: wasm.h:225
@ WASM_OP_I32ATOMICRMWXOR
Definition: wasm.h:262
@ WASM_OP_I32ATOMICRMW16UADD
Definition: wasm.h:237
@ WASM_OP_I64ATOMICSTORE8
Definition: wasm.h:229
@ WASM_OP_I64ATOMICRMW32UXOR
Definition: wasm.h:268
@ WASM_OP_I32ATOMICLOAD16U
Definition: wasm.h:221
@ WASM_OP_I64ATOMICRMWXCHG
Definition: wasm.h:270
@ WASM_OP_I32ATOMICLOAD8U
Definition: wasm.h:220
@ WASM_OP_I32ATOMICRMW8UCMPXCHG
Definition: wasm.h:280
@ WASM_OP_I64ATOMICRMW16UAND
Definition: wasm.h:253
@ WASM_OP_I64ATOMICRMW32UAND
Definition: wasm.h:254
@ WASM_OP_I64ATOMICRMW16UXOR
Definition: wasm.h:267
@ WASM_OP_I32ATOMICRMWXCHG
Definition: wasm.h:269
@ WASM_OP_I64ATOMICRMWOR
Definition: wasm.h:256
@ WASM_OP_I64ATOMICRMWAND
Definition: wasm.h:249
@ WASM_OP_I32ATOMICSTORE8
Definition: wasm.h:227
@ WASM_OP_I64ATOMICSTORE16
Definition: wasm.h:230
@ WASM_OP_I32ATOMICRMW16UAND
Definition: wasm.h:251
@ WASM_OP_I64ATOMICRMWCMPXCHG
Definition: wasm.h:279
@ WASM_OP_I64ATOMICRMW8UADD
Definition: wasm.h:238
@ WASM_OP_I32ATOMICRMWAND
Definition: wasm.h:248
@ WASM_OP_I64ATOMICSTORE
Definition: wasm.h:226
@ WASM_OP_I32ATOMICRMW16UXCHG
Definition: wasm.h:272
@ WASM_OP_I64ATOMICRMW16UOR
Definition: wasm.h:260
@ WASM_OP_I32ATOMICLOAD
Definition: wasm.h:218
@ WASM_OP_I64ATOMICRMW16UXCHG
Definition: wasm.h:274
@ WASM_OP_I32ATOMICRMW8UXCHG
Definition: wasm.h:271
@ WASM_OP_I64ATOMICRMW32USUB
Definition: wasm.h:246
@ WASM_OP_I64ATOMICRMW32UXCHG
Definition: wasm.h:275
@ WASM_OP_I64ATOMICRMW8USUB
Definition: wasm.h:244
@ WASM_OP_I32ATOMICRMW16UXOR
Definition: wasm.h:265
@ WASM_OP_I64ATOMICRMW8UXOR
Definition: wasm.h:266
@ WASM_OP_I64ATOMICRMW16UCMPXCHG
Definition: wasm.h:283
@ WASM_OP_I32ATOMICRMWADD
Definition: wasm.h:234
@ WASM_OP_I32ATOMICRMWCMPXCHG
Definition: wasm.h:278
@ WASM_OP_I64ATOMICRMW8UCMPXCHG
Definition: wasm.h:282
@ WASM_OP_I64ATOMICWAIT
Definition: wasm.h:215
@ WASM_OP_I64ATOMICRMWSUB
Definition: wasm.h:247
@ WASM_OP_I64ATOMICRMWADD
Definition: wasm.h:235
@ WASM_OP_I64ATOMICRMWXOR
Definition: wasm.h:263
@ WASM_OP_I64ATOMICRMW16USUB
Definition: wasm.h:245
RZ_IPI int wasm_dis(WasmOp *op, const unsigned char *buf, int buf_len)
Definition: wasm.c:479
RZ_IPI int wasm_asm(const char *str, unsigned char *buf, int buf_len)
WasmTypeOp
Definition: wasm.h:480
@ WASM_TYPE_OP_ATOMIC
Definition: wasm.h:482
@ WASM_TYPE_OP_SIMD
Definition: wasm.h:483
@ WASM_TYPE_OP_CORE
Definition: wasm.h:481
static int buf_len
Definition: asm_arc.c:22
voidpf void * buf
Definition: ioapi.h:138
#define min(a, b)
Definition: qsort.h:83
size_t max
Definition: wasm.h:499
const char * txt
Definition: wasm.h:498
Definition: wasm.h:486
WasmTypeOp type
Definition: wasm.h:492
WasmOpAtomicCodes atomic
Definition: wasm.h:489
WasmOpCodes core
Definition: wasm.h:488
char * txt
Definition: wasm.h:494
int len
Definition: wasm.h:493
WasmOpSimdCodes simd
Definition: wasm.h:490
Definition: dis.c:32