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 27 matching lines...) Expand all Loading... |
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(I64Const, true) \ | 44 V(I64Const, true) \ |
45 V(I64Return, true) \ | 45 V(I64Return, true) \ |
46 V(I64Param, true) \ | 46 V(I64Param, true) \ |
47 V(I64LoadStore, true) \ | 47 V(I64LoadStore, true) \ |
48 V(I64Add, true) \ | 48 V(I64Add, !MIPS_OR_X87) \ |
49 V(I64Sub, false) \ | 49 V(I64Sub, false) \ |
50 V(I64Mul, false) \ | 50 V(I64Mul, false) \ |
51 V(I64DivS, true) \ | 51 V(I64DivS, true) \ |
52 V(I64DivU, true) \ | 52 V(I64DivU, true) \ |
53 V(I64RemS, true) \ | 53 V(I64RemS, true) \ |
54 V(I64RemU, true) \ | 54 V(I64RemU, true) \ |
55 V(I64And, true) \ | 55 V(I64And, true) \ |
56 V(I64Ior, true) \ | 56 V(I64Ior, true) \ |
57 V(I64Xor, true) \ | 57 V(I64Xor, true) \ |
58 V(I64Shl, !MIPS_OR_X87) \ | 58 V(I64Shl, !MIPS_OR_X87) \ |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 REQUIRE(I64Eq); | 1282 REQUIRE(I64Eq); |
1283 | 1283 |
1284 WasmRunner<int32_t> r(MachineType::Int64()); | 1284 WasmRunner<int32_t> r(MachineType::Int64()); |
1285 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0))); | 1285 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0))); |
1286 | 1286 |
1287 FOR_INT64_INPUTS(i) { | 1287 FOR_INT64_INPUTS(i) { |
1288 int32_t result = *i == 0 ? 1 : 0; | 1288 int32_t result = *i == 0 ? 1 : 0; |
1289 CHECK_EQ(result, r.Call(*i)); | 1289 CHECK_EQ(result, r.Call(*i)); |
1290 } | 1290 } |
1291 } | 1291 } |
OLD | NEW |