| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 #define WASM_INC_LOCAL_BYV(index, count) \ | 453 #define WASM_INC_LOCAL_BYV(index, count) \ |
| 454 kExprGetLocal, static_cast<byte>(index), kExprI32Const, \ | 454 kExprGetLocal, static_cast<byte>(index), kExprI32Const, \ |
| 455 static_cast<byte>(count), kExprI32Add, kExprTeeLocal, \ | 455 static_cast<byte>(count), kExprI32Add, kExprTeeLocal, \ |
| 456 static_cast<byte>(index) | 456 static_cast<byte>(index) |
| 457 #define WASM_INC_LOCAL_BY(index, count) \ | 457 #define WASM_INC_LOCAL_BY(index, count) \ |
| 458 kExprGetLocal, static_cast<byte>(index), kExprI32Const, \ | 458 kExprGetLocal, static_cast<byte>(index), kExprI32Const, \ |
| 459 static_cast<byte>(count), kExprI32Add, kExprSetLocal, \ | 459 static_cast<byte>(count), kExprI32Add, kExprSetLocal, \ |
| 460 static_cast<byte>(index) | 460 static_cast<byte>(index) |
| 461 #define WASM_UNOP(opcode, x) x, static_cast<byte>(opcode) | 461 #define WASM_UNOP(opcode, x) x, static_cast<byte>(opcode) |
| 462 #define WASM_BINOP(opcode, x, y) x, y, static_cast<byte>(opcode) | 462 #define WASM_BINOP(opcode, x, y) x, y, static_cast<byte>(opcode) |
| 463 #define WASM_SIMD_UNOP(opcode, x) x, kSimdPrefix, static_cast<byte>(opcode) | |
| 464 #define WASM_SIMD_BINOP(opcode, x, y) \ | |
| 465 x, y, kSimdPrefix, static_cast<byte>(opcode) | |
| 466 | 463 |
| 467 //------------------------------------------------------------------------------ | 464 //------------------------------------------------------------------------------ |
| 468 // Int32 operations | 465 // Int32 operations |
| 469 //------------------------------------------------------------------------------ | 466 //------------------------------------------------------------------------------ |
| 470 #define WASM_I32_ADD(x, y) x, y, kExprI32Add | 467 #define WASM_I32_ADD(x, y) x, y, kExprI32Add |
| 471 #define WASM_I32_SUB(x, y) x, y, kExprI32Sub | 468 #define WASM_I32_SUB(x, y) x, y, kExprI32Sub |
| 472 #define WASM_I32_MUL(x, y) x, y, kExprI32Mul | 469 #define WASM_I32_MUL(x, y) x, y, kExprI32Mul |
| 473 #define WASM_I32_DIVS(x, y) x, y, kExprI32DivS | 470 #define WASM_I32_DIVS(x, y) x, y, kExprI32DivS |
| 474 #define WASM_I32_DIVU(x, y) x, y, kExprI32DivU | 471 #define WASM_I32_DIVU(x, y) x, y, kExprI32DivU |
| 475 #define WASM_I32_REMS(x, y) x, y, kExprI32RemS | 472 #define WASM_I32_REMS(x, y) x, y, kExprI32RemS |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) | 681 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) |
| 685 #define WASM_BRV_IF(depth, val, cond) \ | 682 #define WASM_BRV_IF(depth, val, cond) \ |
| 686 val, cond, kExprBrIf, static_cast<byte>(depth) | 683 val, cond, kExprBrIf, static_cast<byte>(depth) |
| 687 #define WASM_BRV_IFD(depth, val, cond) \ | 684 #define WASM_BRV_IFD(depth, val, cond) \ |
| 688 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop | 685 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop |
| 689 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd | 686 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd |
| 690 #define WASM_BR_TABLEV(val, key, count, ...) \ | 687 #define WASM_BR_TABLEV(val, key, count, ...) \ |
| 691 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ | 688 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ |
| 692 | 689 |
| 693 #endif // V8_WASM_MACRO_GEN_H_ | 690 #endif // V8_WASM_MACRO_GEN_H_ |
| OLD | NEW |