| 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 6738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6749 #else | 6749 #else |
| 6750 const int kNumSavedRegisters = 3; | 6750 const int kNumSavedRegisters = 3; |
| 6751 | 6751 |
| 6752 __ push(rcx); | 6752 __ push(rcx); |
| 6753 __ push(rdi); | 6753 __ push(rdi); |
| 6754 __ push(rsi); | 6754 __ push(rsi); |
| 6755 #endif | 6755 #endif |
| 6756 | 6756 |
| 6757 // Calculate the original stack pointer and store it in the second arg. | 6757 // Calculate the original stack pointer and store it in the second arg. |
| 6758 #ifdef _WIN64 | 6758 #ifdef _WIN64 |
| 6759 __ lea(rdx, Operand(rsp, kNumSavedRegisters * kPointerSize)); | 6759 __ lea(rdx, Operand(rsp, (kNumSavedRegisters + 1) * kPointerSize)); |
| 6760 #else | 6760 #else |
| 6761 __ lea(rsi, Operand(rsp, kNumSavedRegisters * kPointerSize)); | 6761 __ lea(rsi, Operand(rsp, (kNumSavedRegisters + 1) * kPointerSize)); |
| 6762 #endif | 6762 #endif |
| 6763 | 6763 |
| 6764 // Calculate the function address to the first arg. | 6764 // Calculate the function address to the first arg. |
| 6765 #ifdef _WIN64 | 6765 #ifdef _WIN64 |
| 6766 __ movq(rcx, Operand(rdx, 0)); | 6766 __ movq(rcx, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
| 6767 __ subq(rcx, Immediate(Assembler::kShortCallInstructionLength)); | 6767 __ subq(rcx, Immediate(Assembler::kShortCallInstructionLength)); |
| 6768 #else | 6768 #else |
| 6769 __ movq(rdi, Operand(rsi, 0)); | 6769 __ movq(rdi, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
| 6770 __ subq(rdi, Immediate(Assembler::kShortCallInstructionLength)); | 6770 __ subq(rdi, Immediate(Assembler::kShortCallInstructionLength)); |
| 6771 #endif | 6771 #endif |
| 6772 | 6772 |
| 6773 // Call the entry hook function. | 6773 // Call the entry hook function. |
| 6774 __ movq(rax, &entry_hook_, RelocInfo::NONE64); | 6774 __ movq(rax, &entry_hook_, RelocInfo::NONE64); |
| 6775 __ movq(rax, Operand(rax, 0)); | 6775 __ movq(rax, Operand(rax, 0)); |
| 6776 | 6776 |
| 6777 AllowExternalCallThatCantCauseGC scope(masm); | 6777 AllowExternalCallThatCantCauseGC scope(masm); |
| 6778 | 6778 |
| 6779 const int kArgumentCount = 2; | 6779 const int kArgumentCount = 2; |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7096 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 7096 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7097 } | 7097 } |
| 7098 } | 7098 } |
| 7099 | 7099 |
| 7100 | 7100 |
| 7101 #undef __ | 7101 #undef __ |
| 7102 | 7102 |
| 7103 } } // namespace v8::internal | 7103 } } // namespace v8::internal |
| 7104 | 7104 |
| 7105 #endif // V8_TARGET_ARCH_X64 | 7105 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |