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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.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 | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm64/macro-assembler-arm64.h" 7 #include "src/arm64/macro-assembler-arm64.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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset)); 157 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset));
158 __ cmp(cp, temp); 158 __ cmp(cp, temp);
159 __ Assert(eq, kWrongFunctionContext); 159 __ Assert(eq, kWrongFunctionContext);
160 } 160 }
161 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); 161 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
162 __ Call(x10); 162 __ Call(x10);
163 AddSafepointAndDeopt(instr); 163 AddSafepointAndDeopt(instr);
164 break; 164 break;
165 } 165 }
166 case kArchJmp: 166 case kArchJmp:
167 __ B(code_->GetLabel(i.InputBlock(0))); 167 __ B(code_->GetLabel(i.InputRpo(0)));
168 break; 168 break;
169 case kArchNop: 169 case kArchNop:
170 // don't emit code for nops. 170 // don't emit code for nops.
171 break; 171 break;
172 case kArchRet: 172 case kArchRet:
173 AssembleReturn(); 173 AssembleReturn();
174 break; 174 break;
175 case kArchStackPointer: 175 case kArchStackPointer:
176 __ mov(i.OutputRegister(), masm()->StackPointer()); 176 __ mov(i.OutputRegister(), masm()->StackPointer());
177 break; 177 break;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 520
521 // Assemble branches after this instruction. 521 // Assemble branches after this instruction.
522 void CodeGenerator::AssembleArchBranch(Instruction* instr, 522 void CodeGenerator::AssembleArchBranch(Instruction* instr,
523 FlagsCondition condition) { 523 FlagsCondition condition) {
524 Arm64OperandConverter i(this, instr); 524 Arm64OperandConverter i(this, instr);
525 Label done; 525 Label done;
526 526
527 // Emit a branch. The true and false targets are always the last two inputs 527 // Emit a branch. The true and false targets are always the last two inputs
528 // to the instruction. 528 // to the instruction.
529 BasicBlock* tblock = i.InputBlock(instr->InputCount() - 2); 529 BasicBlock::RpoNumber tblock =
530 BasicBlock* fblock = i.InputBlock(instr->InputCount() - 1); 530 i.InputRpo(static_cast<int>(instr->InputCount()) - 2);
531 BasicBlock::RpoNumber fblock =
532 i.InputRpo(static_cast<int>(instr->InputCount()) - 1);
531 bool fallthru = IsNextInAssemblyOrder(fblock); 533 bool fallthru = IsNextInAssemblyOrder(fblock);
532 Label* tlabel = code()->GetLabel(tblock); 534 Label* tlabel = code()->GetLabel(tblock);
533 Label* flabel = fallthru ? &done : code()->GetLabel(fblock); 535 Label* flabel = fallthru ? &done : code()->GetLabel(fblock);
534 switch (condition) { 536 switch (condition) {
535 case kUnorderedEqual: 537 case kUnorderedEqual:
536 __ B(vs, flabel); 538 __ B(vs, flabel);
537 // Fall through. 539 // Fall through.
538 case kEqual: 540 case kEqual:
539 __ B(eq, tlabel); 541 __ B(eq, tlabel);
540 break; 542 break;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 } 937 }
936 } 938 }
937 MarkLazyDeoptSite(); 939 MarkLazyDeoptSite();
938 } 940 }
939 941
940 #undef __ 942 #undef __
941 943
942 } // namespace compiler 944 } // namespace compiler
943 } // namespace internal 945 } // namespace internal
944 } // namespace v8 946 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698