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

Side by Side Diff: src/compiler/mips/code-generator-mips.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/instruction-selector-impl.h ('k') | src/compiler/register-allocator.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 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 __ lw(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset)); 147 __ lw(kScratchReg, FieldMemOperand(func, JSFunction::kContextOffset));
148 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg)); 148 __ Assert(eq, kWrongFunctionContext, cp, Operand(kScratchReg));
149 } 149 }
150 150
151 __ lw(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); 151 __ lw(at, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
152 __ Call(at); 152 __ Call(at);
153 AddSafepointAndDeopt(instr); 153 AddSafepointAndDeopt(instr);
154 break; 154 break;
155 } 155 }
156 case kArchJmp: 156 case kArchJmp:
157 __ Branch(code_->GetLabel(i.InputBlock(0))); 157 __ Branch(code_->GetLabel(i.InputRpo(0)));
158 break; 158 break;
159 case kArchNop: 159 case kArchNop:
160 // don't emit code for nops. 160 // don't emit code for nops.
161 break; 161 break;
162 case kArchRet: 162 case kArchRet:
163 AssembleReturn(); 163 AssembleReturn();
164 break; 164 break;
165 case kArchStackPointer: 165 case kArchStackPointer:
166 __ mov(i.OutputRegister(), sp); 166 __ mov(i.OutputRegister(), sp);
167 break; 167 break;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 UNIMPLEMENTED(); 386 UNIMPLEMENTED();
387 387
388 // Assembles branches after an instruction. 388 // Assembles branches after an instruction.
389 void CodeGenerator::AssembleArchBranch(Instruction* instr, 389 void CodeGenerator::AssembleArchBranch(Instruction* instr,
390 FlagsCondition condition) { 390 FlagsCondition condition) {
391 MipsOperandConverter i(this, instr); 391 MipsOperandConverter i(this, instr);
392 Label done; 392 Label done;
393 393
394 // Emit a branch. The true and false targets are always the last two inputs 394 // Emit a branch. The true and false targets are always the last two inputs
395 // to the instruction. 395 // to the instruction.
396 BasicBlock* tblock = i.InputBlock(instr->InputCount() - 2); 396 BasicBlock::RpoNumber tblock =
397 BasicBlock* fblock = i.InputBlock(instr->InputCount() - 1); 397 i.InputRpo(static_cast<int>(instr->InputCount()) - 2);
398 BasicBlock::RpoNumber fblock =
399 i.InputRpo(static_cast<int>(instr->InputCount()) - 1);
398 bool fallthru = IsNextInAssemblyOrder(fblock); 400 bool fallthru = IsNextInAssemblyOrder(fblock);
399 Label* tlabel = code()->GetLabel(tblock); 401 Label* tlabel = code()->GetLabel(tblock);
400 Label* flabel = fallthru ? &done : code()->GetLabel(fblock); 402 Label* flabel = fallthru ? &done : code()->GetLabel(fblock);
401 Condition cc = kNoCondition; 403 Condition cc = kNoCondition;
402 404
403 // MIPS does not have condition code flags, so compare and branch are 405 // MIPS does not have condition code flags, so compare and branch are
404 // implemented differently than on the other arch's. The compare operations 406 // implemented differently than on the other arch's. The compare operations
405 // emit mips psuedo-instructions, which are handled here by branch 407 // emit mips psuedo-instructions, which are handled here by branch
406 // instructions that do the actual comparison. Essential that the input 408 // instructions that do the actual comparison. Essential that the input
407 // registers to compare psuedo-op are not modified before this branch op, as 409 // registers to compare psuedo-op are not modified before this branch op, as
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 } 956 }
955 } 957 }
956 MarkLazyDeoptSite(); 958 MarkLazyDeoptSite();
957 } 959 }
958 960
959 #undef __ 961 #undef __
960 962
961 } // namespace compiler 963 } // namespace compiler
962 } // namespace internal 964 } // namespace internal
963 } // namespace v8 965 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698