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

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

Issue 1269183002: [turbofan] Handle void returns in instruction selector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « src/compiler/instruction-selector.cc ('k') | 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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 Node* a = Int32Input(&m, j); 75 Node* a = Int32Input(&m, j);
76 Node* b = Int32Input(&m, k); 76 Node* b = Int32Input(&m, k);
77 m.Return(m.NewNode(kOps[i], a, b)); 77 m.Return(m.NewNode(kOps[i], a, b));
78 m.GenerateCode(); 78 m.GenerateCode();
79 } 79 }
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 84
85 TEST(CodeGenNop) {
86 RawMachineAssemblerTester<void> m;
87 m.Return(m.Int32Constant(0));
88 m.GenerateCode();
89 }
90
91
85 #if V8_TURBOFAN_BACKEND_64 92 #if V8_TURBOFAN_BACKEND_64
86 static Node* Int64Input(RawMachineAssemblerTester<int64_t>* m, int index) { 93 static Node* Int64Input(RawMachineAssemblerTester<int64_t>* m, int index) {
87 switch (index) { 94 switch (index) {
88 case 0: 95 case 0:
89 return m->Parameter(0); 96 return m->Parameter(0);
90 case 1: 97 case 1:
91 return m->Parameter(1); 98 return m->Parameter(1);
92 case 2: 99 case 2:
93 return m->Int64Constant(0); 100 return m->Int64Constant(0);
94 case 3: 101 case 3:
(...skipping 5174 matching lines...) Expand 10 before | Expand all | Expand 10 after
5269 param, param, param, param)); 5276 param, param, param, param));
5270 FOR_INT32_INPUTS(i) { 5277 FOR_INT32_INPUTS(i) {
5271 int32_t const x = *i; 5278 int32_t const x = *i;
5272 CHECK_EQ(x * 8, m.Call(x)); 5279 CHECK_EQ(x * 8, m.Call(x));
5273 } 5280 }
5274 } 5281 }
5275 5282
5276 #endif // USE_SIMULATOR 5283 #endif // USE_SIMULATOR
5277 5284
5278 #endif // V8_TURBOFAN_TARGET 5285 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698