| 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 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3400 #ifdef _WIN64 | 3400 #ifdef _WIN64 |
| 3401 const int kShadowSpace = 4; | 3401 const int kShadowSpace = 4; |
| 3402 arg_stack_space += kShadowSpace; | 3402 arg_stack_space += kShadowSpace; |
| 3403 #endif | 3403 #endif |
| 3404 // Optionally save all XMM registers. | 3404 // Optionally save all XMM registers. |
| 3405 if (save_doubles) { | 3405 if (save_doubles) { |
| 3406 int space = XMMRegister::kNumRegisters * kDoubleSize + | 3406 int space = XMMRegister::kNumRegisters * kDoubleSize + |
| 3407 arg_stack_space * kPointerSize; | 3407 arg_stack_space * kPointerSize; |
| 3408 subq(rsp, Immediate(space)); | 3408 subq(rsp, Immediate(space)); |
| 3409 int offset = -2 * kPointerSize; | 3409 int offset = -2 * kPointerSize; |
| 3410 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { | 3410 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
| 3411 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 3411 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
| 3412 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); | 3412 movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg); |
| 3413 } | 3413 } |
| 3414 } else if (arg_stack_space > 0) { | 3414 } else if (arg_stack_space > 0) { |
| 3415 subq(rsp, Immediate(arg_stack_space * kPointerSize)); | 3415 subq(rsp, Immediate(arg_stack_space * kPointerSize)); |
| 3416 } | 3416 } |
| 3417 | 3417 |
| 3418 // Get the required frame alignment for the OS. | 3418 // Get the required frame alignment for the OS. |
| 3419 const int kFrameAlignment = OS::ActivationFrameAlignment(); | 3419 const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 3420 if (kFrameAlignment > 0) { | 3420 if (kFrameAlignment > 0) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3444 EnterExitFramePrologue(false); | 3444 EnterExitFramePrologue(false); |
| 3445 EnterExitFrameEpilogue(arg_stack_space, false); | 3445 EnterExitFrameEpilogue(arg_stack_space, false); |
| 3446 } | 3446 } |
| 3447 | 3447 |
| 3448 | 3448 |
| 3449 void MacroAssembler::LeaveExitFrame(bool save_doubles) { | 3449 void MacroAssembler::LeaveExitFrame(bool save_doubles) { |
| 3450 // Registers: | 3450 // Registers: |
| 3451 // r15 : argv | 3451 // r15 : argv |
| 3452 if (save_doubles) { | 3452 if (save_doubles) { |
| 3453 int offset = -2 * kPointerSize; | 3453 int offset = -2 * kPointerSize; |
| 3454 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; i++) { | 3454 for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) { |
| 3455 XMMRegister reg = XMMRegister::FromAllocationIndex(i); | 3455 XMMRegister reg = XMMRegister::FromAllocationIndex(i); |
| 3456 movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize))); | 3456 movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize))); |
| 3457 } | 3457 } |
| 3458 } | 3458 } |
| 3459 // Get the return address from the stack and restore the frame pointer. | 3459 // Get the return address from the stack and restore the frame pointer. |
| 3460 movq(rcx, Operand(rbp, 1 * kPointerSize)); | 3460 movq(rcx, Operand(rbp, 1 * kPointerSize)); |
| 3461 movq(rbp, Operand(rbp, 0 * kPointerSize)); | 3461 movq(rbp, Operand(rbp, 0 * kPointerSize)); |
| 3462 | 3462 |
| 3463 // Drop everything up to and including the arguments and the receiver | 3463 // Drop everything up to and including the arguments and the receiver |
| 3464 // from the caller stack. | 3464 // from the caller stack. |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4560 | 4560 |
| 4561 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4561 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
| 4562 cmpq(rcx, null_value); | 4562 cmpq(rcx, null_value); |
| 4563 j(not_equal, &next); | 4563 j(not_equal, &next); |
| 4564 } | 4564 } |
| 4565 | 4565 |
| 4566 | 4566 |
| 4567 } } // namespace v8::internal | 4567 } } // namespace v8::internal |
| 4568 | 4568 |
| 4569 #endif // V8_TARGET_ARCH_X64 | 4569 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |