| 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 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3408 #ifdef _WIN64 | 3408 #ifdef _WIN64 |
| 3409 const int kShadowSpace = 4; | 3409 const int kShadowSpace = 4; |
| 3410 arg_stack_space += kShadowSpace; | 3410 arg_stack_space += kShadowSpace; |
| 3411 #endif | 3411 #endif |
| 3412 // Optionally save all XMM registers. | 3412 // Optionally save all XMM registers. |
| 3413 if (save_doubles) { | 3413 if (save_doubles) { |
| 3414 int space = XMMRegister::kNumRegisters * kDoubleSize + | 3414 int space = XMMRegister::kNumRegisters * kDoubleSize + |
| 3415 arg_stack_space * kPointerSize; | 3415 arg_stack_space * kPointerSize; |
| 3416 subq(rsp, Immediate(space)); | 3416 subq(rsp, Immediate(space)); |
| 3417 int offset = -2 * kPointerSize; | 3417 int offset = -2 * kPointerSize; |
| 3418 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { | 3418 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
| 3419 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 3419 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
| 3420 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); | 3420 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); |
| 3421 } | 3421 } |
| 3422 } else if (arg_stack_space > 0) { | 3422 } else if (arg_stack_space > 0) { |
| 3423 subq(rsp, Immediate(arg_stack_space * kPointerSize)); | 3423 subq(rsp, Immediate(arg_stack_space * kPointerSize)); |
| 3424 } | 3424 } |
| 3425 | 3425 |
| 3426 // Get the required frame alignment for the OS. | 3426 // Get the required frame alignment for the OS. |
| 3427 const int kFrameAlignment = OS::ActivationFrameAlignment(); | 3427 const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 3428 if (kFrameAlignment > 0) { | 3428 if (kFrameAlignment > 0) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3452 EnterExitFramePrologue(false); | 3452 EnterExitFramePrologue(false); |
| 3453 EnterExitFrameEpilogue(arg_stack_space, false); | 3453 EnterExitFrameEpilogue(arg_stack_space, false); |
| 3454 } | 3454 } |
| 3455 | 3455 |
| 3456 | 3456 |
| 3457 void MacroAssembler::LeaveExitFrame(bool save_doubles) { | 3457 void MacroAssembler::LeaveExitFrame(bool save_doubles) { |
| 3458 // Registers: | 3458 // Registers: |
| 3459 // r15 : argv | 3459 // r15 : argv |
| 3460 if (save_doubles) { | 3460 if (save_doubles) { |
| 3461 int offset = -2 * kPointerSize; | 3461 int offset = -2 * kPointerSize; |
| 3462 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { | 3462 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
| 3463 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 3463 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
| 3464 movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize))); | 3464 movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize))); |
| 3465 } | 3465 } |
| 3466 } | 3466 } |
| 3467 // Get the return address from the stack and restore the frame pointer. | 3467 // Get the return address from the stack and restore the frame pointer. |
| 3468 movq(rcx, Operand(rbp, 1 * kPointerSize)); | 3468 movq(rcx, Operand(rbp, 1 * kPointerSize)); |
| 3469 movq(rbp, Operand(rbp, 0 * kPointerSize)); | 3469 movq(rbp, Operand(rbp, 0 * kPointerSize)); |
| 3470 | 3470 |
| 3471 // Drop everything up to and including the arguments and the receiver | 3471 // Drop everything up to and including the arguments and the receiver |
| 3472 // from the caller stack. | 3472 // from the caller stack. |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4568 | 4568 |
| 4569 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4569 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
| 4570 cmpq(rcx, null_value); | 4570 cmpq(rcx, null_value); |
| 4571 j(not_equal, &next); | 4571 j(not_equal, &next); |
| 4572 } | 4572 } |
| 4573 | 4573 |
| 4574 | 4574 |
| 4575 } } // namespace v8::internal | 4575 } } // namespace v8::internal |
| 4576 | 4576 |
| 4577 #endif // V8_TARGET_ARCH_X64 | 4577 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |