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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 102943003: Use PushReturnAddressFrom and PopReturnAddressTo to manipulate return address for X64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 9bf6e9f2fb34d2ec94d52a3067d33092ff7a2995..06fb11d2523e5b44a82233fbbb6de490910b8784 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -475,7 +475,7 @@ static void GenerateFastApiCall(MacroAssembler* masm,
// Prepare arguments.
STATIC_ASSERT(kFastApiCallArguments == 7);
- __ lea(rax, Operand(rsp, 1 * kPointerSize));
+ __ lea(rax, args.GetArgumentOperand(offset - FCA::kHolderIndex));
haitao.feng 2013/12/04 08:04:26 Sorry this one was missed from https://codereview.
GenerateFastApiCallBody(masm, optimization, argc, false);
}
@@ -495,8 +495,7 @@ static void GenerateFastApiCall(MacroAssembler* masm,
Register* values) {
ASSERT(optimization.is_simple_api_call());
- // Copy return value.
- __ pop(scratch1);
+ __ PopReturnAddressTo(scratch1);
// receiver
__ push(receiver);
@@ -563,9 +562,7 @@ static void GenerateFastApiCall(MacroAssembler* masm,
ASSERT(!scratch1.is(rax));
// store receiver address for GenerateFastApiCallBody
__ movq(rax, rsp);
-
- // return address
- __ push(scratch1);
+ __ PushReturnAddressFrom(scratch1);
GenerateFastApiCallBody(masm, optimization, argc, true);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698