OLD | NEW |
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 V(F32x4Ge, 0xe515, s_ss) \ | 297 V(F32x4Ge, 0xe515, s_ss) \ |
298 V(F32x4SConvertI32x4, 0xe519, s_s) \ | 298 V(F32x4SConvertI32x4, 0xe519, s_s) \ |
299 V(F32x4UConvertI32x4, 0xe51a, s_s) \ | 299 V(F32x4UConvertI32x4, 0xe51a, s_s) \ |
300 V(I32x4Splat, 0xe51b, s_i) \ | 300 V(I32x4Splat, 0xe51b, s_i) \ |
301 V(I32x4Neg, 0xe51e, s_s) \ | 301 V(I32x4Neg, 0xe51e, s_s) \ |
302 V(I32x4Add, 0xe51f, s_ss) \ | 302 V(I32x4Add, 0xe51f, s_ss) \ |
303 V(I32x4Sub, 0xe520, s_ss) \ | 303 V(I32x4Sub, 0xe520, s_ss) \ |
304 V(I32x4Mul, 0xe521, s_ss) \ | 304 V(I32x4Mul, 0xe521, s_ss) \ |
305 V(I32x4MinS, 0xe522, s_ss) \ | 305 V(I32x4MinS, 0xe522, s_ss) \ |
306 V(I32x4MaxS, 0xe523, s_ss) \ | 306 V(I32x4MaxS, 0xe523, s_ss) \ |
307 V(I32x4Shl, 0xe524, s_si) \ | |
308 V(I32x4ShrS, 0xe525, s_si) \ | |
309 V(I32x4Eq, 0xe526, s_ss) \ | 307 V(I32x4Eq, 0xe526, s_ss) \ |
310 V(I32x4Ne, 0xe527, s_ss) \ | 308 V(I32x4Ne, 0xe527, s_ss) \ |
311 V(I32x4LtS, 0xe528, s_ss) \ | 309 V(I32x4LtS, 0xe528, s_ss) \ |
312 V(I32x4LeS, 0xe529, s_ss) \ | 310 V(I32x4LeS, 0xe529, s_ss) \ |
313 V(I32x4GtS, 0xe52a, s_ss) \ | 311 V(I32x4GtS, 0xe52a, s_ss) \ |
314 V(I32x4GeS, 0xe52b, s_ss) \ | 312 V(I32x4GeS, 0xe52b, s_ss) \ |
315 V(I32x4Select, 0xe52c, s_sss) \ | 313 V(I32x4Select, 0xe52c, s_sss) \ |
316 V(I32x4Swizzle, 0xe52d, s_s) \ | 314 V(I32x4Swizzle, 0xe52d, s_s) \ |
317 V(I32x4Shuffle, 0xe52e, s_ss) \ | 315 V(I32x4Shuffle, 0xe52e, s_ss) \ |
318 V(I32x4SConvertF32x4, 0xe52f, s_s) \ | 316 V(I32x4SConvertF32x4, 0xe52f, s_s) \ |
319 V(I32x4MinU, 0xe530, s_ss) \ | 317 V(I32x4MinU, 0xe530, s_ss) \ |
320 V(I32x4MaxU, 0xe531, s_ss) \ | 318 V(I32x4MaxU, 0xe531, s_ss) \ |
321 V(I32x4ShrU, 0xe532, s_ss) \ | |
322 V(I32x4LtU, 0xe533, s_ss) \ | 319 V(I32x4LtU, 0xe533, s_ss) \ |
323 V(I32x4LeU, 0xe534, s_ss) \ | 320 V(I32x4LeU, 0xe534, s_ss) \ |
324 V(I32x4GtU, 0xe535, s_ss) \ | 321 V(I32x4GtU, 0xe535, s_ss) \ |
325 V(I32x4GeU, 0xe536, s_ss) \ | 322 V(I32x4GeU, 0xe536, s_ss) \ |
326 V(I32x4UConvertF32x4, 0xe537, s_s) \ | 323 V(I32x4UConvertF32x4, 0xe537, s_s) \ |
327 V(I16x8Splat, 0xe538, s_i) \ | 324 V(I16x8Splat, 0xe538, s_i) \ |
328 V(I16x8Neg, 0xe53b, s_s) \ | 325 V(I16x8Neg, 0xe53b, s_s) \ |
329 V(I16x8Add, 0xe53c, s_ss) \ | 326 V(I16x8Add, 0xe53c, s_ss) \ |
330 V(I16x8AddSaturateS, 0xe53d, s_ss) \ | 327 V(I16x8AddSaturateS, 0xe53d, s_ss) \ |
331 V(I16x8Sub, 0xe53e, s_ss) \ | 328 V(I16x8Sub, 0xe53e, s_ss) \ |
332 V(I16x8SubSaturateS, 0xe53f, s_ss) \ | 329 V(I16x8SubSaturateS, 0xe53f, s_ss) \ |
333 V(I16x8Mul, 0xe540, s_ss) \ | 330 V(I16x8Mul, 0xe540, s_ss) \ |
334 V(I16x8MinS, 0xe541, s_ss) \ | 331 V(I16x8MinS, 0xe541, s_ss) \ |
335 V(I16x8MaxS, 0xe542, s_ss) \ | 332 V(I16x8MaxS, 0xe542, s_ss) \ |
336 V(I16x8Shl, 0xe543, s_si) \ | |
337 V(I16x8ShrS, 0xe544, s_si) \ | |
338 V(I16x8Eq, 0xe545, s_ss) \ | 333 V(I16x8Eq, 0xe545, s_ss) \ |
339 V(I16x8Ne, 0xe546, s_ss) \ | 334 V(I16x8Ne, 0xe546, s_ss) \ |
340 V(I16x8LtS, 0xe547, s_ss) \ | 335 V(I16x8LtS, 0xe547, s_ss) \ |
341 V(I16x8LeS, 0xe548, s_ss) \ | 336 V(I16x8LeS, 0xe548, s_ss) \ |
342 V(I16x8GtS, 0xe549, s_ss) \ | 337 V(I16x8GtS, 0xe549, s_ss) \ |
343 V(I16x8GeS, 0xe54a, s_ss) \ | 338 V(I16x8GeS, 0xe54a, s_ss) \ |
344 V(I16x8Select, 0xe54b, s_sss) \ | 339 V(I16x8Select, 0xe54b, s_sss) \ |
345 V(I16x8Swizzle, 0xe54c, s_s) \ | 340 V(I16x8Swizzle, 0xe54c, s_s) \ |
346 V(I16x8Shuffle, 0xe54d, s_ss) \ | 341 V(I16x8Shuffle, 0xe54d, s_ss) \ |
347 V(I16x8AddSaturateU, 0xe54e, s_ss) \ | 342 V(I16x8AddSaturateU, 0xe54e, s_ss) \ |
348 V(I16x8SubSaturateU, 0xe54f, s_ss) \ | 343 V(I16x8SubSaturateU, 0xe54f, s_ss) \ |
349 V(I16x8MinU, 0xe550, s_ss) \ | 344 V(I16x8MinU, 0xe550, s_ss) \ |
350 V(I16x8MaxU, 0xe551, s_ss) \ | 345 V(I16x8MaxU, 0xe551, s_ss) \ |
351 V(I16x8ShrU, 0xe552, s_si) \ | |
352 V(I16x8LtU, 0xe553, s_ss) \ | 346 V(I16x8LtU, 0xe553, s_ss) \ |
353 V(I16x8LeU, 0xe554, s_ss) \ | 347 V(I16x8LeU, 0xe554, s_ss) \ |
354 V(I16x8GtU, 0xe555, s_ss) \ | 348 V(I16x8GtU, 0xe555, s_ss) \ |
355 V(I16x8GeU, 0xe556, s_ss) \ | 349 V(I16x8GeU, 0xe556, s_ss) \ |
356 V(I8x16Splat, 0xe557, s_i) \ | 350 V(I8x16Splat, 0xe557, s_i) \ |
357 V(I8x16Neg, 0xe55a, s_s) \ | 351 V(I8x16Neg, 0xe55a, s_s) \ |
358 V(I8x16Add, 0xe55b, s_ss) \ | 352 V(I8x16Add, 0xe55b, s_ss) \ |
359 V(I8x16AddSaturateS, 0xe55c, s_ss) \ | 353 V(I8x16AddSaturateS, 0xe55c, s_ss) \ |
360 V(I8x16Sub, 0xe55d, s_ss) \ | 354 V(I8x16Sub, 0xe55d, s_ss) \ |
361 V(I8x16SubSaturateS, 0xe55e, s_ss) \ | 355 V(I8x16SubSaturateS, 0xe55e, s_ss) \ |
362 V(I8x16Mul, 0xe55f, s_ss) \ | 356 V(I8x16Mul, 0xe55f, s_ss) \ |
363 V(I8x16MinS, 0xe560, s_ss) \ | 357 V(I8x16MinS, 0xe560, s_ss) \ |
364 V(I8x16MaxS, 0xe561, s_ss) \ | 358 V(I8x16MaxS, 0xe561, s_ss) \ |
365 V(I8x16Shl, 0xe562, s_si) \ | |
366 V(I8x16ShrS, 0xe563, s_si) \ | |
367 V(I8x16Eq, 0xe564, s_ss) \ | 359 V(I8x16Eq, 0xe564, s_ss) \ |
368 V(I8x16Ne, 0xe565, s_ss) \ | 360 V(I8x16Ne, 0xe565, s_ss) \ |
369 V(I8x16LtS, 0xe566, s_ss) \ | 361 V(I8x16LtS, 0xe566, s_ss) \ |
370 V(I8x16LeS, 0xe567, s_ss) \ | 362 V(I8x16LeS, 0xe567, s_ss) \ |
371 V(I8x16GtS, 0xe568, s_ss) \ | 363 V(I8x16GtS, 0xe568, s_ss) \ |
372 V(I8x16GeS, 0xe569, s_ss) \ | 364 V(I8x16GeS, 0xe569, s_ss) \ |
373 V(I8x16Select, 0xe56a, s_sss) \ | 365 V(I8x16Select, 0xe56a, s_sss) \ |
374 V(I8x16Swizzle, 0xe56b, s_s) \ | 366 V(I8x16Swizzle, 0xe56b, s_s) \ |
375 V(I8x16Shuffle, 0xe56c, s_ss) \ | 367 V(I8x16Shuffle, 0xe56c, s_ss) \ |
376 V(I8x16AddSaturateU, 0xe56d, s_ss) \ | 368 V(I8x16AddSaturateU, 0xe56d, s_ss) \ |
377 V(I8x16SubSaturateU, 0xe56e, s_ss) \ | 369 V(I8x16SubSaturateU, 0xe56e, s_ss) \ |
378 V(I8x16MinU, 0xe56f, s_ss) \ | 370 V(I8x16MinU, 0xe56f, s_ss) \ |
379 V(I8x16MaxU, 0xe570, s_ss) \ | 371 V(I8x16MaxU, 0xe570, s_ss) \ |
380 V(I8x16ShrU, 0xe571, s_ss) \ | |
381 V(I8x16LtU, 0xe572, s_ss) \ | 372 V(I8x16LtU, 0xe572, s_ss) \ |
382 V(I8x16LeU, 0xe573, s_ss) \ | 373 V(I8x16LeU, 0xe573, s_ss) \ |
383 V(I8x16GtU, 0xe574, s_ss) \ | 374 V(I8x16GtU, 0xe574, s_ss) \ |
384 V(I8x16GeU, 0xe575, s_ss) \ | 375 V(I8x16GeU, 0xe575, s_ss) \ |
385 V(S128And, 0xe576, s_ss) \ | 376 V(S128And, 0xe576, s_ss) \ |
386 V(S128Ior, 0xe577, s_ss) \ | 377 V(S128Ior, 0xe577, s_ss) \ |
387 V(S128Xor, 0xe578, s_ss) \ | 378 V(S128Xor, 0xe578, s_ss) \ |
388 V(S128Not, 0xe579, s_s) \ | 379 V(S128Not, 0xe579, s_s) \ |
389 V(S32x4Select, 0xe580, s_sss) \ | 380 V(S32x4Select, 0xe580, s_sss) \ |
390 V(S32x4Swizzle, 0xe581, s_s) \ | 381 V(S32x4Swizzle, 0xe581, s_s) \ |
391 V(S32x4Shuffle, 0xe582, s_ss) | 382 V(S32x4Shuffle, 0xe582, s_ss) |
392 | 383 |
393 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \ | 384 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \ |
394 V(F32x4ExtractLane, 0xe501, _) \ | 385 V(F32x4ExtractLane, 0xe501, _) \ |
395 V(F32x4ReplaceLane, 0xe502, _) \ | 386 V(F32x4ReplaceLane, 0xe502, _) \ |
396 V(I32x4ExtractLane, 0xe51c, _) \ | 387 V(I32x4ExtractLane, 0xe51c, _) \ |
397 V(I32x4ReplaceLane, 0xe51d, _) \ | 388 V(I32x4ReplaceLane, 0xe51d, _) \ |
| 389 V(I32x4Shl, 0xe524, _) \ |
| 390 V(I32x4ShrS, 0xe525, _) \ |
| 391 V(I32x4ShrU, 0xe532, _) \ |
398 V(I16x8ExtractLane, 0xe539, _) \ | 392 V(I16x8ExtractLane, 0xe539, _) \ |
399 V(I16x8ReplaceLane, 0xe53a, _) \ | 393 V(I16x8ReplaceLane, 0xe53a, _) \ |
| 394 V(I16x8Shl, 0xe543, _) \ |
| 395 V(I16x8ShrS, 0xe544, _) \ |
| 396 V(I16x8ShrU, 0xe552, _) \ |
400 V(I8x16ExtractLane, 0xe558, _) \ | 397 V(I8x16ExtractLane, 0xe558, _) \ |
401 V(I8x16ReplaceLane, 0xe559, _) | 398 V(I8x16ReplaceLane, 0xe559, _) \ |
| 399 V(I8x16Shl, 0xe562, _) \ |
| 400 V(I8x16ShrS, 0xe563, _) \ |
| 401 V(I8x16ShrU, 0xe571, _) |
402 | 402 |
403 #define FOREACH_ATOMIC_OPCODE(V) \ | 403 #define FOREACH_ATOMIC_OPCODE(V) \ |
404 V(I32AtomicAdd8S, 0xe601, i_ii) \ | 404 V(I32AtomicAdd8S, 0xe601, i_ii) \ |
405 V(I32AtomicAdd8U, 0xe602, i_ii) \ | 405 V(I32AtomicAdd8U, 0xe602, i_ii) \ |
406 V(I32AtomicAdd16S, 0xe603, i_ii) \ | 406 V(I32AtomicAdd16S, 0xe603, i_ii) \ |
407 V(I32AtomicAdd16U, 0xe604, i_ii) \ | 407 V(I32AtomicAdd16U, 0xe604, i_ii) \ |
408 V(I32AtomicAdd, 0xe605, i_ii) \ | 408 V(I32AtomicAdd, 0xe605, i_ii) \ |
409 V(I32AtomicAnd8S, 0xe606, i_ii) \ | 409 V(I32AtomicAnd8S, 0xe606, i_ii) \ |
410 V(I32AtomicAnd8U, 0xe607, i_ii) \ | 410 V(I32AtomicAnd8U, 0xe607, i_ii) \ |
411 V(I32AtomicAnd16S, 0xe608, i_ii) \ | 411 V(I32AtomicAnd16S, 0xe608, i_ii) \ |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 default: | 676 default: |
677 return "<unknown>"; | 677 return "<unknown>"; |
678 } | 678 } |
679 } | 679 } |
680 }; | 680 }; |
681 } // namespace wasm | 681 } // namespace wasm |
682 } // namespace internal | 682 } // namespace internal |
683 } // namespace v8 | 683 } // namespace v8 |
684 | 684 |
685 #endif // V8_WASM_OPCODES_H_ | 685 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |