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/platform/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" |
10 #include "src/utils.h" | 10 #include "src/utils.h" |
11 #include "src/wasm/wasm-macro-gen.h" | 11 #include "src/wasm/wasm-macro-gen.h" |
12 | 12 |
13 #include "test/cctest/cctest.h" | 13 #include "test/cctest/cctest.h" |
14 #include "test/cctest/compiler/value-helper.h" | 14 #include "test/cctest/compiler/value-helper.h" |
15 #include "test/cctest/wasm/test-signatures.h" | |
16 #include "test/cctest/wasm/wasm-run-utils.h" | 15 #include "test/cctest/wasm/wasm-run-utils.h" |
| 16 #include "test/common/wasm/test-signatures.h" |
17 | 17 |
18 using namespace v8::base; | 18 using namespace v8::base; |
19 using namespace v8::internal; | 19 using namespace v8::internal; |
20 using namespace v8::internal::compiler; | 20 using namespace v8::internal::compiler; |
21 using namespace v8::internal::wasm; | 21 using namespace v8::internal::wasm; |
22 | 22 |
23 // for even shorter tests. | 23 // for even shorter tests. |
24 #define B1(a) WASM_BLOCK(a) | 24 #define B1(a) WASM_BLOCK(a) |
25 #define B2(a, b) WASM_BLOCK(a, b) | 25 #define B2(a, b) WASM_BLOCK(a, b) |
26 #define B3(a, b, c) WASM_BLOCK(a, b, c) | 26 #define B3(a, b, c) WASM_BLOCK(a, b, c) |
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)), WASM_DROP, | 2865 BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)), WASM_DROP, |
2866 WASM_ZERO); | 2866 WASM_ZERO); |
2867 const int32_t kMin = std::numeric_limits<int32_t>::min(); | 2867 const int32_t kMin = std::numeric_limits<int32_t>::min(); |
2868 CHECK_EQ(0, r.Call(133, 100)); | 2868 CHECK_EQ(0, r.Call(133, 100)); |
2869 CHECK_EQ(0, r.Call(kMin, -1)); | 2869 CHECK_EQ(0, r.Call(kMin, -1)); |
2870 CHECK_EQ(0, r.Call(0, 1)); | 2870 CHECK_EQ(0, r.Call(0, 1)); |
2871 CHECK_TRAP(r.Call(100, 0)); | 2871 CHECK_TRAP(r.Call(100, 0)); |
2872 CHECK_TRAP(r.Call(-1001, 0)); | 2872 CHECK_TRAP(r.Call(-1001, 0)); |
2873 CHECK_TRAP(r.Call(kMin, 0)); | 2873 CHECK_TRAP(r.Call(kMin, 0)); |
2874 } | 2874 } |
OLD | NEW |