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 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(copysign(*i, *j), r.Call(*i, *j)); } | 2765 FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(copysign(*i, *j), r.Call(*i, *j)); } |
2766 } | 2766 } |
2767 } | 2767 } |
2768 | 2768 |
2769 | 2769 |
2770 TEST(Run_Wasm_F32CopySign) { | 2770 TEST(Run_Wasm_F32CopySign) { |
2771 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); | 2771 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); |
2772 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); | 2772 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); |
2773 | 2773 |
2774 FOR_FLOAT32_INPUTS(i) { | 2774 FOR_FLOAT32_INPUTS(i) { |
2775 FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysign(*i, *j), r.Call(*i, *j)); } | 2775 FOR_FLOAT32_INPUTS(j) { CHECK_FLOAT_EQ(copysignf(*i, *j), r.Call(*i, *j)); } |
2776 } | 2776 } |
2777 } | 2777 } |
2778 | 2778 |
2779 void CompileCallIndirectMany(LocalType param) { | 2779 void CompileCallIndirectMany(LocalType param) { |
2780 // Make sure we don't run out of registers when compiling indirect calls | 2780 // Make sure we don't run out of registers when compiling indirect calls |
2781 // with many many parameters. | 2781 // with many many parameters. |
2782 TestSignatures sigs; | 2782 TestSignatures sigs; |
2783 for (byte num_params = 0; num_params < 40; num_params++) { | 2783 for (byte num_params = 0; num_params < 40; num_params++) { |
2784 v8::base::AccountingAllocator allocator; | 2784 v8::base::AccountingAllocator allocator; |
2785 Zone zone(&allocator); | 2785 Zone zone(&allocator); |
(...skipping 25 matching lines...) Expand all Loading... |
2811 | 2811 |
2812 #if WASM_64 | 2812 #if WASM_64 |
2813 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } | 2813 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } |
2814 #endif | 2814 #endif |
2815 | 2815 |
2816 | 2816 |
2817 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } | 2817 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } |
2818 | 2818 |
2819 | 2819 |
2820 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } | 2820 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } |
OLD | NEW |