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 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3721 | 3721 |
3722 | 3722 |
3723 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, | 3723 void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, |
3724 bool save_doubles) { | 3724 bool save_doubles) { |
3725 #ifdef _WIN64 | 3725 #ifdef _WIN64 |
3726 const int kShadowSpace = 4; | 3726 const int kShadowSpace = 4; |
3727 arg_stack_space += kShadowSpace; | 3727 arg_stack_space += kShadowSpace; |
3728 #endif | 3728 #endif |
3729 // Optionally save all XMM registers. | 3729 // Optionally save all XMM registers. |
3730 if (save_doubles) { | 3730 if (save_doubles) { |
3731 int space = XMMRegister::kMaxNumRegisters * kDoubleSize + | 3731 int space = XMMRegister::kMaxNumAllocatableRegisters * kDoubleSize + |
mvstanton
2013/09/25 07:00:30
Could you do the same thing on ia32, using Registe
| |
3732 arg_stack_space * kPointerSize; | 3732 arg_stack_space * kPointerSize; |
3733 subq(rsp, Immediate(space)); | 3733 subq(rsp, Immediate(space)); |
3734 int offset = -2 * kPointerSize; | 3734 int offset = -2 * kPointerSize; |
3735 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { | 3735 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
3736 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 3736 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
3737 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); | 3737 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); |
3738 } | 3738 } |
3739 } else if (arg_stack_space > 0) { | 3739 } else if (arg_stack_space > 0) { |
3740 subq(rsp, Immediate(arg_stack_space * kPointerSize)); | 3740 subq(rsp, Immediate(arg_stack_space * kPointerSize)); |
3741 } | 3741 } |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4917 j(greater, &no_memento_available); | 4917 j(greater, &no_memento_available); |
4918 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), | 4918 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), |
4919 Heap::kAllocationMementoMapRootIndex); | 4919 Heap::kAllocationMementoMapRootIndex); |
4920 bind(&no_memento_available); | 4920 bind(&no_memento_available); |
4921 } | 4921 } |
4922 | 4922 |
4923 | 4923 |
4924 } } // namespace v8::internal | 4924 } } // namespace v8::internal |
4925 | 4925 |
4926 #endif // V8_TARGET_ARCH_X64 | 4926 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |