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 4933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4944 } | 4944 } |
4945 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 4945 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
4946 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 4946 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
4947 __ add(sp, sp, r1); | 4947 __ add(sp, sp, r1); |
4948 __ Ret(); | 4948 __ Ret(); |
4949 } | 4949 } |
4950 | 4950 |
4951 | 4951 |
4952 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 4952 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
4953 if (masm->isolate()->function_entry_hook() != NULL) { | 4953 if (masm->isolate()->function_entry_hook() != NULL) { |
4954 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); | |
4955 ProfileEntryHookStub stub; | 4954 ProfileEntryHookStub stub; |
| 4955 int code_size = masm->CallStubSize(&stub) + 2 * Assembler::kInstrSize; |
| 4956 PredictableCodeSizeScope predictable(masm, code_size); |
4956 __ push(lr); | 4957 __ push(lr); |
4957 __ CallStub(&stub); | 4958 __ CallStub(&stub); |
4958 __ pop(lr); | 4959 __ pop(lr); |
4959 } | 4960 } |
4960 } | 4961 } |
4961 | 4962 |
4962 | 4963 |
4963 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { | 4964 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { |
4964 // The entry hook is a "push lr" instruction, followed by a call. | 4965 // The entry hook is a "push lr" instruction, followed by a call. |
4965 const int32_t kReturnAddressDistanceFromFunctionStart = | 4966 const int32_t kReturnAddressDistanceFromFunctionStart = |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5459 MemOperand(fp, 6 * kPointerSize), | 5460 MemOperand(fp, 6 * kPointerSize), |
5460 NULL); | 5461 NULL); |
5461 } | 5462 } |
5462 | 5463 |
5463 | 5464 |
5464 #undef __ | 5465 #undef __ |
5465 | 5466 |
5466 } } // namespace v8::internal | 5467 } } // namespace v8::internal |
5467 | 5468 |
5468 #endif // V8_TARGET_ARCH_ARM | 5469 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |