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_MACRO_GEN_H_ | 5 #ifndef V8_WASM_MACRO_GEN_H_ |
6 #define V8_WASM_MACRO_GEN_H_ | 6 #define V8_WASM_MACRO_GEN_H_ |
7 | 7 |
8 #include "src/wasm/wasm-opcodes.h" | 8 #include "src/wasm/wasm-opcodes.h" |
9 | 9 |
10 #include "src/zone/zone-containers.h" | 10 #include "src/zone/zone-containers.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 #define WASM_I32_GTS(x, y) x, y, kExprI32GtS | 488 #define WASM_I32_GTS(x, y) x, y, kExprI32GtS |
489 #define WASM_I32_GES(x, y) x, y, kExprI32GeS | 489 #define WASM_I32_GES(x, y) x, y, kExprI32GeS |
490 #define WASM_I32_GTU(x, y) x, y, kExprI32GtU | 490 #define WASM_I32_GTU(x, y) x, y, kExprI32GtU |
491 #define WASM_I32_GEU(x, y) x, y, kExprI32GeU | 491 #define WASM_I32_GEU(x, y) x, y, kExprI32GeU |
492 #define WASM_I32_CLZ(x) x, kExprI32Clz | 492 #define WASM_I32_CLZ(x) x, kExprI32Clz |
493 #define WASM_I32_CTZ(x) x, kExprI32Ctz | 493 #define WASM_I32_CTZ(x) x, kExprI32Ctz |
494 #define WASM_I32_POPCNT(x) x, kExprI32Popcnt | 494 #define WASM_I32_POPCNT(x) x, kExprI32Popcnt |
495 #define WASM_I32_EQZ(x) x, kExprI32Eqz | 495 #define WASM_I32_EQZ(x) x, kExprI32Eqz |
496 | 496 |
497 //------------------------------------------------------------------------------ | 497 //------------------------------------------------------------------------------ |
| 498 // Asmjs Int32 operations |
| 499 //------------------------------------------------------------------------------ |
| 500 #define WASM_I32_ASMJS_DIVS(x, y) x, y, kExprI32AsmjsDivS |
| 501 #define WASM_I32_ASMJS_REMS(x, y) x, y, kExprI32AsmjsRemS |
| 502 #define WASM_I32_ASMJS_DIVU(x, y) x, y, kExprI32AsmjsDivU |
| 503 #define WASM_I32_ASMJS_REMU(x, y) x, y, kExprI32AsmjsRemU |
| 504 |
| 505 //------------------------------------------------------------------------------ |
498 // Int64 operations | 506 // Int64 operations |
499 //------------------------------------------------------------------------------ | 507 //------------------------------------------------------------------------------ |
500 #define WASM_I64_ADD(x, y) x, y, kExprI64Add | 508 #define WASM_I64_ADD(x, y) x, y, kExprI64Add |
501 #define WASM_I64_SUB(x, y) x, y, kExprI64Sub | 509 #define WASM_I64_SUB(x, y) x, y, kExprI64Sub |
502 #define WASM_I64_MUL(x, y) x, y, kExprI64Mul | 510 #define WASM_I64_MUL(x, y) x, y, kExprI64Mul |
503 #define WASM_I64_DIVS(x, y) x, y, kExprI64DivS | 511 #define WASM_I64_DIVS(x, y) x, y, kExprI64DivS |
504 #define WASM_I64_DIVU(x, y) x, y, kExprI64DivU | 512 #define WASM_I64_DIVU(x, y) x, y, kExprI64DivU |
505 #define WASM_I64_REMS(x, y) x, y, kExprI64RemS | 513 #define WASM_I64_REMS(x, y) x, y, kExprI64RemS |
506 #define WASM_I64_REMU(x, y) x, y, kExprI64RemU | 514 #define WASM_I64_REMU(x, y) x, y, kExprI64RemU |
507 #define WASM_I64_AND(x, y) x, y, kExprI64And | 515 #define WASM_I64_AND(x, y) x, y, kExprI64And |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) | 652 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) |
645 #define WASM_BRV_IF(depth, val, cond) \ | 653 #define WASM_BRV_IF(depth, val, cond) \ |
646 val, cond, kExprBrIf, static_cast<byte>(depth) | 654 val, cond, kExprBrIf, static_cast<byte>(depth) |
647 #define WASM_BRV_IFD(depth, val, cond) \ | 655 #define WASM_BRV_IFD(depth, val, cond) \ |
648 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop | 656 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop |
649 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd | 657 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd |
650 #define WASM_BR_TABLEV(val, key, count, ...) \ | 658 #define WASM_BR_TABLEV(val, key, count, ...) \ |
651 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ | 659 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ |
652 | 660 |
653 #endif // V8_WASM_MACRO_GEN_H_ | 661 #endif // V8_WASM_MACRO_GEN_H_ |
OLD | NEW |