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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 74753006: Fix number of parameters passed into PrepareCallCFunction in code age stubs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/builtins-mips.cc ('k') | no next file » | 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // crawls in MakeCodeYoung. This seems a bit fragile. 597 // crawls in MakeCodeYoung. This seems a bit fragile.
598 598
599 // Re-execute the code that was patched back to the young age when 599 // Re-execute the code that was patched back to the young age when
600 // the stub returns. 600 // the stub returns.
601 __ subq(Operand(rsp, 0), Immediate(5)); 601 __ subq(Operand(rsp, 0), Immediate(5));
602 __ Pushad(); 602 __ Pushad();
603 __ Move(arg_reg_2, ExternalReference::isolate_address(masm->isolate())); 603 __ Move(arg_reg_2, ExternalReference::isolate_address(masm->isolate()));
604 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize)); 604 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize));
605 { // NOLINT 605 { // NOLINT
606 FrameScope scope(masm, StackFrame::MANUAL); 606 FrameScope scope(masm, StackFrame::MANUAL);
607 __ PrepareCallCFunction(1); 607 __ PrepareCallCFunction(2);
608 __ CallCFunction( 608 __ CallCFunction(
609 ExternalReference::get_make_code_young_function(masm->isolate()), 1); 609 ExternalReference::get_make_code_young_function(masm->isolate()), 2);
610 } 610 }
611 __ Popad(); 611 __ Popad();
612 __ ret(0); 612 __ ret(0);
613 } 613 }
614 614
615 615
616 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ 616 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \
617 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ 617 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \
618 MacroAssembler* masm) { \ 618 MacroAssembler* masm) { \
619 GenerateMakeCodeYoungAgainCommon(masm); \ 619 GenerateMakeCodeYoungAgainCommon(masm); \
(...skipping 10 matching lines...) Expand all
630 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact 630 // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact
631 // that make_code_young doesn't do any garbage collection which allows us to 631 // that make_code_young doesn't do any garbage collection which allows us to
632 // save/restore the registers without worrying about which of them contain 632 // save/restore the registers without worrying about which of them contain
633 // pointers. 633 // pointers.
634 __ Pushad(); 634 __ Pushad();
635 __ Move(arg_reg_2, ExternalReference::isolate_address(masm->isolate())); 635 __ Move(arg_reg_2, ExternalReference::isolate_address(masm->isolate()));
636 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize)); 636 __ movq(arg_reg_1, Operand(rsp, kNumSafepointRegisters * kPointerSize));
637 __ subq(arg_reg_1, Immediate(Assembler::kShortCallInstructionLength)); 637 __ subq(arg_reg_1, Immediate(Assembler::kShortCallInstructionLength));
638 { // NOLINT 638 { // NOLINT
639 FrameScope scope(masm, StackFrame::MANUAL); 639 FrameScope scope(masm, StackFrame::MANUAL);
640 __ PrepareCallCFunction(1); 640 __ PrepareCallCFunction(2);
641 __ CallCFunction( 641 __ CallCFunction(
642 ExternalReference::get_mark_code_as_executed_function(masm->isolate()), 642 ExternalReference::get_mark_code_as_executed_function(masm->isolate()),
643 1); 643 2);
644 } 644 }
645 __ Popad(); 645 __ Popad();
646 646
647 // Perform prologue operations usually performed by the young code stub. 647 // Perform prologue operations usually performed by the young code stub.
648 __ PopReturnAddressTo(kScratchRegister); 648 __ PopReturnAddressTo(kScratchRegister);
649 __ push(rbp); // Caller's frame pointer. 649 __ push(rbp); // Caller's frame pointer.
650 __ movq(rbp, rsp); 650 __ movq(rbp, rsp);
651 __ push(rsi); // Callee's context. 651 __ push(rsi); // Callee's context.
652 __ push(rdi); // Callee's JS Function. 652 __ push(rdi); // Callee's JS Function.
653 __ PushReturnAddressFrom(kScratchRegister); 653 __ PushReturnAddressFrom(kScratchRegister);
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 __ bind(&ok); 1436 __ bind(&ok);
1437 __ ret(0); 1437 __ ret(0);
1438 } 1438 }
1439 1439
1440 1440
1441 #undef __ 1441 #undef __
1442 1442
1443 } } // namespace v8::internal 1443 } } // namespace v8::internal
1444 1444
1445 #endif // V8_TARGET_ARCH_X64 1445 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698