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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 9139051: Cosmetic changes ("set up" is a verb, "setup" is a noun). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/simulator-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 void MacroAssembler::LeaveFrame(StackFrame::Type type) { 4272 void MacroAssembler::LeaveFrame(StackFrame::Type type) {
4273 mov(sp, fp); 4273 mov(sp, fp);
4274 lw(fp, MemOperand(sp, 0 * kPointerSize)); 4274 lw(fp, MemOperand(sp, 0 * kPointerSize));
4275 lw(ra, MemOperand(sp, 1 * kPointerSize)); 4275 lw(ra, MemOperand(sp, 1 * kPointerSize));
4276 addiu(sp, sp, 2 * kPointerSize); 4276 addiu(sp, sp, 2 * kPointerSize);
4277 } 4277 }
4278 4278
4279 4279
4280 void MacroAssembler::EnterExitFrame(bool save_doubles, 4280 void MacroAssembler::EnterExitFrame(bool save_doubles,
4281 int stack_space) { 4281 int stack_space) {
4282 // Setup the frame structure on the stack. 4282 // Set up the frame structure on the stack.
4283 STATIC_ASSERT(2 * kPointerSize == ExitFrameConstants::kCallerSPDisplacement); 4283 STATIC_ASSERT(2 * kPointerSize == ExitFrameConstants::kCallerSPDisplacement);
4284 STATIC_ASSERT(1 * kPointerSize == ExitFrameConstants::kCallerPCOffset); 4284 STATIC_ASSERT(1 * kPointerSize == ExitFrameConstants::kCallerPCOffset);
4285 STATIC_ASSERT(0 * kPointerSize == ExitFrameConstants::kCallerFPOffset); 4285 STATIC_ASSERT(0 * kPointerSize == ExitFrameConstants::kCallerFPOffset);
4286 4286
4287 // This is how the stack will look: 4287 // This is how the stack will look:
4288 // fp + 2 (==kCallerSPDisplacement) - old stack's end 4288 // fp + 2 (==kCallerSPDisplacement) - old stack's end
4289 // [fp + 1 (==kCallerPCOffset)] - saved old ra 4289 // [fp + 1 (==kCallerPCOffset)] - saved old ra
4290 // [fp + 0 (==kCallerFPOffset)] - saved old fp 4290 // [fp + 0 (==kCallerFPOffset)] - saved old fp
4291 // [fp - 1 (==kSPOffset)] - sp of the called function 4291 // [fp - 1 (==kSPOffset)] - sp of the called function
4292 // [fp - 2 (==kCodeOffset)] - CodeObject 4292 // [fp - 2 (==kCodeOffset)] - CodeObject
4293 // fp - (2 + stack_space + alignment) == sp == [fp - kSPOffset] - top of the 4293 // fp - (2 + stack_space + alignment) == sp == [fp - kSPOffset] - top of the
4294 // new stack (will contain saved ra) 4294 // new stack (will contain saved ra)
4295 4295
4296 // Save registers. 4296 // Save registers.
4297 addiu(sp, sp, -4 * kPointerSize); 4297 addiu(sp, sp, -4 * kPointerSize);
4298 sw(ra, MemOperand(sp, 3 * kPointerSize)); 4298 sw(ra, MemOperand(sp, 3 * kPointerSize));
4299 sw(fp, MemOperand(sp, 2 * kPointerSize)); 4299 sw(fp, MemOperand(sp, 2 * kPointerSize));
4300 addiu(fp, sp, 2 * kPointerSize); // Setup new frame pointer. 4300 addiu(fp, sp, 2 * kPointerSize); // Set up new frame pointer.
4301 4301
4302 if (emit_debug_code()) { 4302 if (emit_debug_code()) {
4303 sw(zero_reg, MemOperand(fp, ExitFrameConstants::kSPOffset)); 4303 sw(zero_reg, MemOperand(fp, ExitFrameConstants::kSPOffset));
4304 } 4304 }
4305 4305
4306 li(t8, Operand(CodeObject())); // Accessed from ExitFrame::code_slot. 4306 li(t8, Operand(CodeObject())); // Accessed from ExitFrame::code_slot.
4307 sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset)); 4307 sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
4308 4308
4309 // Save the frame pointer and the context in top. 4309 // Save the frame pointer and the context in top.
4310 li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); 4310 li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
5045 opcode == BGTZL); 5045 opcode == BGTZL);
5046 opcode = (cond == eq) ? BEQ : BNE; 5046 opcode = (cond == eq) ? BEQ : BNE;
5047 instr = (instr & ~kOpcodeMask) | opcode; 5047 instr = (instr & ~kOpcodeMask) | opcode;
5048 masm_.emit(instr); 5048 masm_.emit(instr);
5049 } 5049 }
5050 5050
5051 5051
5052 } } // namespace v8::internal 5052 } } // namespace v8::internal
5053 5053
5054 #endif // V8_TARGET_ARCH_MIPS 5054 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698