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

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 646393002: [turbofan] remove some of the dependency of Instruction on Schedule (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 __ cmp(cp, kScratchReg); 186 __ cmp(cp, kScratchReg);
187 __ Assert(eq, kWrongFunctionContext); 187 __ Assert(eq, kWrongFunctionContext);
188 } 188 }
189 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); 189 __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
190 __ Call(ip); 190 __ Call(ip);
191 AddSafepointAndDeopt(instr); 191 AddSafepointAndDeopt(instr);
192 DCHECK_EQ(LeaveCC, i.OutputSBit()); 192 DCHECK_EQ(LeaveCC, i.OutputSBit());
193 break; 193 break;
194 } 194 }
195 case kArchJmp: 195 case kArchJmp:
196 __ b(code_->GetLabel(i.InputBlock(0))); 196 __ b(code_->GetLabel(i.InputRpo(0)));
197 DCHECK_EQ(LeaveCC, i.OutputSBit()); 197 DCHECK_EQ(LeaveCC, i.OutputSBit());
198 break; 198 break;
199 case kArchNop: 199 case kArchNop:
200 // don't emit code for nops. 200 // don't emit code for nops.
201 DCHECK_EQ(LeaveCC, i.OutputSBit()); 201 DCHECK_EQ(LeaveCC, i.OutputSBit());
202 break; 202 break;
203 case kArchRet: 203 case kArchRet:
204 AssembleReturn(); 204 AssembleReturn();
205 DCHECK_EQ(LeaveCC, i.OutputSBit()); 205 DCHECK_EQ(LeaveCC, i.OutputSBit());
206 break; 206 break;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 479
480 // Assembles branches after an instruction. 480 // Assembles branches after an instruction.
481 void CodeGenerator::AssembleArchBranch(Instruction* instr, 481 void CodeGenerator::AssembleArchBranch(Instruction* instr,
482 FlagsCondition condition) { 482 FlagsCondition condition) {
483 ArmOperandConverter i(this, instr); 483 ArmOperandConverter i(this, instr);
484 Label done; 484 Label done;
485 485
486 // Emit a branch. The true and false targets are always the last two inputs 486 // Emit a branch. The true and false targets are always the last two inputs
487 // to the instruction. 487 // to the instruction.
488 BasicBlock* tblock = i.InputBlock(instr->InputCount() - 2); 488 BasicBlock::RpoNumber tblock =
489 BasicBlock* fblock = i.InputBlock(instr->InputCount() - 1); 489 i.InputRpo(static_cast<int>(instr->InputCount()) - 2);
490 BasicBlock::RpoNumber fblock =
491 i.InputRpo(static_cast<int>(instr->InputCount()) - 1);
490 bool fallthru = IsNextInAssemblyOrder(fblock); 492 bool fallthru = IsNextInAssemblyOrder(fblock);
491 Label* tlabel = code()->GetLabel(tblock); 493 Label* tlabel = code()->GetLabel(tblock);
492 Label* flabel = fallthru ? &done : code()->GetLabel(fblock); 494 Label* flabel = fallthru ? &done : code()->GetLabel(fblock);
493 switch (condition) { 495 switch (condition) {
494 case kUnorderedEqual: 496 case kUnorderedEqual:
495 __ b(vs, flabel); 497 __ b(vs, flabel);
496 // Fall through. 498 // Fall through.
497 case kEqual: 499 case kEqual:
498 __ b(eq, tlabel); 500 __ b(eq, tlabel);
499 break; 501 break;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 } 921 }
920 } 922 }
921 MarkLazyDeoptSite(); 923 MarkLazyDeoptSite();
922 } 924 }
923 925
924 #undef __ 926 #undef __
925 927
926 } // namespace compiler 928 } // namespace compiler
927 } // namespace internal 929 } // namespace internal
928 } // namespace v8 930 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698