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

Unified Diff: src/a64/builtins-a64.cc

Issue 153773002: A64: Synchronize with r16679. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/a64/assembler-a64-inl.h ('k') | src/a64/code-stubs-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/builtins-a64.cc
diff --git a/src/a64/builtins-a64.cc b/src/a64/builtins-a64.cc
index e64237dc83b6338213032e3313aaf8d15bb3b903..dcd4a90ff7ef257358a31ef47c56c2087390c343 100644
--- a/src/a64/builtins-a64.cc
+++ b/src/a64/builtins-a64.cc
@@ -939,13 +939,21 @@ void Builtins::Generate_NotifyOSR(MacroAssembler* masm) {
void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
- // Lookup the function in the JavaScript frame and push it as an
- // argument to the on-stack replacement function.
+ // Lookup the function in the JavaScript frame.
__ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
{
FrameScope scope(masm, StackFrame::INTERNAL);
- __ Push(x0);
- __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
+ // Lookup and calculate pc offset.
+ __ Ldr(x1, MemOperand(fp, StandardFrameConstants::kCallerPCOffset));
+ __ Ldr(x2, FieldMemOperand(x0, JSFunction::kSharedFunctionInfoOffset));
+ __ Ldr(x2, FieldMemOperand(x2, SharedFunctionInfo::kCodeOffset));
+ __ Sub(x1, x1, Code::kHeaderSize - kHeapObjectTag);
+ __ Sub(x1, x1, x2);
+ __ SmiTag(x1);
+
+ // Pass both function and pc offset as arguments.
+ __ Push(x0, x1);
+ __ CallRuntime(Runtime::kCompileForOnStackReplacement, 2);
}
// If the code object is null, just return to the unoptimized code.
« no previous file with comments | « src/a64/assembler-a64-inl.h ('k') | src/a64/code-stubs-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698