Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index f5d38f3212073b0e97583f3135f76187ba080977..92cc4598d3ba59cd6ef1a12d301f35980f2c9625 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -6756,17 +6756,17 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) { |
// Calculate the original stack pointer and store it in the second arg. |
#ifdef _WIN64 |
- __ lea(rdx, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
+ __ lea(rdx, Operand(rsp, (kNumSavedRegisters + 1) * kPointerSize)); |
#else |
- __ lea(rsi, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
+ __ lea(rsi, Operand(rsp, (kNumSavedRegisters + 1) * kPointerSize)); |
#endif |
// Calculate the function address to the first arg. |
#ifdef _WIN64 |
- __ movq(rcx, Operand(rdx, 0)); |
+ __ movq(rcx, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
__ subq(rcx, Immediate(Assembler::kShortCallInstructionLength)); |
#else |
- __ movq(rdi, Operand(rsi, 0)); |
+ __ movq(rdi, Operand(rsp, kNumSavedRegisters * kPointerSize)); |
__ subq(rdi, Immediate(Assembler::kShortCallInstructionLength)); |
#endif |