OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 | 2195 |
2196 | 2196 |
2197 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, | 2197 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, |
2198 bool save_doubles) { | 2198 bool save_doubles) { |
2199 #ifdef _WIN64 | 2199 #ifdef _WIN64 |
2200 const int kShadowSpace = 4; | 2200 const int kShadowSpace = 4; |
2201 arg_stack_space += kShadowSpace; | 2201 arg_stack_space += kShadowSpace; |
2202 #endif | 2202 #endif |
2203 // Optionally save all XMM registers. | 2203 // Optionally save all XMM registers. |
2204 if (save_doubles) { | 2204 if (save_doubles) { |
2205 CpuFeatures::Scope scope(SSE2); | |
2206 int space = XMMRegister::kNumRegisters * kDoubleSize + | 2205 int space = XMMRegister::kNumRegisters * kDoubleSize + |
2207 arg_stack_space * kPointerSize; | 2206 arg_stack_space * kPointerSize; |
2208 subq(rsp, Immediate(space)); | 2207 subq(rsp, Immediate(space)); |
2209 int offset = -2 * kPointerSize; | 2208 int offset = -2 * kPointerSize; |
2210 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { | 2209 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { |
2211 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 2210 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
2212 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); | 2211 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); |
2213 } | 2212 } |
2214 } else if (arg_stack_space > 0) { | 2213 } else if (arg_stack_space > 0) { |
2215 subq(rsp, Immediate(arg_stack_space * kPointerSize)); | 2214 subq(rsp, Immediate(arg_stack_space * kPointerSize)); |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2903 CPU::FlushICache(address_, size_); | 2902 CPU::FlushICache(address_, size_); |
2904 | 2903 |
2905 // Check that the code was patched as expected. | 2904 // Check that the code was patched as expected. |
2906 ASSERT(masm_.pc_ == address_ + size_); | 2905 ASSERT(masm_.pc_ == address_ + size_); |
2907 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2906 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2908 } | 2907 } |
2909 | 2908 |
2910 } } // namespace v8::internal | 2909 } } // namespace v8::internal |
2911 | 2910 |
2912 #endif // V8_TARGET_ARCH_X64 | 2911 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |