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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.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/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction.h » ('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 #include "src/compiler/node-properties-inl.h" 7 #include "src/compiler/node-properties-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if (cont->IsSet()) { 367 if (cont->IsSet()) {
368 // TODO(turbofan): Use byte register here. 368 // TODO(turbofan): Use byte register here.
369 outputs[output_count++] = g.DefineAsRegister(cont->result()); 369 outputs[output_count++] = g.DefineAsRegister(cont->result());
370 } 370 }
371 371
372 DCHECK_NE(0, input_count); 372 DCHECK_NE(0, input_count);
373 DCHECK_NE(0, output_count); 373 DCHECK_NE(0, output_count);
374 DCHECK_GE(arraysize(inputs), input_count); 374 DCHECK_GE(arraysize(inputs), input_count);
375 DCHECK_GE(arraysize(outputs), output_count); 375 DCHECK_GE(arraysize(outputs), output_count);
376 376
377 selector->Emit(cont->Encode(opcode), output_count, outputs, input_count, 377 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count,
378 inputs); 378 outputs, input_count, inputs);
379 if (cont->IsBranch()) instr->MarkAsControl();
379 } 380 }
380 381
381 382
382 // Shared routine for multiple binary operations. 383 // Shared routine for multiple binary operations.
383 static void VisitBinop(InstructionSelector* selector, Node* node, 384 static void VisitBinop(InstructionSelector* selector, Node* node,
384 InstructionCode opcode) { 385 InstructionCode opcode) {
385 FlagsContinuation cont; 386 FlagsContinuation cont;
386 VisitBinop(selector, node, opcode, &cont); 387 VisitBinop(selector, node, opcode, &cont);
387 } 388 }
388 389
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 769
769 namespace { 770 namespace {
770 771
771 // Shared routine for multiple compare operations. 772 // Shared routine for multiple compare operations.
772 void VisitCompare(InstructionSelector* selector, InstructionCode opcode, 773 void VisitCompare(InstructionSelector* selector, InstructionCode opcode,
773 InstructionOperand* left, InstructionOperand* right, 774 InstructionOperand* left, InstructionOperand* right,
774 FlagsContinuation* cont) { 775 FlagsContinuation* cont) {
775 IA32OperandGenerator g(selector); 776 IA32OperandGenerator g(selector);
776 if (cont->IsBranch()) { 777 if (cont->IsBranch()) {
777 selector->Emit(cont->Encode(opcode), NULL, left, right, 778 selector->Emit(cont->Encode(opcode), NULL, left, right,
778 g.Label(cont->true_block()), g.Label(cont->false_block())); 779 g.Label(cont->true_block()),
780 g.Label(cont->false_block()))->MarkAsControl();
779 } else { 781 } else {
780 DCHECK(cont->IsSet()); 782 DCHECK(cont->IsSet());
781 // TODO(titzer): Needs byte register. 783 // TODO(titzer): Needs byte register.
782 selector->Emit(cont->Encode(opcode), g.DefineAsRegister(cont->result()), 784 selector->Emit(cont->Encode(opcode), g.DefineAsRegister(cont->result()),
783 left, right); 785 left, right);
784 } 786 }
785 } 787 }
786 788
787 789
788 // Shared routine for multiple compare operations. 790 // Shared routine for multiple compare operations.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 return MachineOperatorBuilder::kFloat64Floor | 1002 return MachineOperatorBuilder::kFloat64Floor |
1001 MachineOperatorBuilder::kFloat64Ceil | 1003 MachineOperatorBuilder::kFloat64Ceil |
1002 MachineOperatorBuilder::kFloat64RoundTruncate | 1004 MachineOperatorBuilder::kFloat64RoundTruncate |
1003 MachineOperatorBuilder::kWord32ShiftIsSafe; 1005 MachineOperatorBuilder::kWord32ShiftIsSafe;
1004 } 1006 }
1005 return MachineOperatorBuilder::Flag::kNoFlags; 1007 return MachineOperatorBuilder::Flag::kNoFlags;
1006 } 1008 }
1007 } // namespace compiler 1009 } // namespace compiler
1008 } // namespace internal 1010 } // namespace internal
1009 } // namespace v8 1011 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698