| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 int argument_stack_space = 2 * kPointerSize; | 2095 int argument_stack_space = 2 * kPointerSize; |
| 2096 // We also need backing space for 4 parameters, even though | 2096 // We also need backing space for 4 parameters, even though |
| 2097 // we only pass one or two parameter, and it is in a register. | 2097 // we only pass one or two parameter, and it is in a register. |
| 2098 int argument_mirror_space = 4 * kPointerSize; | 2098 int argument_mirror_space = 4 * kPointerSize; |
| 2099 int total_stack_space = | 2099 int total_stack_space = |
| 2100 argument_mirror_space + argument_stack_space + result_stack_space; | 2100 argument_mirror_space + argument_stack_space + result_stack_space; |
| 2101 subq(rsp, Immediate(total_stack_space)); | 2101 subq(rsp, Immediate(total_stack_space)); |
| 2102 #endif | 2102 #endif |
| 2103 | 2103 |
| 2104 // Get the required frame alignment for the OS. | 2104 // Get the required frame alignment for the OS. |
| 2105 static const int kFrameAlignment = OS::ActivationFrameAlignment(); | 2105 const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 2106 if (kFrameAlignment > 0) { | 2106 if (kFrameAlignment > 0) { |
| 2107 ASSERT(IsPowerOf2(kFrameAlignment)); | 2107 ASSERT(IsPowerOf2(kFrameAlignment)); |
| 2108 movq(kScratchRegister, Immediate(-kFrameAlignment)); | 2108 movq(kScratchRegister, Immediate(-kFrameAlignment)); |
| 2109 and_(rsp, kScratchRegister); | 2109 and_(rsp, kScratchRegister); |
| 2110 } | 2110 } |
| 2111 | 2111 |
| 2112 // Patch the saved entry sp. | 2112 // Patch the saved entry sp. |
| 2113 movq(Operand(rbp, ExitFrameConstants::kSPOffset), rsp); | 2113 movq(Operand(rbp, ExitFrameConstants::kSPOffset), rsp); |
| 2114 } | 2114 } |
| 2115 | 2115 |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2713 CPU::FlushICache(address_, size_); | 2713 CPU::FlushICache(address_, size_); |
| 2714 | 2714 |
| 2715 // Check that the code was patched as expected. | 2715 // Check that the code was patched as expected. |
| 2716 ASSERT(masm_.pc_ == address_ + size_); | 2716 ASSERT(masm_.pc_ == address_ + size_); |
| 2717 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2717 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2718 } | 2718 } |
| 2719 | 2719 |
| 2720 } } // namespace v8::internal | 2720 } } // namespace v8::internal |
| 2721 | 2721 |
| 2722 #endif // V8_TARGET_ARCH_X64 | 2722 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |