Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: src/wasm/wasm-opcodes.h

Issue 2943773002: [wasm] SIMD/Atomics ops update to use the right prefix opcodes (Closed)
Patch Set: Fix shuffle opcode Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-text.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_WASM_OPCODES_H_ 5 #ifndef V8_WASM_OPCODES_H_
6 #define V8_WASM_OPCODES_H_ 6 #define V8_WASM_OPCODES_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 #include "src/runtime/runtime.h" 10 #include "src/runtime/runtime.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 V(F64LoadMem, 0x2b, d_i) \ 88 V(F64LoadMem, 0x2b, d_i) \
89 V(I32LoadMem8S, 0x2c, i_i) \ 89 V(I32LoadMem8S, 0x2c, i_i) \
90 V(I32LoadMem8U, 0x2d, i_i) \ 90 V(I32LoadMem8U, 0x2d, i_i) \
91 V(I32LoadMem16S, 0x2e, i_i) \ 91 V(I32LoadMem16S, 0x2e, i_i) \
92 V(I32LoadMem16U, 0x2f, i_i) \ 92 V(I32LoadMem16U, 0x2f, i_i) \
93 V(I64LoadMem8S, 0x30, l_i) \ 93 V(I64LoadMem8S, 0x30, l_i) \
94 V(I64LoadMem8U, 0x31, l_i) \ 94 V(I64LoadMem8U, 0x31, l_i) \
95 V(I64LoadMem16S, 0x32, l_i) \ 95 V(I64LoadMem16S, 0x32, l_i) \
96 V(I64LoadMem16U, 0x33, l_i) \ 96 V(I64LoadMem16U, 0x33, l_i) \
97 V(I64LoadMem32S, 0x34, l_i) \ 97 V(I64LoadMem32S, 0x34, l_i) \
98 V(I64LoadMem32U, 0x35, l_i) \ 98 V(I64LoadMem32U, 0x35, l_i)
99 V(S128LoadMem, 0xc0, s_i)
100 99
101 // Store memory expressions. 100 // Store memory expressions.
102 #define FOREACH_STORE_MEM_OPCODE(V) \ 101 #define FOREACH_STORE_MEM_OPCODE(V) \
103 V(I32StoreMem, 0x36, i_ii) \ 102 V(I32StoreMem, 0x36, i_ii) \
104 V(I64StoreMem, 0x37, l_il) \ 103 V(I64StoreMem, 0x37, l_il) \
105 V(F32StoreMem, 0x38, f_if) \ 104 V(F32StoreMem, 0x38, f_if) \
106 V(F64StoreMem, 0x39, d_id) \ 105 V(F64StoreMem, 0x39, d_id) \
107 V(I32StoreMem8, 0x3a, i_ii) \ 106 V(I32StoreMem8, 0x3a, i_ii) \
108 V(I32StoreMem16, 0x3b, i_ii) \ 107 V(I32StoreMem16, 0x3b, i_ii) \
109 V(I64StoreMem8, 0x3c, l_il) \ 108 V(I64StoreMem8, 0x3c, l_il) \
110 V(I64StoreMem16, 0x3d, l_il) \ 109 V(I64StoreMem16, 0x3d, l_il) \
111 V(I64StoreMem32, 0x3e, l_il) \ 110 V(I64StoreMem32, 0x3e, l_il)
112 V(S128StoreMem, 0xc1, s_is)
113 111
114 // Miscellaneous memory expressions 112 // Miscellaneous memory expressions
115 #define FOREACH_MISC_MEM_OPCODE(V) \ 113 #define FOREACH_MISC_MEM_OPCODE(V) \
116 V(MemorySize, 0x3f, i_v) \ 114 V(MemorySize, 0x3f, i_v) \
117 V(GrowMemory, 0x40, i_i) 115 V(GrowMemory, 0x40, i_i)
118 116
119 // Expressions with signatures. 117 // Expressions with signatures.
120 #define FOREACH_SIMPLE_OPCODE(V) \ 118 #define FOREACH_SIMPLE_OPCODE(V) \
121 V(I32Eqz, 0x45, i_i) \ 119 V(I32Eqz, 0x45, i_i) \
122 V(I32Eq, 0x46, i_ii) \ 120 V(I32Eq, 0x46, i_ii) \
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 V(I32AsmjsStoreMem16, 0xdc, i_ii) \ 268 V(I32AsmjsStoreMem16, 0xdc, i_ii) \
271 V(I32AsmjsStoreMem, 0xdd, i_ii) \ 269 V(I32AsmjsStoreMem, 0xdd, i_ii) \
272 V(F32AsmjsStoreMem, 0xde, f_if) \ 270 V(F32AsmjsStoreMem, 0xde, f_if) \
273 V(F64AsmjsStoreMem, 0xdf, d_id) \ 271 V(F64AsmjsStoreMem, 0xdf, d_id) \
274 V(I32AsmjsSConvertF32, 0xe0, i_f) \ 272 V(I32AsmjsSConvertF32, 0xe0, i_f) \
275 V(I32AsmjsUConvertF32, 0xe1, i_f) \ 273 V(I32AsmjsUConvertF32, 0xe1, i_f) \
276 V(I32AsmjsSConvertF64, 0xe2, i_d) \ 274 V(I32AsmjsSConvertF64, 0xe2, i_d) \
277 V(I32AsmjsUConvertF64, 0xe3, i_d) 275 V(I32AsmjsUConvertF64, 0xe3, i_d)
278 276
279 #define FOREACH_SIMD_0_OPERAND_OPCODE(V) \ 277 #define FOREACH_SIMD_0_OPERAND_OPCODE(V) \
280 V(F32x4Splat, 0xe500, s_f) \ 278 V(F32x4Splat, 0xfd00, s_f) \
281 V(F32x4Abs, 0xe503, s_s) \ 279 V(F32x4Abs, 0xfd03, s_s) \
282 V(F32x4Neg, 0xe504, s_s) \ 280 V(F32x4Neg, 0xfd04, s_s) \
283 V(F32x4RecipApprox, 0xe506, s_s) \ 281 V(F32x4RecipApprox, 0xfd06, s_s) \
284 V(F32x4RecipSqrtApprox, 0xe507, s_s) \ 282 V(F32x4RecipSqrtApprox, 0xfd07, s_s) \
285 V(F32x4Add, 0xe508, s_ss) \ 283 V(F32x4Add, 0xfd08, s_ss) \
286 V(F32x4AddHoriz, 0xe5b9, s_ss) \ 284 V(F32x4AddHoriz, 0xfdb9, s_ss) \
287 V(F32x4Sub, 0xe509, s_ss) \ 285 V(F32x4Sub, 0xfd09, s_ss) \
288 V(F32x4Mul, 0xe50a, s_ss) \ 286 V(F32x4Mul, 0xfd0a, s_ss) \
289 V(F32x4Min, 0xe50c, s_ss) \ 287 V(F32x4Min, 0xfd0c, s_ss) \
290 V(F32x4Max, 0xe50d, s_ss) \ 288 V(F32x4Max, 0xfd0d, s_ss) \
291 V(F32x4Eq, 0xe510, s_ss) \ 289 V(F32x4Eq, 0xfd10, s_ss) \
292 V(F32x4Ne, 0xe511, s_ss) \ 290 V(F32x4Ne, 0xfd11, s_ss) \
293 V(F32x4Lt, 0xe512, s_ss) \ 291 V(F32x4Lt, 0xfd12, s_ss) \
294 V(F32x4Le, 0xe513, s_ss) \ 292 V(F32x4Le, 0xfd13, s_ss) \
295 V(F32x4Gt, 0xe514, s_ss) \ 293 V(F32x4Gt, 0xfd14, s_ss) \
296 V(F32x4Ge, 0xe515, s_ss) \ 294 V(F32x4Ge, 0xfd15, s_ss) \
297 V(F32x4SConvertI32x4, 0xe519, s_s) \ 295 V(F32x4SConvertI32x4, 0xfd19, s_s) \
298 V(F32x4UConvertI32x4, 0xe51a, s_s) \ 296 V(F32x4UConvertI32x4, 0xfd1a, s_s) \
299 V(I32x4Splat, 0xe51b, s_i) \ 297 V(I32x4Splat, 0xfd1b, s_i) \
300 V(I32x4Neg, 0xe51e, s_s) \ 298 V(I32x4Neg, 0xfd1e, s_s) \
301 V(I32x4Add, 0xe51f, s_ss) \ 299 V(I32x4Add, 0xfd1f, s_ss) \
302 V(I32x4AddHoriz, 0xe5ba, s_ss) \ 300 V(I32x4AddHoriz, 0xfdba, s_ss) \
303 V(I32x4Sub, 0xe520, s_ss) \ 301 V(I32x4Sub, 0xfd20, s_ss) \
304 V(I32x4Mul, 0xe521, s_ss) \ 302 V(I32x4Mul, 0xfd21, s_ss) \
305 V(I32x4MinS, 0xe522, s_ss) \ 303 V(I32x4MinS, 0xfd22, s_ss) \
306 V(I32x4MaxS, 0xe523, s_ss) \ 304 V(I32x4MaxS, 0xfd23, s_ss) \
307 V(I32x4Eq, 0xe526, s_ss) \ 305 V(I32x4Eq, 0xfd26, s_ss) \
308 V(I32x4Ne, 0xe527, s_ss) \ 306 V(I32x4Ne, 0xfd27, s_ss) \
309 V(I32x4LtS, 0xe528, s_ss) \ 307 V(I32x4LtS, 0xfd28, s_ss) \
310 V(I32x4LeS, 0xe529, s_ss) \ 308 V(I32x4LeS, 0xfd29, s_ss) \
311 V(I32x4GtS, 0xe52a, s_ss) \ 309 V(I32x4GtS, 0xfd2a, s_ss) \
312 V(I32x4GeS, 0xe52b, s_ss) \ 310 V(I32x4GeS, 0xfd2b, s_ss) \
313 V(I32x4SConvertF32x4, 0xe52f, s_s) \ 311 V(I32x4SConvertF32x4, 0xfd2f, s_s) \
314 V(I32x4UConvertF32x4, 0xe537, s_s) \ 312 V(I32x4UConvertF32x4, 0xfd37, s_s) \
315 V(I32x4SConvertI16x8Low, 0xe594, s_s) \ 313 V(I32x4SConvertI16x8Low, 0xfd94, s_s) \
316 V(I32x4SConvertI16x8High, 0xe595, s_s) \ 314 V(I32x4SConvertI16x8High, 0xfd95, s_s) \
317 V(I32x4UConvertI16x8Low, 0xe596, s_s) \ 315 V(I32x4UConvertI16x8Low, 0xfd96, s_s) \
318 V(I32x4UConvertI16x8High, 0xe597, s_s) \ 316 V(I32x4UConvertI16x8High, 0xfd97, s_s) \
319 V(I32x4MinU, 0xe530, s_ss) \ 317 V(I32x4MinU, 0xfd30, s_ss) \
320 V(I32x4MaxU, 0xe531, s_ss) \ 318 V(I32x4MaxU, 0xfd31, s_ss) \
321 V(I32x4LtU, 0xe533, s_ss) \ 319 V(I32x4LtU, 0xfd33, s_ss) \
322 V(I32x4LeU, 0xe534, s_ss) \ 320 V(I32x4LeU, 0xfd34, s_ss) \
323 V(I32x4GtU, 0xe535, s_ss) \ 321 V(I32x4GtU, 0xfd35, s_ss) \
324 V(I32x4GeU, 0xe536, s_ss) \ 322 V(I32x4GeU, 0xfd36, s_ss) \
325 V(I16x8Splat, 0xe538, s_i) \ 323 V(I16x8Splat, 0xfd38, s_i) \
326 V(I16x8Neg, 0xe53b, s_s) \ 324 V(I16x8Neg, 0xfd3b, s_s) \
327 V(I16x8Add, 0xe53c, s_ss) \ 325 V(I16x8Add, 0xfd3c, s_ss) \
328 V(I16x8AddSaturateS, 0xe53d, s_ss) \ 326 V(I16x8AddSaturateS, 0xfd3d, s_ss) \
329 V(I16x8AddHoriz, 0xe5bb, s_ss) \ 327 V(I16x8AddHoriz, 0xfdbb, s_ss) \
330 V(I16x8Sub, 0xe53e, s_ss) \ 328 V(I16x8Sub, 0xfd3e, s_ss) \
331 V(I16x8SubSaturateS, 0xe53f, s_ss) \ 329 V(I16x8SubSaturateS, 0xfd3f, s_ss) \
332 V(I16x8Mul, 0xe540, s_ss) \ 330 V(I16x8Mul, 0xfd40, s_ss) \
333 V(I16x8MinS, 0xe541, s_ss) \ 331 V(I16x8MinS, 0xfd41, s_ss) \
334 V(I16x8MaxS, 0xe542, s_ss) \ 332 V(I16x8MaxS, 0xfd42, s_ss) \
335 V(I16x8Eq, 0xe545, s_ss) \ 333 V(I16x8Eq, 0xfd45, s_ss) \
336 V(I16x8Ne, 0xe546, s_ss) \ 334 V(I16x8Ne, 0xfd46, s_ss) \
337 V(I16x8LtS, 0xe547, s_ss) \ 335 V(I16x8LtS, 0xfd47, s_ss) \
338 V(I16x8LeS, 0xe548, s_ss) \ 336 V(I16x8LeS, 0xfd48, s_ss) \
339 V(I16x8GtS, 0xe549, s_ss) \ 337 V(I16x8GtS, 0xfd49, s_ss) \
340 V(I16x8GeS, 0xe54a, s_ss) \ 338 V(I16x8GeS, 0xfd4a, s_ss) \
341 V(I16x8AddSaturateU, 0xe54e, s_ss) \ 339 V(I16x8AddSaturateU, 0xfd4e, s_ss) \
342 V(I16x8SubSaturateU, 0xe54f, s_ss) \ 340 V(I16x8SubSaturateU, 0xfd4f, s_ss) \
343 V(I16x8MinU, 0xe550, s_ss) \ 341 V(I16x8MinU, 0xfd50, s_ss) \
344 V(I16x8MaxU, 0xe551, s_ss) \ 342 V(I16x8MaxU, 0xfd51, s_ss) \
345 V(I16x8LtU, 0xe553, s_ss) \ 343 V(I16x8LtU, 0xfd53, s_ss) \
346 V(I16x8LeU, 0xe554, s_ss) \ 344 V(I16x8LeU, 0xfd54, s_ss) \
347 V(I16x8GtU, 0xe555, s_ss) \ 345 V(I16x8GtU, 0xfd55, s_ss) \
348 V(I16x8GeU, 0xe556, s_ss) \ 346 V(I16x8GeU, 0xfd56, s_ss) \
349 V(I16x8SConvertI32x4, 0xe598, s_ss) \ 347 V(I16x8SConvertI32x4, 0xfd98, s_ss) \
350 V(I16x8UConvertI32x4, 0xe599, s_ss) \ 348 V(I16x8UConvertI32x4, 0xfd99, s_ss) \
351 V(I16x8SConvertI8x16Low, 0xe59a, s_s) \ 349 V(I16x8SConvertI8x16Low, 0xfd9a, s_s) \
352 V(I16x8SConvertI8x16High, 0xe59b, s_s) \ 350 V(I16x8SConvertI8x16High, 0xfd9b, s_s) \
353 V(I16x8UConvertI8x16Low, 0xe59c, s_s) \ 351 V(I16x8UConvertI8x16Low, 0xfd9c, s_s) \
354 V(I16x8UConvertI8x16High, 0xe59d, s_s) \ 352 V(I16x8UConvertI8x16High, 0xfd9d, s_s) \
355 V(I8x16Splat, 0xe557, s_i) \ 353 V(I8x16Splat, 0xfd57, s_i) \
356 V(I8x16Neg, 0xe55a, s_s) \ 354 V(I8x16Neg, 0xfd5a, s_s) \
357 V(I8x16Add, 0xe55b, s_ss) \ 355 V(I8x16Add, 0xfd5b, s_ss) \
358 V(I8x16AddSaturateS, 0xe55c, s_ss) \ 356 V(I8x16AddSaturateS, 0xfd5c, s_ss) \
359 V(I8x16Sub, 0xe55d, s_ss) \ 357 V(I8x16Sub, 0xfd5d, s_ss) \
360 V(I8x16SubSaturateS, 0xe55e, s_ss) \ 358 V(I8x16SubSaturateS, 0xfd5e, s_ss) \
361 V(I8x16Mul, 0xe55f, s_ss) \ 359 V(I8x16Mul, 0xfd5f, s_ss) \
362 V(I8x16MinS, 0xe560, s_ss) \ 360 V(I8x16MinS, 0xfd60, s_ss) \
363 V(I8x16MaxS, 0xe561, s_ss) \ 361 V(I8x16MaxS, 0xfd61, s_ss) \
364 V(I8x16Eq, 0xe564, s_ss) \ 362 V(I8x16Eq, 0xfd64, s_ss) \
365 V(I8x16Ne, 0xe565, s_ss) \ 363 V(I8x16Ne, 0xfd65, s_ss) \
366 V(I8x16LtS, 0xe566, s_ss) \ 364 V(I8x16LtS, 0xfd66, s_ss) \
367 V(I8x16LeS, 0xe567, s_ss) \ 365 V(I8x16LeS, 0xfd67, s_ss) \
368 V(I8x16GtS, 0xe568, s_ss) \ 366 V(I8x16GtS, 0xfd68, s_ss) \
369 V(I8x16GeS, 0xe569, s_ss) \ 367 V(I8x16GeS, 0xfd69, s_ss) \
370 V(I8x16AddSaturateU, 0xe56d, s_ss) \ 368 V(I8x16AddSaturateU, 0xfd6d, s_ss) \
371 V(I8x16SubSaturateU, 0xe56e, s_ss) \ 369 V(I8x16SubSaturateU, 0xfd6e, s_ss) \
372 V(I8x16MinU, 0xe56f, s_ss) \ 370 V(I8x16MinU, 0xfd6f, s_ss) \
373 V(I8x16MaxU, 0xe570, s_ss) \ 371 V(I8x16MaxU, 0xfd70, s_ss) \
374 V(I8x16LtU, 0xe572, s_ss) \ 372 V(I8x16LtU, 0xfd72, s_ss) \
375 V(I8x16LeU, 0xe573, s_ss) \ 373 V(I8x16LeU, 0xfd73, s_ss) \
376 V(I8x16GtU, 0xe574, s_ss) \ 374 V(I8x16GtU, 0xfd74, s_ss) \
377 V(I8x16GeU, 0xe575, s_ss) \ 375 V(I8x16GeU, 0xfd75, s_ss) \
378 V(I8x16SConvertI16x8, 0xe59e, s_ss) \ 376 V(I8x16SConvertI16x8, 0xfd9e, s_ss) \
379 V(I8x16UConvertI16x8, 0xe59f, s_ss) \ 377 V(I8x16UConvertI16x8, 0xfd9f, s_ss) \
380 V(S128And, 0xe576, s_ss) \ 378 V(S128And, 0xfd76, s_ss) \
381 V(S128Or, 0xe577, s_ss) \ 379 V(S128Or, 0xfd77, s_ss) \
382 V(S128Xor, 0xe578, s_ss) \ 380 V(S128Xor, 0xfd78, s_ss) \
383 V(S128Not, 0xe579, s_s) \ 381 V(S128Not, 0xfd79, s_s) \
384 V(S128Select, 0xe52c, s_sss) \ 382 V(S128Select, 0xfd2c, s_sss) \
385 V(S1x4AnyTrue, 0xe584, i_s) \ 383 V(S1x4AnyTrue, 0xfd84, i_s) \
386 V(S1x4AllTrue, 0xe585, i_s) \ 384 V(S1x4AllTrue, 0xfd85, i_s) \
387 V(S1x8AnyTrue, 0xe58a, i_s) \ 385 V(S1x8AnyTrue, 0xfd8a, i_s) \
388 V(S1x8AllTrue, 0xe58b, i_s) \ 386 V(S1x8AllTrue, 0xfd8b, i_s) \
389 V(S1x16AnyTrue, 0xe590, i_s) \ 387 V(S1x16AnyTrue, 0xfd90, i_s) \
390 V(S1x16AllTrue, 0xe591, i_s) 388 V(S1x16AllTrue, 0xfd91, i_s)
391 389
392 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \ 390 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \
393 V(F32x4ExtractLane, 0xe501, _) \ 391 V(F32x4ExtractLane, 0xfd01, _) \
394 V(F32x4ReplaceLane, 0xe502, _) \ 392 V(F32x4ReplaceLane, 0xfd02, _) \
395 V(I32x4ExtractLane, 0xe51c, _) \ 393 V(I32x4ExtractLane, 0xfd1c, _) \
396 V(I32x4ReplaceLane, 0xe51d, _) \ 394 V(I32x4ReplaceLane, 0xfd1d, _) \
397 V(I32x4Shl, 0xe524, _) \ 395 V(I32x4Shl, 0xfd24, _) \
398 V(I32x4ShrS, 0xe525, _) \ 396 V(I32x4ShrS, 0xfd25, _) \
399 V(I32x4ShrU, 0xe532, _) \ 397 V(I32x4ShrU, 0xfd32, _) \
400 V(I16x8ExtractLane, 0xe539, _) \ 398 V(I16x8ExtractLane, 0xfd39, _) \
401 V(I16x8ReplaceLane, 0xe53a, _) \ 399 V(I16x8ReplaceLane, 0xfd3a, _) \
402 V(I16x8Shl, 0xe543, _) \ 400 V(I16x8Shl, 0xfd43, _) \
403 V(I16x8ShrS, 0xe544, _) \ 401 V(I16x8ShrS, 0xfd44, _) \
404 V(I16x8ShrU, 0xe552, _) \ 402 V(I16x8ShrU, 0xfd52, _) \
405 V(I8x16ExtractLane, 0xe558, _) \ 403 V(I8x16ExtractLane, 0xfd58, _) \
406 V(I8x16ReplaceLane, 0xe559, _) \ 404 V(I8x16ReplaceLane, 0xfd59, _) \
407 V(I8x16Shl, 0xe562, _) \ 405 V(I8x16Shl, 0xfd62, _) \
408 V(I8x16ShrS, 0xe563, _) \ 406 V(I8x16ShrS, 0xfd63, _) \
409 V(I8x16ShrU, 0xe571, _) 407 V(I8x16ShrU, 0xfd71, _)
410 408
411 #define FOREACH_SIMD_MASK_OPERAND_OPCODE(V) \ 409 #define FOREACH_SIMD_MASK_OPERAND_OPCODE(V) V(S8x16Shuffle, 0xfd6b, s_ss)
412 V(S8x16Shuffle, 0xe56b, s_ss) 410
411 #define FOREACH_SIMD_MEM_OPCODE(V) \
412 V(S128LoadMem, 0xfd80, s_i) \
413 V(S128StoreMem, 0xfd81, s_is)
413 414
414 #define FOREACH_ATOMIC_OPCODE(V) \ 415 #define FOREACH_ATOMIC_OPCODE(V) \
415 V(I32AtomicAdd8S, 0xe601, i_ii) \ 416 V(I32AtomicAdd8S, 0xfe01, i_ii) \
binji 2017/06/16 21:58:18 The sign-extending atomic operators have been remo
gdeepti 2017/06/16 23:49:29 Done.
416 V(I32AtomicAdd8U, 0xe602, i_ii) \ 417 V(I32AtomicAdd8U, 0xfe02, i_ii) \
binji 2017/06/16 21:58:18 Please use the opcodes defined here: https://githu
gdeepti 2017/06/16 23:49:29 Not sure if these are hooked up to anything yet, s
417 V(I32AtomicAdd16S, 0xe603, i_ii) \ 418 V(I32AtomicAdd16S, 0xfe03, i_ii) \
418 V(I32AtomicAdd16U, 0xe604, i_ii) \ 419 V(I32AtomicAdd16U, 0xfe04, i_ii) \
419 V(I32AtomicAdd, 0xe605, i_ii) \ 420 V(I32AtomicAdd, 0xfe05, i_ii) \
420 V(I32AtomicAnd8S, 0xe606, i_ii) \ 421 V(I32AtomicAnd8S, 0xfe06, i_ii) \
421 V(I32AtomicAnd8U, 0xe607, i_ii) \ 422 V(I32AtomicAnd8U, 0xfe07, i_ii) \
422 V(I32AtomicAnd16S, 0xe608, i_ii) \ 423 V(I32AtomicAnd16S, 0xfe08, i_ii) \
423 V(I32AtomicAnd16U, 0xe609, i_ii) \ 424 V(I32AtomicAnd16U, 0xfe09, i_ii) \
424 V(I32AtomicAnd, 0xe60a, i_ii) \ 425 V(I32AtomicAnd, 0xfe0a, i_ii) \
425 V(I32AtomicCompareExchange8S, 0xe60b, i_ii) \ 426 V(I32AtomicCompareExchange8S, 0xfe0b, i_ii) \
426 V(I32AtomicCompareExchange8U, 0xe60c, i_ii) \ 427 V(I32AtomicCompareExchange8U, 0xfe0c, i_ii) \
427 V(I32AtomicCompareExchange16S, 0xe60d, i_ii) \ 428 V(I32AtomicCompareExchange16S, 0xfe0d, i_ii) \
428 V(I32AtomicCompareExchange16U, 0xe60e, i_ii) \ 429 V(I32AtomicCompareExchange16U, 0xfe0e, i_ii) \
429 V(I32AtomicCompareExchange, 0xe60f, i_ii) \ 430 V(I32AtomicCompareExchange, 0xfe0f, i_ii) \
430 V(I32AtomicExchange8S, 0xe610, i_ii) \ 431 V(I32AtomicExchange8S, 0xfe10, i_ii) \
431 V(I32AtomicExchange8U, 0xe611, i_ii) \ 432 V(I32AtomicExchange8U, 0xfe11, i_ii) \
432 V(I32AtomicExchange16S, 0xe612, i_ii) \ 433 V(I32AtomicExchange16S, 0xfe12, i_ii) \
433 V(I32AtomicExchange16U, 0xe613, i_ii) \ 434 V(I32AtomicExchange16U, 0xfe13, i_ii) \
434 V(I32AtomicExchange, 0xe614, i_ii) \ 435 V(I32AtomicExchange, 0xfe14, i_ii) \
435 V(I32AtomicOr8S, 0xe615, i_ii) \ 436 V(I32AtomicOr8S, 0xfe15, i_ii) \
436 V(I32AtomicOr8U, 0xe616, i_ii) \ 437 V(I32AtomicOr8U, 0xfe16, i_ii) \
437 V(I32AtomicOr16S, 0xe617, i_ii) \ 438 V(I32AtomicOr16S, 0xfe17, i_ii) \
438 V(I32AtomicOr16U, 0xe618, i_ii) \ 439 V(I32AtomicOr16U, 0xfe18, i_ii) \
439 V(I32AtomicOr, 0xe619, i_ii) \ 440 V(I32AtomicOr, 0xfe19, i_ii) \
440 V(I32AtomicSub8S, 0xe61a, i_ii) \ 441 V(I32AtomicSub8S, 0xfe1a, i_ii) \
441 V(I32AtomicSub8U, 0xe61b, i_ii) \ 442 V(I32AtomicSub8U, 0xfe1b, i_ii) \
442 V(I32AtomicSub16S, 0xe61c, i_ii) \ 443 V(I32AtomicSub16S, 0xfe1c, i_ii) \
443 V(I32AtomicSub16U, 0xe61d, i_ii) \ 444 V(I32AtomicSub16U, 0xfe1d, i_ii) \
444 V(I32AtomicSub, 0xe61e, i_ii) \ 445 V(I32AtomicSub, 0xfe1e, i_ii) \
445 V(I32AtomicXor8S, 0xe61f, i_ii) \ 446 V(I32AtomicXor8S, 0xfe1f, i_ii) \
446 V(I32AtomicXor8U, 0xe620, i_ii) \ 447 V(I32AtomicXor8U, 0xfe20, i_ii) \
447 V(I32AtomicXor16S, 0xe621, i_ii) \ 448 V(I32AtomicXor16S, 0xfe21, i_ii) \
448 V(I32AtomicXor16U, 0xe622, i_ii) \ 449 V(I32AtomicXor16U, 0xfe22, i_ii) \
449 V(I32AtomicXor, 0xe623, i_ii) 450 V(I32AtomicXor, 0xfe23, i_ii)
450 451
451 // All opcodes. 452 // All opcodes.
452 #define FOREACH_OPCODE(V) \ 453 #define FOREACH_OPCODE(V) \
453 FOREACH_CONTROL_OPCODE(V) \ 454 FOREACH_CONTROL_OPCODE(V) \
454 FOREACH_MISC_OPCODE(V) \ 455 FOREACH_MISC_OPCODE(V) \
455 FOREACH_SIMPLE_OPCODE(V) \ 456 FOREACH_SIMPLE_OPCODE(V) \
456 FOREACH_STORE_MEM_OPCODE(V) \ 457 FOREACH_STORE_MEM_OPCODE(V) \
457 FOREACH_LOAD_MEM_OPCODE(V) \ 458 FOREACH_LOAD_MEM_OPCODE(V) \
458 FOREACH_MISC_MEM_OPCODE(V) \ 459 FOREACH_MISC_MEM_OPCODE(V) \
459 FOREACH_ASMJS_COMPAT_OPCODE(V) \ 460 FOREACH_ASMJS_COMPAT_OPCODE(V) \
460 FOREACH_SIMD_0_OPERAND_OPCODE(V) \ 461 FOREACH_SIMD_0_OPERAND_OPCODE(V) \
461 FOREACH_SIMD_1_OPERAND_OPCODE(V) \ 462 FOREACH_SIMD_1_OPERAND_OPCODE(V) \
462 FOREACH_SIMD_MASK_OPERAND_OPCODE(V) \ 463 FOREACH_SIMD_MASK_OPERAND_OPCODE(V) \
464 FOREACH_SIMD_MEM_OPCODE(V) \
463 FOREACH_ATOMIC_OPCODE(V) 465 FOREACH_ATOMIC_OPCODE(V)
464 466
465 // All signatures. 467 // All signatures.
466 #define FOREACH_SIGNATURE(V) \ 468 #define FOREACH_SIGNATURE(V) \
467 FOREACH_SIMD_SIGNATURE(V) \ 469 FOREACH_SIMD_SIGNATURE(V) \
468 V(i_ii, kWasmI32, kWasmI32, kWasmI32) \ 470 V(i_ii, kWasmI32, kWasmI32, kWasmI32) \
469 V(i_i, kWasmI32, kWasmI32) \ 471 V(i_i, kWasmI32, kWasmI32) \
470 V(i_v, kWasmI32) \ 472 V(i_v, kWasmI32) \
471 V(i_ff, kWasmI32, kWasmF32, kWasmF32) \ 473 V(i_ff, kWasmI32, kWasmF32, kWasmF32) \
472 V(i_f, kWasmI32, kWasmF32) \ 474 V(i_f, kWasmI32, kWasmF32) \
(...skipping 23 matching lines...) Expand all
496 #define FOREACH_SIMD_SIGNATURE(V) \ 498 #define FOREACH_SIMD_SIGNATURE(V) \
497 V(s_s, kWasmS128, kWasmS128) \ 499 V(s_s, kWasmS128, kWasmS128) \
498 V(s_f, kWasmS128, kWasmF32) \ 500 V(s_f, kWasmS128, kWasmF32) \
499 V(s_ss, kWasmS128, kWasmS128, kWasmS128) \ 501 V(s_ss, kWasmS128, kWasmS128, kWasmS128) \
500 V(s_i, kWasmS128, kWasmI32) \ 502 V(s_i, kWasmS128, kWasmI32) \
501 V(s_si, kWasmS128, kWasmS128, kWasmI32) \ 503 V(s_si, kWasmS128, kWasmS128, kWasmI32) \
502 V(i_s, kWasmI32, kWasmS128) \ 504 V(i_s, kWasmI32, kWasmS128) \
503 V(s_sss, kWasmS128, kWasmS128, kWasmS128, kWasmS128) 505 V(s_sss, kWasmS128, kWasmS128, kWasmS128, kWasmS128)
504 506
505 #define FOREACH_PREFIX(V) \ 507 #define FOREACH_PREFIX(V) \
506 V(Simd, 0xe5) \ 508 V(Simd, 0xfd) \
507 V(Atomic, 0xe6) 509 V(Atomic, 0xfe)
508 510
509 enum WasmOpcode { 511 enum WasmOpcode {
510 // Declare expression opcodes. 512 // Declare expression opcodes.
511 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode, 513 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode,
512 FOREACH_OPCODE(DECLARE_NAMED_ENUM) 514 FOREACH_OPCODE(DECLARE_NAMED_ENUM)
513 #undef DECLARE_NAMED_ENUM 515 #undef DECLARE_NAMED_ENUM
514 #define DECLARE_PREFIX(name, opcode) k##name##Prefix = opcode, 516 #define DECLARE_PREFIX(name, opcode) k##name##Prefix = opcode,
515 FOREACH_PREFIX(DECLARE_PREFIX) 517 FOREACH_PREFIX(DECLARE_PREFIX)
516 #undef DECLARE_PREFIX 518 #undef DECLARE_PREFIX
517 }; 519 };
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 default: 655 default:
654 return "<unknown>"; 656 return "<unknown>";
655 } 657 }
656 } 658 }
657 }; 659 };
658 } // namespace wasm 660 } // namespace wasm
659 } // namespace internal 661 } // namespace internal
660 } // namespace v8 662 } // namespace v8
661 663
662 #endif // V8_WASM_OPCODES_H_ 664 #endif // V8_WASM_OPCODES_H_
OLDNEW
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698