Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: test/cctest/wasm/test-run-wasm.cc

Issue 1561023002: X87: [wasm] Change the test case for Run_WasmCall_Float32Sub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 10
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 TestingModule module; 2793 TestingModule module;
2794 BUILD(t, WASM_F32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 2794 BUILD(t, WASM_F32_SUB(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2795 uint32_t index = t.CompileAndAdd(&module); 2795 uint32_t index = t.CompileAndAdd(&module);
2796 2796
2797 // Builder the caller function. 2797 // Builder the caller function.
2798 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); 2798 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
2799 r.env()->module = &module; 2799 r.env()->module = &module;
2800 BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 2800 BUILD(r, WASM_CALL_FUNCTION(index, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
2801 2801
2802 FOR_FLOAT32_INPUTS(i) { 2802 FOR_FLOAT32_INPUTS(i) {
2803 FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i - *j, r.Call(*i, *j)); } 2803 FOR_FLOAT32_INPUTS(j) {
2804 volatile float expected = *i - *j;
2805 CheckFloatEq(expected, r.Call(*i, *j));
2806 }
2804 } 2807 }
2805 } 2808 }
2806 2809
2807 2810
2808 TEST(Run_WasmCall_Float64Sub) { 2811 TEST(Run_WasmCall_Float64Sub) {
2809 WasmRunner<int32_t> r; 2812 WasmRunner<int32_t> r;
2810 TestingModule module; 2813 TestingModule module;
2811 double* memory = module.AddMemoryElems<double>(16); 2814 double* memory = module.AddMemoryElems<double>(16);
2812 r.env()->module = &module; 2815 r.env()->module = &module;
2813 2816
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 TEST(Run_Wasm_F32CopySign) { 3567 TEST(Run_Wasm_F32CopySign) {
3565 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32()); 3568 WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
3566 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); 3569 BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
3567 3570
3568 FOR_FLOAT32_INPUTS(i) { 3571 FOR_FLOAT32_INPUTS(i) {
3569 FOR_FLOAT32_INPUTS(j) { CheckFloatEq(copysign(*i, *j), r.Call(*i, *j)); } 3572 FOR_FLOAT32_INPUTS(j) { CheckFloatEq(copysign(*i, *j), r.Call(*i, *j)); }
3570 } 3573 }
3571 } 3574 }
3572 3575
3573 #endif 3576 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698