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

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

Issue 6247019: Change ARM exit frame layout and alingment handling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 mov(Operand::StaticVariable(context_address), esi); 332 mov(Operand::StaticVariable(context_address), esi);
333 } 333 }
334 334
335 335
336 void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { 336 void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) {
337 // Optionally save all XMM registers. 337 // Optionally save all XMM registers.
338 if (save_doubles) { 338 if (save_doubles) {
339 CpuFeatures::Scope scope(SSE2); 339 CpuFeatures::Scope scope(SSE2);
340 int space = XMMRegister::kNumRegisters * kDoubleSize + argc * kPointerSize; 340 int space = XMMRegister::kNumRegisters * kDoubleSize + argc * kPointerSize;
341 sub(Operand(esp), Immediate(space)); 341 sub(Operand(esp), Immediate(space));
342 int offset = -2 * kPointerSize; 342 const int offset = -2 * kPointerSize;
343 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { 343 for (int i = 0; i < XMMRegister::kNumRegisters; i++) {
344 XMMRegister reg = XMMRegister::from_code(i); 344 XMMRegister reg = XMMRegister::from_code(i);
345 movdbl(Operand(ebp, offset - ((i + 1) * kDoubleSize)), reg); 345 movdbl(Operand(ebp, offset - ((i + 1) * kDoubleSize)), reg);
346 } 346 }
347 } else { 347 } else {
348 sub(Operand(esp), Immediate(argc * kPointerSize)); 348 sub(Operand(esp), Immediate(argc * kPointerSize));
349 } 349 }
350 350
351 // Get the required frame alignment for the OS. 351 // Get the required frame alignment for the OS.
352 static const int kFrameAlignment = OS::ActivationFrameAlignment(); 352 static const int kFrameAlignment = OS::ActivationFrameAlignment();
(...skipping 22 matching lines...) Expand all
375 void MacroAssembler::EnterApiExitFrame(int argc) { 375 void MacroAssembler::EnterApiExitFrame(int argc) {
376 EnterExitFramePrologue(); 376 EnterExitFramePrologue();
377 EnterExitFrameEpilogue(argc, false); 377 EnterExitFrameEpilogue(argc, false);
378 } 378 }
379 379
380 380
381 void MacroAssembler::LeaveExitFrame(bool save_doubles) { 381 void MacroAssembler::LeaveExitFrame(bool save_doubles) {
382 // Optionally restore all XMM registers. 382 // Optionally restore all XMM registers.
383 if (save_doubles) { 383 if (save_doubles) {
384 CpuFeatures::Scope scope(SSE2); 384 CpuFeatures::Scope scope(SSE2);
385 int offset = -2 * kPointerSize; 385 const int offset = -2 * kPointerSize;
386 for (int i = 0; i < XMMRegister::kNumRegisters; i++) { 386 for (int i = 0; i < XMMRegister::kNumRegisters; i++) {
387 XMMRegister reg = XMMRegister::from_code(i); 387 XMMRegister reg = XMMRegister::from_code(i);
388 movdbl(reg, Operand(ebp, offset - ((i + 1) * kDoubleSize))); 388 movdbl(reg, Operand(ebp, offset - ((i + 1) * kDoubleSize)));
389 } 389 }
390 } 390 }
391 391
392 // Get the return address from the stack and restore the frame pointer. 392 // Get the return address from the stack and restore the frame pointer.
393 mov(ecx, Operand(ebp, 1 * kPointerSize)); 393 mov(ecx, Operand(ebp, 1 * kPointerSize));
394 mov(ebp, Operand(ebp, 0 * kPointerSize)); 394 mov(ebp, Operand(ebp, 0 * kPointerSize));
395 395
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 1889
1890 // Check that the code was patched as expected. 1890 // Check that the code was patched as expected.
1891 ASSERT(masm_.pc_ == address_ + size_); 1891 ASSERT(masm_.pc_ == address_ + size_);
1892 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1892 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1893 } 1893 }
1894 1894
1895 1895
1896 } } // namespace v8::internal 1896 } } // namespace v8::internal
1897 1897
1898 #endif // V8_TARGET_ARCH_IA32 1898 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698