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

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

Issue 77763006: MIPS: Replace hard-coded stack frame size literals with StandardFrameConstants::kFixedFrameSizeFrom… (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 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 | « src/mips/frames-mips.h ('k') | src/mips/macro-assembler-mips.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 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 code->instr()->Mnemonic()); 250 code->instr()->Mnemonic());
251 __ bind(code->entry()); 251 __ bind(code->entry());
252 if (NeedsDeferredFrame()) { 252 if (NeedsDeferredFrame()) {
253 Comment(";;; Build frame"); 253 Comment(";;; Build frame");
254 ASSERT(!frame_is_built_); 254 ASSERT(!frame_is_built_);
255 ASSERT(info()->IsStub()); 255 ASSERT(info()->IsStub());
256 frame_is_built_ = true; 256 frame_is_built_ = true;
257 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); 257 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
258 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); 258 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
259 __ push(scratch0()); 259 __ push(scratch0());
260 __ Addu(fp, sp, Operand(2 * kPointerSize)); 260 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
261 Comment(";;; Deferred code"); 261 Comment(";;; Deferred code");
262 } 262 }
263 code->Generate(); 263 code->Generate();
264 if (NeedsDeferredFrame()) { 264 if (NeedsDeferredFrame()) {
265 Comment(";;; Destroy frame"); 265 Comment(";;; Destroy frame");
266 ASSERT(frame_is_built_); 266 ASSERT(frame_is_built_);
267 __ pop(at); 267 __ pop(at);
268 __ MultiPop(cp.bit() | fp.bit() | ra.bit()); 268 __ MultiPop(cp.bit() | fp.bit() | ra.bit());
269 frame_is_built_ = false; 269 frame_is_built_ = false;
270 } 270 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 __ Branch(&needs_frame); 302 __ Branch(&needs_frame);
303 } else { 303 } else {
304 __ bind(&needs_frame); 304 __ bind(&needs_frame);
305 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); 305 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
306 // This variant of deopt can only be used with stubs. Since we don't 306 // This variant of deopt can only be used with stubs. Since we don't
307 // have a function pointer to install in the stack frame that we're 307 // have a function pointer to install in the stack frame that we're
308 // building, install a special marker there instead. 308 // building, install a special marker there instead.
309 ASSERT(info()->IsStub()); 309 ASSERT(info()->IsStub());
310 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); 310 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
311 __ push(scratch0()); 311 __ push(scratch0());
312 __ Addu(fp, sp, Operand(2 * kPointerSize)); 312 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
313 __ Call(t9); 313 __ Call(t9);
314 } 314 }
315 } else { 315 } else {
316 __ Call(t9); 316 __ Call(t9);
317 } 317 }
318 } 318 }
319 __ RecordComment("]"); 319 __ RecordComment("]");
320 320
321 // The deoptimization jump table is the last part of the instruction 321 // The deoptimization jump table is the last part of the instruction
322 // sequence. Mark the generated code as done unless we bailed out. 322 // sequence. Mark the generated code as done unless we bailed out.
(...skipping 5562 matching lines...) Expand 10 before | Expand all | Expand 10 after
5885 __ Subu(scratch, result, scratch); 5885 __ Subu(scratch, result, scratch);
5886 __ lw(result, FieldMemOperand(scratch, 5886 __ lw(result, FieldMemOperand(scratch,
5887 FixedArray::kHeaderSize - kPointerSize)); 5887 FixedArray::kHeaderSize - kPointerSize));
5888 __ bind(&done); 5888 __ bind(&done);
5889 } 5889 }
5890 5890
5891 5891
5892 #undef __ 5892 #undef __
5893 5893
5894 } } // namespace v8::internal 5894 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/frames-mips.h ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698