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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 WASM_I64_SCONVERT_I32(WASM_GET_LOCAL(0)))), | 1194 WASM_I64_SCONVERT_I32(WASM_GET_LOCAL(0)))), |
1195 WASM_ZERO)); | 1195 WASM_ZERO)); |
1196 | 1196 |
1197 *global = 0xFFFFFFFFFFFFFFFFLL; | 1197 *global = 0xFFFFFFFFFFFFFFFFLL; |
1198 for (int i = 9; i < 444444; i += 111111) { | 1198 for (int i = 9; i < 444444; i += 111111) { |
1199 int64_t expected = *global & i; | 1199 int64_t expected = *global & i; |
1200 r.Call(i); | 1200 r.Call(i); |
1201 CHECK_EQ(expected, *global); | 1201 CHECK_EQ(expected, *global); |
1202 } | 1202 } |
1203 } | 1203 } |
| 1204 |
| 1205 TEST(Run_WasmI64Eqz) { |
| 1206 REQUIRE(I64Eq); |
| 1207 |
| 1208 WasmRunner<int32_t> r(MachineType::Int64()); |
| 1209 BUILD(r, WASM_I64_EQZ(WASM_GET_LOCAL(0))); |
| 1210 |
| 1211 FOR_INT64_INPUTS(i) { |
| 1212 int32_t result = *i == 0 ? 1 : 0; |
| 1213 CHECK_EQ(result, r.Call(*i)); |
| 1214 } |
| 1215 } |
OLD | NEW |