| 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 2662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2673 TEST(Run_Wasm_F64CopySign) { | 2673 TEST(Run_Wasm_F64CopySign) { |
| 2674 WasmRunner<double> r(MachineType::Float64(), MachineType::Float64()); | 2674 WasmRunner<double> r(MachineType::Float64(), MachineType::Float64()); |
| 2675 BUILD(r, WASM_F64_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 2675 BUILD(r, WASM_F64_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
| 2676 | 2676 |
| 2677 FOR_FLOAT64_INPUTS(i) { | 2677 FOR_FLOAT64_INPUTS(i) { |
| 2678 FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(copysign(*i, *j), r.Call(*i, *j)); } | 2678 FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(copysign(*i, *j), r.Call(*i, *j)); } |
| 2679 } | 2679 } |
| 2680 } | 2680 } |
| 2681 | 2681 |
| 2682 | 2682 |
| 2683 // TODO(tizer): Fix on arm and reenable. | |
| 2684 #if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 | |
| 2685 | |
| 2686 TEST(Run_Wasm_F32CopySign) { | 2683 TEST(Run_Wasm_F32CopySign) { |
| 2687 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); | 2684 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); |
| 2688 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 2685 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
| 2689 | 2686 |
| 2690 FOR_FLOAT32_INPUTS(i) { | 2687 FOR_FLOAT32_INPUTS(i) { |
| 2691 FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysign(*i, *j), r.Call(*i, *j)); } | 2688 FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysign(*i, *j), r.Call(*i, *j)); } |
| 2692 } | 2689 } |
| 2693 } | 2690 } |
| 2694 | 2691 |
| 2695 | |
| 2696 #endif | |
| 2697 | |
| 2698 | |
| 2699 void CompileCallIndirectMany(LocalType param) { | 2692 void CompileCallIndirectMany(LocalType param) { |
| 2700 // Make sure we don't run out of registers when compiling indirect calls | 2693 // Make sure we don't run out of registers when compiling indirect calls |
| 2701 // with many many parameters. | 2694 // with many many parameters. |
| 2702 TestSignatures sigs; | 2695 TestSignatures sigs; |
| 2703 for (byte num_params = 0; num_params < 40; num_params++) { | 2696 for (byte num_params = 0; num_params < 40; num_params++) { |
| 2704 Zone zone; | 2697 Zone zone; |
| 2705 HandleScope scope(CcTest::InitIsolateOnce()); | 2698 HandleScope scope(CcTest::InitIsolateOnce()); |
| 2706 TestingModule module; | 2699 TestingModule module; |
| 2707 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params); | 2700 FunctionSig* sig = sigs.many(&zone, kAstStmt, param, num_params); |
| 2708 | 2701 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2730 | 2723 |
| 2731 #if WASM_64 | 2724 #if WASM_64 |
| 2732 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } | 2725 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } |
| 2733 #endif | 2726 #endif |
| 2734 | 2727 |
| 2735 | 2728 |
| 2736 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } | 2729 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } |
| 2737 | 2730 |
| 2738 | 2731 |
| 2739 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } | 2732 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } |
| OLD | NEW |