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

Side by Side Diff: src/ia32/deoptimizer-ia32.cc

Issue 6368013: Port changes from x64 deoptimizer to ia32 and remove commented out code from ... (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 | « no previous file | src/x64/deoptimizer-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 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. 527 __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id.
528 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. 528 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0.
529 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. 529 __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta.
530 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5); 530 __ CallCFunction(ExternalReference::new_deoptimizer_function(), 5);
531 531
532 // Preserve deoptimizer object in register eax and get the input 532 // Preserve deoptimizer object in register eax and get the input
533 // frame descriptor pointer. 533 // frame descriptor pointer.
534 __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); 534 __ mov(ebx, Operand(eax, Deoptimizer::input_offset()));
535 535
536 // Fill in the input registers. 536 // Fill in the input registers.
537 for (int i = 0; i < kNumberOfRegisters; i++) { 537 for (int i = kNumberOfRegisters -1; i >= 0; i--) {
Kevin Millikin (Chromium) 2011/01/25 08:54:35 Space needed in "-1".
Rico 2011/01/25 08:58:59 Done.
538 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 538 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
539 __ mov(ecx, Operand(esp, (kNumberOfRegisters - 1 - i) * kPointerSize)); 539 __ pop(Operand(ebx, offset));
540 __ mov(Operand(ebx, offset), ecx);
541 } 540 }
542 541
543 // Fill in the double input registers. 542 // Fill in the double input registers.
544 int double_regs_offset = FrameDescription::double_registers_offset(); 543 int double_regs_offset = FrameDescription::double_registers_offset();
545 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { 544 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) {
546 int dst_offset = i * kDoubleSize + double_regs_offset; 545 int dst_offset = i * kDoubleSize + double_regs_offset;
547 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; 546 int src_offset = i * kDoubleSize;
548 __ movdbl(xmm0, Operand(esp, src_offset)); 547 __ movdbl(xmm0, Operand(esp, src_offset));
549 __ movdbl(Operand(ebx, dst_offset), xmm0); 548 __ movdbl(Operand(ebx, dst_offset), xmm0);
550 } 549 }
551 550
552 // Remove the bailout id and the general purpose registers from the stack. 551 // Remove the bailout id and the double registers from the stack.
553 if (type() == EAGER) { 552 if (type() == EAGER) {
554 __ add(Operand(esp), Immediate(kSavedRegistersAreaSize + kPointerSize)); 553 __ add(Operand(esp), Immediate(kDoubleRegsSize + kPointerSize));
555 } else { 554 } else {
556 __ add(Operand(esp), Immediate(kSavedRegistersAreaSize + 2 * kPointerSize)); 555 __ add(Operand(esp), Immediate(kDoubleRegsSize + 2 * kPointerSize));
557 } 556 }
558 557
559 // Compute a pointer to the unwinding limit in register ecx; that is 558 // Compute a pointer to the unwinding limit in register ecx; that is
560 // the first stack slot not part of the input frame. 559 // the first stack slot not part of the input frame.
561 __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset())); 560 __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset()));
562 __ add(ecx, Operand(esp)); 561 __ add(ecx, Operand(esp));
563 562
564 // Unwind the stack down to - but not including - the unwinding 563 // Unwind the stack down to - but not including - the unwinding
565 // limit and copy the contents of the activation frame to the input 564 // limit and copy the contents of the activation frame to the input
566 // frame description. 565 // frame description.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } 641 }
643 __ bind(&done); 642 __ bind(&done);
644 } 643 }
645 644
646 #undef __ 645 #undef __
647 646
648 647
649 } } // namespace v8::internal 648 } } // namespace v8::internal
650 649
651 #endif // V8_TARGET_ARCH_IA32 650 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698