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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/wasm/wasm-macro-gen.h" | 10 #include "src/wasm/wasm-macro-gen.h" |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 } | 1346 } |
1347 } | 1347 } |
1348 | 1348 |
1349 TEST(Run_Wasm_I64Rol) { | 1349 TEST(Run_Wasm_I64Rol) { |
1350 REQUIRE(I64Rol); | 1350 REQUIRE(I64Rol); |
1351 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); | 1351 WasmRunner<int64_t> r(MachineType::Int64(), MachineType::Int64()); |
1352 BUILD(r, WASM_I64_ROL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 1352 BUILD(r, WASM_I64_ROL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
1353 | 1353 |
1354 FOR_UINT64_INPUTS(i) { | 1354 FOR_UINT64_INPUTS(i) { |
1355 FOR_UINT64_INPUTS(j) { | 1355 FOR_UINT64_INPUTS(j) { |
1356 int64_t expected = bits::RotateRight64(*i, 64 - (*j & 0x3f)); | 1356 int64_t expected = bits::RotateLeft64(*i, *j & 0x3f); |
1357 CHECK_EQ(expected, r.Call(*i, *j)); | 1357 CHECK_EQ(expected, r.Call(*i, *j)); |
1358 } | 1358 } |
1359 } | 1359 } |
1360 } | 1360 } |
OLD | NEW |