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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 1848253002: MIPS: [wasm] Implement Int32MulPair operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <iostream>
miran.karic 2016/04/04 14:36:03 Is this needed?
Marija Antic 2016/04/05 07:50:04 Done.
7 #include <limits> 8 #include <limits>
8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
11 #include "src/codegen.h" 11 #include "src/codegen.h"
12 #include "test/cctest/cctest.h" 12 #include "test/cctest/cctest.h"
13 #include "test/cctest/compiler/codegen-tester.h" 13 #include "test/cctest/compiler/codegen-tester.h"
14 #include "test/cctest/compiler/graph-builder-tester.h" 14 #include "test/cctest/compiler/graph-builder-tester.h"
15 #include "test/cctest/compiler/value-helper.h" 15 #include "test/cctest/compiler/value-helper.h"
16 16
17 using namespace v8::base; 17 using namespace v8::base;
18 18
(...skipping 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after
4194 4194
4195 m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0))); 4195 m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0)));
4196 4196
4197 FOR_FLOAT64_INPUTS(i) { CHECK_FLOAT_EQ(DoubleToFloat32(*i), m.Call(*i)); } 4197 FOR_FLOAT64_INPUTS(i) { CHECK_FLOAT_EQ(DoubleToFloat32(*i), m.Call(*i)); }
4198 } 4198 }
4199 4199
4200 uint64_t ToInt64(uint32_t low, uint32_t high) { 4200 uint64_t ToInt64(uint32_t low, uint32_t high) {
4201 return (static_cast<uint64_t>(high) << 32) | static_cast<uint64_t>(low); 4201 return (static_cast<uint64_t>(high) << 32) | static_cast<uint64_t>(low);
4202 } 4202 }
4203 4203
4204 #if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_X87 4204 #if V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_X87
4205 TEST(RunInt32PairAdd) { 4205 TEST(RunInt32PairAdd) {
4206 BufferedRawMachineAssemblerTester<int32_t> m( 4206 BufferedRawMachineAssemblerTester<int32_t> m(
4207 MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(), 4207 MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(),
4208 MachineType::Uint32()); 4208 MachineType::Uint32());
4209 4209
4210 uint32_t high; 4210 uint32_t high;
4211 uint32_t low; 4211 uint32_t low;
4212 4212
4213 Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2), 4213 Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2),
4214 m.Parameter(3)); 4214 m.Parameter(3));
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
6380 r.Goto(&merge); 6380 r.Goto(&merge);
6381 r.Bind(&merge); 6381 r.Bind(&merge);
6382 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb); 6382 Node* phi = r.Phi(MachineRepresentation::kWord32, fa, fb);
6383 r.Return(phi); 6383 r.Return(phi);
6384 CHECK_EQ(1, r.Call(1)); 6384 CHECK_EQ(1, r.Call(1));
6385 } 6385 }
6386 6386
6387 } // namespace compiler 6387 } // namespace compiler
6388 } // namespace internal 6388 } // namespace internal
6389 } // namespace v8 6389 } // namespace v8
OLDNEW
« src/mips/macro-assembler-mips.cc ('K') | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698