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

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

Issue 2474023002: PPC/s390: [builtins]: Uniformly push argument count in TF-generated builtins (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/compiler/s390/code-generator-s390.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/compilation-info.h" 7 #include "src/compilation-info.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 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 if (FLAG_enable_embedded_constant_pool) { 2122 if (FLAG_enable_embedded_constant_pool) {
2123 __ Push(r0, fp, kConstantPoolRegister); 2123 __ Push(r0, fp, kConstantPoolRegister);
2124 // Adjust FP to point to saved FP. 2124 // Adjust FP to point to saved FP.
2125 __ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); 2125 __ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset));
2126 } else { 2126 } else {
2127 __ Push(r0, fp); 2127 __ Push(r0, fp);
2128 __ mr(fp, sp); 2128 __ mr(fp, sp);
2129 } 2129 }
2130 } else if (descriptor->IsJSFunctionCall()) { 2130 } else if (descriptor->IsJSFunctionCall()) {
2131 __ Prologue(this->info()->GeneratePreagedPrologue(), ip); 2131 __ Prologue(this->info()->GeneratePreagedPrologue(), ip);
2132 if (descriptor->PushArgumentCount()) {
2133 __ Push(kJavaScriptCallArgCountRegister);
2134 }
2132 } else { 2135 } else {
2133 StackFrame::Type type = info()->GetOutputStackFrameType(); 2136 StackFrame::Type type = info()->GetOutputStackFrameType();
2134 // TODO(mbrandy): Detect cases where ip is the entrypoint (for 2137 // TODO(mbrandy): Detect cases where ip is the entrypoint (for
2135 // efficient intialization of the constant pool pointer register). 2138 // efficient intialization of the constant pool pointer register).
2136 __ StubPrologue(type); 2139 __ StubPrologue(type);
2137 } 2140 }
2138 } 2141 }
2139 2142
2140 int shrink_slots = frame()->GetSpillSlotCount(); 2143 int shrink_slots =
2144 frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize();
2141 if (info()->is_osr()) { 2145 if (info()->is_osr()) {
2142 // TurboFan OSR-compiled functions cannot be entered directly. 2146 // TurboFan OSR-compiled functions cannot be entered directly.
2143 __ Abort(kShouldNotDirectlyEnterOsrFunction); 2147 __ Abort(kShouldNotDirectlyEnterOsrFunction);
2144 2148
2145 // Unoptimized code jumps directly to this entrypoint while the unoptimized 2149 // Unoptimized code jumps directly to this entrypoint while the unoptimized
2146 // frame is still on the stack. Optimized code uses OSR values directly from 2150 // frame is still on the stack. Optimized code uses OSR values directly from
2147 // the unoptimized frame. Thus, all that needs to be done is to allocate the 2151 // the unoptimized frame. Thus, all that needs to be done is to allocate the
2148 // remaining stack slots. 2152 // remaining stack slots.
2149 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); 2153 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
2150 osr_pc_offset_ = __ pc_offset(); 2154 osr_pc_offset_ = __ pc_offset();
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 padding_size -= v8::internal::Assembler::kInstrSize; 2457 padding_size -= v8::internal::Assembler::kInstrSize;
2454 } 2458 }
2455 } 2459 }
2456 } 2460 }
2457 2461
2458 #undef __ 2462 #undef __
2459 2463
2460 } // namespace compiler 2464 } // namespace compiler
2461 } // namespace internal 2465 } // namespace internal
2462 } // namespace v8 2466 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/s390/code-generator-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698