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

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 814043002: Revert of [turbofan] remove control field from instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/register-allocator.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | 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 "src/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 outputs[output_count++] = g.DefineSameAsFirst(node); 344 outputs[output_count++] = g.DefineSameAsFirst(node);
345 if (cont->IsSet()) { 345 if (cont->IsSet()) {
346 outputs[output_count++] = g.DefineAsRegister(cont->result()); 346 outputs[output_count++] = g.DefineAsRegister(cont->result());
347 } 347 }
348 348
349 DCHECK_NE(0, static_cast<int>(input_count)); 349 DCHECK_NE(0, static_cast<int>(input_count));
350 DCHECK_NE(0, static_cast<int>(output_count)); 350 DCHECK_NE(0, static_cast<int>(output_count));
351 DCHECK_GE(arraysize(inputs), input_count); 351 DCHECK_GE(arraysize(inputs), input_count);
352 DCHECK_GE(arraysize(outputs), output_count); 352 DCHECK_GE(arraysize(outputs), output_count);
353 353
354 selector->Emit(cont->Encode(opcode), output_count, outputs, input_count, 354 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
355 inputs); 355 outputs, input_count, inputs);
356 if (cont->IsBranch()) instr->MarkAsControl();
356 } 357 }
357 358
358 359
359 // Shared routine for multiple binary operations. 360 // Shared routine for multiple binary operations.
360 static void VisitBinop(InstructionSelector* selector, Node* node, 361 static void VisitBinop(InstructionSelector* selector, Node* node,
361 InstructionCode opcode) { 362 InstructionCode opcode) {
362 FlagsContinuation cont; 363 FlagsContinuation cont;
363 VisitBinop(selector, node, opcode, &cont); 364 VisitBinop(selector, node, opcode, &cont);
364 } 365 }
365 366
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 970
970 971
971 // Shared routine for multiple compare operations. 972 // Shared routine for multiple compare operations.
972 static void VisitCompare(InstructionSelector* selector, InstructionCode opcode, 973 static void VisitCompare(InstructionSelector* selector, InstructionCode opcode,
973 InstructionOperand* left, InstructionOperand* right, 974 InstructionOperand* left, InstructionOperand* right,
974 FlagsContinuation* cont) { 975 FlagsContinuation* cont) {
975 X64OperandGenerator g(selector); 976 X64OperandGenerator g(selector);
976 opcode = cont->Encode(opcode); 977 opcode = cont->Encode(opcode);
977 if (cont->IsBranch()) { 978 if (cont->IsBranch()) {
978 selector->Emit(opcode, NULL, left, right, g.Label(cont->true_block()), 979 selector->Emit(opcode, NULL, left, right, g.Label(cont->true_block()),
979 g.Label(cont->false_block())); 980 g.Label(cont->false_block()))->MarkAsControl();
980 } else { 981 } else {
981 DCHECK(cont->IsSet()); 982 DCHECK(cont->IsSet());
982 selector->Emit(opcode, g.DefineAsRegister(cont->result()), left, right); 983 selector->Emit(opcode, g.DefineAsRegister(cont->result()), left, right);
983 } 984 }
984 } 985 }
985 986
986 987
987 // Shared routine for multiple compare operations. 988 // Shared routine for multiple compare operations.
988 static void VisitCompare(InstructionSelector* selector, InstructionCode opcode, 989 static void VisitCompare(InstructionSelector* selector, InstructionCode opcode,
989 Node* left, Node* right, FlagsContinuation* cont, 990 Node* left, Node* right, FlagsContinuation* cont,
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 MachineOperatorBuilder::kFloat64Ceil | 1308 MachineOperatorBuilder::kFloat64Ceil |
1308 MachineOperatorBuilder::kFloat64RoundTruncate | 1309 MachineOperatorBuilder::kFloat64RoundTruncate |
1309 MachineOperatorBuilder::kWord32ShiftIsSafe; 1310 MachineOperatorBuilder::kWord32ShiftIsSafe;
1310 } 1311 }
1311 return MachineOperatorBuilder::kNoFlags; 1312 return MachineOperatorBuilder::kNoFlags;
1312 } 1313 }
1313 1314
1314 } // namespace compiler 1315 } // namespace compiler
1315 } // namespace internal 1316 } // namespace internal
1316 } // namespace v8 1317 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698