OLD | NEW |
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 __ mov(a0, ra); | 826 __ mov(a0, ra); |
827 // Adjust a0 to point to the head of the PlatformCodeAge sequence | 827 // Adjust a0 to point to the head of the PlatformCodeAge sequence |
828 __ Subu(a0, a0, | 828 __ Subu(a0, a0, |
829 Operand((kNoCodeAgeSequenceLength - 1) * Assembler::kInstrSize)); | 829 Operand((kNoCodeAgeSequenceLength - 1) * Assembler::kInstrSize)); |
830 // Restore the original return address of the function | 830 // Restore the original return address of the function |
831 __ mov(ra, at); | 831 __ mov(ra, at); |
832 | 832 |
833 // The following registers must be saved and restored when calling through to | 833 // The following registers must be saved and restored when calling through to |
834 // the runtime: | 834 // the runtime: |
835 // a0 - contains return address (beginning of patch sequence) | 835 // a0 - contains return address (beginning of patch sequence) |
836 // a1 - function object | 836 // a1 - isolate |
837 RegList saved_regs = | 837 RegList saved_regs = |
838 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit(); | 838 (a0.bit() | a1.bit() | ra.bit() | fp.bit()) & ~sp.bit(); |
839 FrameScope scope(masm, StackFrame::MANUAL); | 839 FrameScope scope(masm, StackFrame::MANUAL); |
840 __ MultiPush(saved_regs); | 840 __ MultiPush(saved_regs); |
841 __ PrepareCallCFunction(1, 0, a1); | 841 __ PrepareCallCFunction(1, 0, a2); |
| 842 __ li(a1, Operand(ExternalReference::isolate_address(masm->isolate()))); |
842 __ CallCFunction( | 843 __ CallCFunction( |
843 ExternalReference::get_make_code_young_function(masm->isolate()), 1); | 844 ExternalReference::get_make_code_young_function(masm->isolate()), 2); |
844 __ MultiPop(saved_regs); | 845 __ MultiPop(saved_regs); |
845 __ Jump(a0); | 846 __ Jump(a0); |
846 } | 847 } |
847 | 848 |
848 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 849 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
849 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ | 850 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ |
850 MacroAssembler* masm) { \ | 851 MacroAssembler* masm) { \ |
851 GenerateMakeCodeYoungAgainCommon(masm); \ | 852 GenerateMakeCodeYoungAgainCommon(masm); \ |
852 } \ | 853 } \ |
853 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 854 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 __ bind(&dont_adapt_arguments); | 1476 __ bind(&dont_adapt_arguments); |
1476 __ Jump(a3); | 1477 __ Jump(a3); |
1477 } | 1478 } |
1478 | 1479 |
1479 | 1480 |
1480 #undef __ | 1481 #undef __ |
1481 | 1482 |
1482 } } // namespace v8::internal | 1483 } } // namespace v8::internal |
1483 | 1484 |
1484 #endif // V8_TARGET_ARCH_MIPS | 1485 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |