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