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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 14253015: Skip samples where top function's stack frame is not setup properly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Supported other archs Created 7 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // The following three instructions must remain together and unmodified 166 // The following three instructions must remain together and unmodified
167 // for code aging to work properly. 167 // for code aging to work properly.
168 __ Push(ra, fp, cp, a1); 168 __ Push(ra, fp, cp, a1);
169 // Add unused load of ip to ensure prologue sequence is identical for 169 // Add unused load of ip to ensure prologue sequence is identical for
170 // full-codegen and lithium-codegen. 170 // full-codegen and lithium-codegen.
171 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 171 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
172 // Adj. FP to point to saved FP. 172 // Adj. FP to point to saved FP.
173 __ Addu(fp, sp, Operand(2 * kPointerSize)); 173 __ Addu(fp, sp, Operand(2 * kPointerSize));
174 } 174 }
175 frame_is_built_ = true; 175 frame_is_built_ = true;
176 info_->AddNoFrameRange(0, masm_->pc_offset());
176 } 177 }
177 178
178 // Reserve space for the stack slots needed by the code. 179 // Reserve space for the stack slots needed by the code.
179 int slots = GetStackSlotCount(); 180 int slots = GetStackSlotCount();
180 if (slots > 0) { 181 if (slots > 0) {
181 if (FLAG_debug_code) { 182 if (FLAG_debug_code) {
182 __ Subu(sp, sp, Operand(slots * kPointerSize)); 183 __ Subu(sp, sp, Operand(slots * kPointerSize));
183 __ push(a0); 184 __ push(a0);
184 __ push(a1); 185 __ push(a1);
185 __ Addu(a0, sp, Operand(slots * kPointerSize)); 186 __ Addu(a0, sp, Operand(slots * kPointerSize));
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 BitVector* doubles = chunk()->allocated_double_registers(); 2541 BitVector* doubles = chunk()->allocated_double_registers();
2541 BitVector::Iterator save_iterator(doubles); 2542 BitVector::Iterator save_iterator(doubles);
2542 int count = 0; 2543 int count = 0;
2543 while (!save_iterator.Done()) { 2544 while (!save_iterator.Done()) {
2544 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), 2545 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()),
2545 MemOperand(sp, count * kDoubleSize)); 2546 MemOperand(sp, count * kDoubleSize));
2546 save_iterator.Advance(); 2547 save_iterator.Advance();
2547 count++; 2548 count++;
2548 } 2549 }
2549 } 2550 }
2551 int no_frame_start = -1;
2550 if (NeedsEagerFrame()) { 2552 if (NeedsEagerFrame()) {
2551 __ mov(sp, fp); 2553 __ mov(sp, fp);
2552 __ Pop(ra, fp); 2554 __ Pop(ra, fp);
2555 no_frame_start = masm_->pc_offset();
2553 } 2556 }
2554 if (instr->has_constant_parameter_count()) { 2557 if (instr->has_constant_parameter_count()) {
2555 int parameter_count = ToInteger32(instr->constant_parameter_count()); 2558 int parameter_count = ToInteger32(instr->constant_parameter_count());
2556 int32_t sp_delta = (parameter_count + 1) * kPointerSize; 2559 int32_t sp_delta = (parameter_count + 1) * kPointerSize;
2557 if (sp_delta != 0) { 2560 if (sp_delta != 0) {
2558 __ Addu(sp, sp, Operand(sp_delta)); 2561 __ Addu(sp, sp, Operand(sp_delta));
2559 } 2562 }
2560 } else { 2563 } else {
2561 Register reg = ToRegister(instr->parameter_count()); 2564 Register reg = ToRegister(instr->parameter_count());
2562 // The argument count parameter is a smi 2565 // The argument count parameter is a smi
2563 __ SmiUntag(reg); 2566 __ SmiUntag(reg);
2564 __ sll(at, reg, kPointerSizeLog2); 2567 __ sll(at, reg, kPointerSizeLog2);
2565 __ Addu(sp, sp, at); 2568 __ Addu(sp, sp, at);
2566 } 2569 }
2567 2570
2568 __ Jump(ra); 2571 __ Jump(ra);
2572
2573 if (no_frame_start != -1) {
2574 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2575 }
2569 } 2576 }
2570 2577
2571 2578
2572 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { 2579 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2573 Register result = ToRegister(instr->result()); 2580 Register result = ToRegister(instr->result());
2574 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2581 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell())));
2575 __ lw(result, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); 2582 __ lw(result, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset));
2576 if (instr->hydrogen()->RequiresHoleCheck()) { 2583 if (instr->hydrogen()->RequiresHoleCheck()) {
2577 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2584 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2578 DeoptimizeIf(eq, instr->environment(), result, Operand(at)); 2585 DeoptimizeIf(eq, instr->environment(), result, Operand(at));
(...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after
5785 __ Subu(scratch, result, scratch); 5792 __ Subu(scratch, result, scratch);
5786 __ lw(result, FieldMemOperand(scratch, 5793 __ lw(result, FieldMemOperand(scratch,
5787 FixedArray::kHeaderSize - kPointerSize)); 5794 FixedArray::kHeaderSize - kPointerSize));
5788 __ bind(&done); 5795 __ bind(&done);
5789 } 5796 }
5790 5797
5791 5798
5792 #undef __ 5799 #undef __
5793 5800
5794 } } // namespace v8::internal 5801 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698