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

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

Issue 1150083006: [turbofan] Tester improvements; use CSignature and simplify ReturnValueTraits. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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. 1 // Copyright 2014 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 <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 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"
(...skipping 4394 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 CHECK_EQ(&inputs[kInputSize], m.Call()); 4405 CHECK_EQ(&inputs[kInputSize], m.Call());
4406 for (int i = 0; i < kInputSize; i++) { 4406 for (int i = 0; i < kInputSize; i++) {
4407 CHECK_EQ(i, inputs[i]); 4407 CHECK_EQ(i, inputs[i]);
4408 CHECK_EQ(kInputSize - i - 1, outputs[i]); 4408 CHECK_EQ(kInputSize - i - 1, outputs[i]);
4409 } 4409 }
4410 } 4410 }
4411 4411
4412 4412
4413 TEST(RunSpillLotsOfThings) { 4413 TEST(RunSpillLotsOfThings) {
4414 static const int kInputSize = 1000; 4414 static const int kInputSize = 1000;
4415 RawMachineAssemblerTester<void> m; 4415 RawMachineAssemblerTester<int32_t> m;
4416 Node* accs[kInputSize]; 4416 Node* accs[kInputSize];
4417 int32_t outputs[kInputSize]; 4417 int32_t outputs[kInputSize];
4418 Node* one = m.Int32Constant(1); 4418 Node* one = m.Int32Constant(1);
4419 Node* acc = one; 4419 Node* acc = one;
4420 for (int i = 0; i < kInputSize; i++) { 4420 for (int i = 0; i < kInputSize; i++) {
4421 acc = m.Int32Add(acc, one); 4421 acc = m.Int32Add(acc, one);
4422 accs[i] = acc; 4422 accs[i] = acc;
4423 } 4423 }
4424 for (int i = 0; i < kInputSize; i++) { 4424 for (int i = 0; i < kInputSize; i++) {
4425 m.StoreToPointer(&outputs[i], kMachInt32, accs[i]); 4425 m.StoreToPointer(&outputs[i], kMachInt32, accs[i]);
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 m.Return(m.Int32Constant(0)); 5142 m.Return(m.Int32Constant(0));
5143 for (size_t i = 0; i < arraysize(kValues); ++i) { 5143 for (size_t i = 0; i < arraysize(kValues); ++i) {
5144 input = kValues[i]; 5144 input = kValues[i];
5145 CHECK_EQ(0, m.Call()); 5145 CHECK_EQ(0, m.Call());
5146 double expected = round(kValues[i]); 5146 double expected = round(kValues[i]);
5147 CHECK_EQ(expected, result); 5147 CHECK_EQ(expected, result);
5148 } 5148 }
5149 } 5149 }
5150 5150
5151 #endif // V8_TURBOFAN_TARGET 5151 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.h ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698