| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 // worrying about which of them contain pointers. We also don't build an | 796 // worrying about which of them contain pointers. We also don't build an |
| 797 // internal frame to make the code faster, since we shouldn't have to do stack | 797 // internal frame to make the code faster, since we shouldn't have to do stack |
| 798 // crawls in MakeCodeYoung. This seems a bit fragile. | 798 // crawls in MakeCodeYoung. This seems a bit fragile. |
| 799 | 799 |
| 800 // The following registers must be saved and restored when calling through to | 800 // The following registers must be saved and restored when calling through to |
| 801 // the runtime: | 801 // the runtime: |
| 802 // r0 - contains return address (beginning of patch sequence) | 802 // r0 - contains return address (beginning of patch sequence) |
| 803 // r1 - isolate | 803 // r1 - isolate |
| 804 FrameScope scope(masm, StackFrame::MANUAL); | 804 FrameScope scope(masm, StackFrame::MANUAL); |
| 805 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 805 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
| 806 __ PrepareCallCFunction(1, 0, r2); | 806 __ PrepareCallCFunction(2, 0, r2); |
| 807 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate()))); | 807 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate()))); |
| 808 __ CallCFunction( | 808 __ CallCFunction( |
| 809 ExternalReference::get_make_code_young_function(masm->isolate()), 2); | 809 ExternalReference::get_make_code_young_function(masm->isolate()), 2); |
| 810 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 810 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
| 811 __ mov(pc, r0); | 811 __ mov(pc, r0); |
| 812 } | 812 } |
| 813 | 813 |
| 814 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 814 #define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
| 815 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ | 815 void Builtins::Generate_Make##C##CodeYoungAgainEvenMarking( \ |
| 816 MacroAssembler* masm) { \ | 816 MacroAssembler* masm) { \ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 829 // that make_code_young doesn't do any garbage collection which allows us to | 829 // that make_code_young doesn't do any garbage collection which allows us to |
| 830 // save/restore the registers without worrying about which of them contain | 830 // save/restore the registers without worrying about which of them contain |
| 831 // pointers. | 831 // pointers. |
| 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 // r0 - contains return address (beginning of patch sequence) | 835 // r0 - contains return address (beginning of patch sequence) |
| 836 // r1 - isolate | 836 // r1 - isolate |
| 837 FrameScope scope(masm, StackFrame::MANUAL); | 837 FrameScope scope(masm, StackFrame::MANUAL); |
| 838 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 838 __ stm(db_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
| 839 __ PrepareCallCFunction(1, 0, r2); | 839 __ PrepareCallCFunction(2, 0, r2); |
| 840 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate()))); | 840 __ mov(r1, Operand(ExternalReference::isolate_address(masm->isolate()))); |
| 841 __ CallCFunction(ExternalReference::get_mark_code_as_executed_function( | 841 __ CallCFunction(ExternalReference::get_mark_code_as_executed_function( |
| 842 masm->isolate()), 2); | 842 masm->isolate()), 2); |
| 843 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); | 843 __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
| 844 | 844 |
| 845 // Perform prologue operations usually performed by the young code stub. | 845 // Perform prologue operations usually performed by the young code stub. |
| 846 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 846 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| 847 __ add(fp, sp, Operand(2 * kPointerSize)); | 847 __ add(fp, sp, Operand(2 * kPointerSize)); |
| 848 | 848 |
| 849 // Jump to point after the code-age stub. | 849 // Jump to point after the code-age stub. |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 __ bind(&dont_adapt_arguments); | 1465 __ bind(&dont_adapt_arguments); |
| 1466 __ Jump(r3); | 1466 __ Jump(r3); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 | 1469 |
| 1470 #undef __ | 1470 #undef __ |
| 1471 | 1471 |
| 1472 } } // namespace v8::internal | 1472 } } // namespace v8::internal |
| 1473 | 1473 |
| 1474 #endif // V8_TARGET_ARCH_ARM | 1474 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |