Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 15769017: Fix EntryHookStub on ia32 and x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix wonky WS. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698