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 #include <stdint.h> | 5 #include <stdint.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "src/wasm/wasm-macro-gen.h" | 9 #include "src/wasm/wasm-macro-gen.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 #endif | 34 #endif |
35 | 35 |
36 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_X87 || V8_TARGET_ARCH_ARM | 36 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_X87 || V8_TARGET_ARCH_ARM |
37 #define MIPS_OR_ARM_OR_X87 true | 37 #define MIPS_OR_ARM_OR_X87 true |
38 #else | 38 #else |
39 #define MIPS_OR_ARM_OR_X87 false | 39 #define MIPS_OR_ARM_OR_X87 false |
40 #endif | 40 #endif |
41 | 41 |
42 #define FOREACH_I64_OPERATOR(V) \ | 42 #define FOREACH_I64_OPERATOR(V) \ |
43 V(DepthFirst, true) \ | 43 V(DepthFirst, true) \ |
44 V(I64Phi, false) \ | 44 V(I64Phi, true) \ |
45 V(I64Const, true) \ | 45 V(I64Const, true) \ |
46 V(I64Return, true) \ | 46 V(I64Return, true) \ |
47 V(I64Param, true) \ | 47 V(I64Param, true) \ |
48 V(I64LoadStore, true) \ | 48 V(I64LoadStore, true) \ |
49 V(I64Add, !MIPS_OR_X87) \ | 49 V(I64Add, !MIPS_OR_X87) \ |
50 V(I64Sub, !MIPS_OR_X87) \ | 50 V(I64Sub, !MIPS_OR_X87) \ |
51 V(I64Mul, false) \ | 51 V(I64Mul, false) \ |
52 V(I64DivS, true) \ | 52 V(I64DivS, true) \ |
53 V(I64DivU, true) \ | 53 V(I64DivU, true) \ |
54 V(I64RemS, true) \ | 54 V(I64RemS, true) \ |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 REQUIRE(I64Eq); | 1308 REQUIRE(I64Eq); |
1309 | 1309 |
1310 WasmRunner<int32_t> r(MachineType::Int64()); | 1310 WasmRunner<int32_t> r(MachineType::Int64()); |
1311 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0))); | 1311 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0))); |
1312 | 1312 |
1313 FOR_INT64_INPUTS(i) { | 1313 FOR_INT64_INPUTS(i) { |
1314 int32_t result = *i == 0 ? 1 : 0; | 1314 int32_t result = *i == 0 ? 1 : 0; |
1315 CHECK_EQ(result, r.Call(*i)); | 1315 CHECK_EQ(result, r.Call(*i)); |
1316 } | 1316 } |
1317 } | 1317 } |
OLD | NEW |