Chromium Code Reviews| Index: src/x64/builtins-x64.cc |
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
| index ed0ec684fc138fa63569d8519b1736a0810cb5c4..ccf4adff42c1f56b120d4e5818d6768ef551a618 100644 |
| --- a/src/x64/builtins-x64.cc |
| +++ b/src/x64/builtins-x64.cc |
| @@ -646,31 +646,57 @@ CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
| #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
| +void Builtins::Generate_NotifyICMiss(MacroAssembler* masm) { |
| + // Enter an internal frame. |
| + { |
| + FrameScope scope(masm, StackFrame::INTERNAL); |
| + |
| + // Preserve registers across notification this is important compiled stubs |
|
Jakob Kummerow
2012/11/28 16:28:22
nit: missing comma after "notification", important
danno
2012/11/30 16:23:24
Done.
|
| + // that tail call the runtime on deopts passing their parameters in |
| + // registers. |
| + __ Pushad(); |
| + __ CallRuntime(Runtime::kNotifyICMiss, 0); |
| + __ Popad(); |
| + // Tear down internal frame. |
| + } |
| + |
| + __ pop(MemOperand(rsp, 0)); // Ignore state offset |
| + __ ret(0); // Return to IC Miss stub, continuation still on stack. |
| +} |
| + |
| + |
| static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| Deoptimizer::BailoutType type) { |
| // Enter an internal frame. |
| { |
| FrameScope scope(masm, StackFrame::INTERNAL); |
| + // Preserve registers across notification, this is important compiled stubs |
|
Jakob Kummerow
2012/11/28 16:28:22
nit: important *for* compiled stubs
danno
2012/11/30 16:23:24
Done.
|
| + // that tail call the runtime on deopts passing their parameters in |
| + // registers. |
| + __ Pushad(); |
|
Jakob Kummerow
2012/11/28 16:28:22
Why do the other platforms (both ia32 and ARM) not
danno
2012/11/30 16:23:24
This is a cut/paste problem. Removed.
On 2012/11/2
|
| + |
| // Pass the deoptimization type to the runtime system. |
| __ Push(Smi::FromInt(static_cast<int>(type))); |
| __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| + |
| + __ Popad(); |
| // Tear down internal frame. |
| } |
| // Get the full codegen state from the stack and untag it. |
| - __ SmiToInteger32(rcx, Operand(rsp, 1 * kPointerSize)); |
| + __ SmiToInteger32(r10, Operand(rsp, 1 * kPointerSize)); |
| // Switch on the state. |
| Label not_no_registers, not_tos_rax; |
| - __ cmpq(rcx, Immediate(FullCodeGenerator::NO_REGISTERS)); |
| + __ cmpq(r10, Immediate(FullCodeGenerator::NO_REGISTERS)); |
| __ j(not_equal, ¬_no_registers, Label::kNear); |
| __ ret(1 * kPointerSize); // Remove state. |
| __ bind(¬_no_registers); |
| __ movq(rax, Operand(rsp, 2 * kPointerSize)); |
| - __ cmpq(rcx, Immediate(FullCodeGenerator::TOS_REG)); |
| + __ cmpq(r10, Immediate(FullCodeGenerator::TOS_REG)); |
| __ j(not_equal, ¬_tos_rax, Label::kNear); |
| __ ret(2 * kPointerSize); // Remove state, rax. |