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

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

Issue 60763006: Replace hard-coded stack frame size literals with StandardFrameConstants::kFixedFrameSizeFromFp (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix merge error 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/frames-arm.h ('k') | src/arm/macro-assembler-arm.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 code->instr()->Mnemonic()); 253 code->instr()->Mnemonic());
254 __ bind(code->entry()); 254 __ bind(code->entry());
255 if (NeedsDeferredFrame()) { 255 if (NeedsDeferredFrame()) {
256 Comment(";;; Build frame"); 256 Comment(";;; Build frame");
257 ASSERT(!frame_is_built_); 257 ASSERT(!frame_is_built_);
258 ASSERT(info()->IsStub()); 258 ASSERT(info()->IsStub());
259 frame_is_built_ = true; 259 frame_is_built_ = true;
260 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); 260 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
261 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); 261 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
262 __ push(scratch0()); 262 __ push(scratch0());
263 __ add(fp, sp, Operand(2 * kPointerSize)); 263 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
264 Comment(";;; Deferred code"); 264 Comment(";;; Deferred code");
265 } 265 }
266 code->Generate(); 266 code->Generate();
267 if (NeedsDeferredFrame()) { 267 if (NeedsDeferredFrame()) {
268 Comment(";;; Destroy frame"); 268 Comment(";;; Destroy frame");
269 ASSERT(frame_is_built_); 269 ASSERT(frame_is_built_);
270 __ pop(ip); 270 __ pop(ip);
271 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit()); 271 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit());
272 frame_is_built_ = false; 272 frame_is_built_ = false;
273 } 273 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 __ b(&needs_frame); 318 __ b(&needs_frame);
319 } else { 319 } else {
320 __ bind(&needs_frame); 320 __ bind(&needs_frame);
321 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); 321 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
322 // This variant of deopt can only be used with stubs. Since we don't 322 // This variant of deopt can only be used with stubs. Since we don't
323 // have a function pointer to install in the stack frame that we're 323 // have a function pointer to install in the stack frame that we're
324 // building, install a special marker there instead. 324 // building, install a special marker there instead.
325 ASSERT(info()->IsStub()); 325 ASSERT(info()->IsStub());
326 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); 326 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
327 __ push(scratch0()); 327 __ push(scratch0());
328 __ add(fp, sp, Operand(2 * kPointerSize)); 328 __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
329 __ mov(lr, Operand(pc), LeaveCC, al); 329 __ mov(lr, Operand(pc), LeaveCC, al);
330 __ mov(pc, ip); 330 __ mov(pc, ip);
331 } 331 }
332 } else { 332 } else {
333 __ mov(lr, Operand(pc), LeaveCC, al); 333 __ mov(lr, Operand(pc), LeaveCC, al);
334 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); 334 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry)));
335 } 335 }
336 masm()->CheckConstPool(false, false); 336 masm()->CheckConstPool(false, false);
337 } 337 }
338 338
(...skipping 5598 matching lines...) Expand 10 before | Expand all | Expand 10 after
5937 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5937 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5938 __ ldr(result, FieldMemOperand(scratch, 5938 __ ldr(result, FieldMemOperand(scratch,
5939 FixedArray::kHeaderSize - kPointerSize)); 5939 FixedArray::kHeaderSize - kPointerSize));
5940 __ bind(&done); 5940 __ bind(&done);
5941 } 5941 }
5942 5942
5943 5943
5944 #undef __ 5944 #undef __
5945 5945
5946 } } // namespace v8::internal 5946 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/frames-arm.h ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698