| 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 7559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7570 __ StoreNumberToDoubleElements(r0, r3, r1, | 7570 __ StoreNumberToDoubleElements(r0, r3, r1, |
| 7571 // Overwrites all regs after this. | 7571 // Overwrites all regs after this. |
| 7572 r5, r6, r7, r9, r2, | 7572 r5, r6, r7, r9, r2, |
| 7573 &slow_elements); | 7573 &slow_elements); |
| 7574 __ Ret(); | 7574 __ Ret(); |
| 7575 } | 7575 } |
| 7576 | 7576 |
| 7577 | 7577 |
| 7578 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 7578 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
| 7579 if (entry_hook_ != NULL) { | 7579 if (entry_hook_ != NULL) { |
| 7580 ScopedPredictableCodeSize predictable(masm); |
| 7580 ProfileEntryHookStub stub; | 7581 ProfileEntryHookStub stub; |
| 7581 __ push(lr); | 7582 __ push(lr); |
| 7582 __ CallStub(&stub); | 7583 __ CallStub(&stub); |
| 7583 __ pop(lr); | 7584 __ pop(lr); |
| 7584 } | 7585 } |
| 7585 } | 7586 } |
| 7586 | 7587 |
| 7587 | 7588 |
| 7588 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { | 7589 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { |
| 7589 // The entry hook is a "push lr" instruction, followed by a call. | 7590 // The entry hook is a "push lr" instruction, followed by a call. |
| 7590 const int32_t kReturnAddressDistanceFromFunctionStart = | 7591 const int32_t kReturnAddressDistanceFromFunctionStart = |
| 7591 Assembler::kCallTargetAddressOffset + Assembler::kInstrSize; | 7592 3 * Assembler::kInstrSize; |
| 7592 | 7593 |
| 7593 // Save live volatile registers. | 7594 // Save live volatile registers. |
| 7594 __ Push(lr, r5, r1); | 7595 __ Push(lr, r5, r1); |
| 7595 const int32_t kNumSavedRegs = 3; | 7596 const int32_t kNumSavedRegs = 3; |
| 7596 | 7597 |
| 7597 // Compute the function's address for the first argument. | 7598 // Compute the function's address for the first argument. |
| 7598 __ sub(r0, lr, Operand(kReturnAddressDistanceFromFunctionStart)); | 7599 __ sub(r0, lr, Operand(kReturnAddressDistanceFromFunctionStart)); |
| 7599 | 7600 |
| 7600 // The caller's return address is above the saved temporaries. | 7601 // The caller's return address is above the saved temporaries. |
| 7601 // Grab that for the second argument to the hook. | 7602 // Grab that for the second argument to the hook. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 7631 | 7632 |
| 7632 __ Pop(lr, r5, r1); | 7633 __ Pop(lr, r5, r1); |
| 7633 __ Ret(); | 7634 __ Ret(); |
| 7634 } | 7635 } |
| 7635 | 7636 |
| 7636 #undef __ | 7637 #undef __ |
| 7637 | 7638 |
| 7638 } } // namespace v8::internal | 7639 } } // namespace v8::internal |
| 7639 | 7640 |
| 7640 #endif // V8_TARGET_ARCH_ARM | 7641 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |