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

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

Issue 707803002: [turbofan] move label generation to code generator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/assembler.h ('k') | 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.InputRpo(0))); 196 __ b(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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 ArmOperandConverter i(this, instr); 508 ArmOperandConverter i(this, instr);
509 Label done; 509 Label done;
510 510
511 // Emit a branch. The true and false targets are always the last two inputs 511 // Emit a branch. The true and false targets are always the last two inputs
512 // to the instruction. 512 // to the instruction.
513 BasicBlock::RpoNumber tblock = 513 BasicBlock::RpoNumber tblock =
514 i.InputRpo(static_cast<int>(instr->InputCount()) - 2); 514 i.InputRpo(static_cast<int>(instr->InputCount()) - 2);
515 BasicBlock::RpoNumber fblock = 515 BasicBlock::RpoNumber fblock =
516 i.InputRpo(static_cast<int>(instr->InputCount()) - 1); 516 i.InputRpo(static_cast<int>(instr->InputCount()) - 1);
517 bool fallthru = IsNextInAssemblyOrder(fblock); 517 bool fallthru = IsNextInAssemblyOrder(fblock);
518 Label* tlabel = code()->GetLabel(tblock); 518 Label* tlabel = GetLabel(tblock);
519 Label* flabel = fallthru ? &done : code()->GetLabel(fblock); 519 Label* flabel = fallthru ? &done : GetLabel(fblock);
520 switch (condition) { 520 switch (condition) {
521 case kUnorderedEqual: 521 case kUnorderedEqual:
522 __ b(vs, flabel); 522 __ b(vs, flabel);
523 // Fall through. 523 // Fall through.
524 case kEqual: 524 case kEqual:
525 __ b(eq, tlabel); 525 __ b(eq, tlabel);
526 break; 526 break;
527 case kUnorderedNotEqual: 527 case kUnorderedNotEqual:
528 __ b(vs, tlabel); 528 __ b(vs, tlabel);
529 // Fall through. 529 // Fall through.
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 } 946 }
947 } 947 }
948 MarkLazyDeoptSite(); 948 MarkLazyDeoptSite();
949 } 949 }
950 950
951 #undef __ 951 #undef __
952 952
953 } // namespace compiler 953 } // namespace compiler
954 } // namespace internal 954 } // namespace internal
955 } // namespace v8 955 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698