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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 2709483007: PPC/s390: [everywhere] Custom representation for frame type (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.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 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ";;; <@%d,#%d> " 268 ";;; <@%d,#%d> "
269 "-------------------- Deferred %s --------------------", 269 "-------------------- Deferred %s --------------------",
270 code->instruction_index(), code->instr()->hydrogen_value()->id(), 270 code->instruction_index(), code->instr()->hydrogen_value()->id(),
271 code->instr()->Mnemonic()); 271 code->instr()->Mnemonic());
272 __ bind(code->entry()); 272 __ bind(code->entry());
273 if (NeedsDeferredFrame()) { 273 if (NeedsDeferredFrame()) {
274 Comment(";;; Build frame"); 274 Comment(";;; Build frame");
275 DCHECK(!frame_is_built_); 275 DCHECK(!frame_is_built_);
276 DCHECK(info()->IsStub()); 276 DCHECK(info()->IsStub());
277 frame_is_built_ = true; 277 frame_is_built_ = true;
278 __ LoadSmiLiteral(scratch0(), Smi::FromInt(StackFrame::STUB)); 278 __ Load(scratch0(),
279 Operand(StackFrame::TypeToMarker(StackFrame::STUB)));
279 __ PushCommonFrame(scratch0()); 280 __ PushCommonFrame(scratch0());
280 Comment(";;; Deferred code"); 281 Comment(";;; Deferred code");
281 } 282 }
282 code->Generate(); 283 code->Generate();
283 if (NeedsDeferredFrame()) { 284 if (NeedsDeferredFrame()) {
284 Comment(";;; Destroy frame"); 285 Comment(";;; Destroy frame");
285 DCHECK(frame_is_built_); 286 DCHECK(frame_is_built_);
286 __ PopCommonFrame(scratch0()); 287 __ PopCommonFrame(scratch0());
287 frame_is_built_ = false; 288 frame_is_built_ = false;
288 } 289 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 __ b(r14, &call_deopt_entry); 338 __ b(r14, &call_deopt_entry);
338 } 339 }
339 } 340 }
340 341
341 if (needs_frame.is_linked()) { 342 if (needs_frame.is_linked()) {
342 __ bind(&needs_frame); 343 __ bind(&needs_frame);
343 // This variant of deopt can only be used with stubs. Since we don't 344 // This variant of deopt can only be used with stubs. Since we don't
344 // have a function pointer to install in the stack frame that we're 345 // have a function pointer to install in the stack frame that we're
345 // building, install a special marker there instead. 346 // building, install a special marker there instead.
346 DCHECK(info()->IsStub()); 347 DCHECK(info()->IsStub());
347 __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB)); 348 __ Load(ip, Operand(StackFrame::TypeToMarker(StackFrame::STUB)));
348 __ push(ip); 349 __ push(ip);
349 DCHECK(info()->IsStub()); 350 DCHECK(info()->IsStub());
350 } 351 }
351 352
352 Comment(";;; call deopt"); 353 Comment(";;; call deopt");
353 __ bind(&call_deopt_entry); 354 __ bind(&call_deopt_entry);
354 355
355 if (info()->saves_caller_doubles()) { 356 if (info()->saves_caller_doubles()) {
356 DCHECK(info()->IsStub()); 357 DCHECK(info()->IsStub());
357 RestoreCallerDoubles(); 358 RestoreCallerDoubles();
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 3089
3089 if (instr->hydrogen()->from_inlined()) { 3090 if (instr->hydrogen()->from_inlined()) {
3090 __ lay(result, MemOperand(sp, -2 * kPointerSize)); 3091 __ lay(result, MemOperand(sp, -2 * kPointerSize));
3091 } else if (instr->hydrogen()->arguments_adaptor()) { 3092 } else if (instr->hydrogen()->arguments_adaptor()) {
3092 // Check if the calling frame is an arguments adaptor frame. 3093 // Check if the calling frame is an arguments adaptor frame.
3093 Label done, adapted; 3094 Label done, adapted;
3094 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3095 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3095 __ LoadP( 3096 __ LoadP(
3096 result, 3097 result,
3097 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); 3098 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset));
3098 __ LoadSmiLiteral(r0, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 3099 __ CmpP(result,
3099 __ CmpP(result, r0); 3100 Operand(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR)));
3100 3101
3101 // Result is the frame pointer for the frame if not adapted and for the real 3102 // Result is the frame pointer for the frame if not adapted and for the real
3102 // frame below the adaptor frame if adapted. 3103 // frame below the adaptor frame if adapted.
3103 __ beq(&adapted, Label::kNear); 3104 __ beq(&adapted, Label::kNear);
3104 __ LoadRR(result, fp); 3105 __ LoadRR(result, fp);
3105 __ b(&done, Label::kNear); 3106 __ b(&done, Label::kNear);
3106 3107
3107 __ bind(&adapted); 3108 __ bind(&adapted);
3108 __ LoadRR(result, scratch); 3109 __ LoadRR(result, scratch);
3109 __ bind(&done); 3110 __ bind(&done);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
3666 Comment(";;; PrepareForTailCall, actual: %d {", actual.immediate()); 3667 Comment(";;; PrepareForTailCall, actual: %d {", actual.immediate());
3667 } 3668 }
3668 } 3669 }
3669 3670
3670 // Check if next frame is an arguments adaptor frame. 3671 // Check if next frame is an arguments adaptor frame.
3671 Register caller_args_count_reg = scratch1; 3672 Register caller_args_count_reg = scratch1;
3672 Label no_arguments_adaptor, formal_parameter_count_loaded; 3673 Label no_arguments_adaptor, formal_parameter_count_loaded;
3673 __ LoadP(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3674 __ LoadP(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3674 __ LoadP(scratch3, 3675 __ LoadP(scratch3,
3675 MemOperand(scratch2, StandardFrameConstants::kContextOffset)); 3676 MemOperand(scratch2, StandardFrameConstants::kContextOffset));
3676 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 3677 __ CmpP(scratch3,
3678 Operand(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR)));
3677 __ bne(&no_arguments_adaptor); 3679 __ bne(&no_arguments_adaptor);
3678 3680
3679 // Drop current frame and load arguments count from arguments adaptor frame. 3681 // Drop current frame and load arguments count from arguments adaptor frame.
3680 __ LoadRR(fp, scratch2); 3682 __ LoadRR(fp, scratch2);
3681 __ LoadP(caller_args_count_reg, 3683 __ LoadP(caller_args_count_reg,
3682 MemOperand(fp, ArgumentsAdaptorFrameConstants::kLengthOffset)); 3684 MemOperand(fp, ArgumentsAdaptorFrameConstants::kLengthOffset));
3683 __ SmiUntag(caller_args_count_reg); 3685 __ SmiUntag(caller_args_count_reg);
3684 __ b(&formal_parameter_count_loaded); 3686 __ b(&formal_parameter_count_loaded);
3685 3687
3686 __ bind(&no_arguments_adaptor); 3688 __ bind(&no_arguments_adaptor);
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
5606 __ LoadP(result, 5608 __ LoadP(result,
5607 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5609 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5608 __ bind(deferred->exit()); 5610 __ bind(deferred->exit());
5609 __ bind(&done); 5611 __ bind(&done);
5610 } 5612 }
5611 5613
5612 #undef __ 5614 #undef __
5613 5615
5614 } // namespace internal 5616 } // namespace internal
5615 } // namespace v8 5617 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698