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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 317 } |
318 | 318 |
319 TEST(Run_WasmI32Eqz) { | 319 TEST(Run_WasmI32Eqz) { |
320 TestInt32Unop(kExprI32Eqz, 0, 1); | 320 TestInt32Unop(kExprI32Eqz, 0, 1); |
321 TestInt32Unop(kExprI32Eqz, 0, -1); | 321 TestInt32Unop(kExprI32Eqz, 0, -1); |
322 TestInt32Unop(kExprI32Eqz, 0, -827343); | 322 TestInt32Unop(kExprI32Eqz, 0, -827343); |
323 TestInt32Unop(kExprI32Eqz, 0, 8888888); | 323 TestInt32Unop(kExprI32Eqz, 0, 8888888); |
324 TestInt32Unop(kExprI32Eqz, 1, 0); | 324 TestInt32Unop(kExprI32Eqz, 1, 0); |
325 } | 325 } |
326 | 326 |
327 | |
328 TEST(Run_WASM_Int32DivS_trap) { | 327 TEST(Run_WASM_Int32DivS_trap) { |
329 WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32()); | 328 WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32()); |
330 BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 329 BUILD(r, WASM_I32_DIVS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
331 CHECK_EQ(0, r.Call(0, 100)); | 330 CHECK_EQ(0, r.Call(0, 100)); |
332 CHECK_TRAP(r.Call(100, 0)); | 331 CHECK_TRAP(r.Call(100, 0)); |
333 CHECK_TRAP(r.Call(-1001, 0)); | 332 CHECK_TRAP(r.Call(-1001, 0)); |
334 CHECK_TRAP(r.Call(std::numeric_limits<int32_t>::min(), -1)); | 333 CHECK_TRAP(r.Call(std::numeric_limits<int32_t>::min(), -1)); |
335 CHECK_TRAP(r.Call(std::numeric_limits<int32_t>::min(), 0)); | 334 CHECK_TRAP(r.Call(std::numeric_limits<int32_t>::min(), 0)); |
336 } | 335 } |
337 | 336 |
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2731 | 2730 |
2732 #if WASM_64 | 2731 #if WASM_64 |
2733 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } | 2732 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } |
2734 #endif | 2733 #endif |
2735 | 2734 |
2736 | 2735 |
2737 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } | 2736 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } |
2738 | 2737 |
2739 | 2738 |
2740 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } | 2739 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } |
OLD | NEW |